1 /* Support of PKCS#1 and PKCS#7 data structures
2 * Copyright (C) 2002 Andreas Steffen, Zuercher Hochschule Winterthur
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * RCSID $Id: pkcs.h,v 0.1 2002/04/12 00:00:00 as Exp $
17 /* path definition for my private keys */
19 #include <config/autoconf.h>
21 #ifdef CONFIG_USER_FLATFSD_FLATFSD
22 #define PRIVATE_KEY_PATH "/etc/config"
24 #define PRIVATE_KEY_PATH "/etc"
27 /* access structure for a PKCS#1 private key */
29 typedef struct pkcs1privkey pkcs1privkey_t;
36 /* used for initialization */
38 extern const pkcs1privkey_t empty_pkcs1privkey;
40 extern bool parse_pkcs1_private_key(chunk_t blob, pkcs1privkey_t *key);
41 extern pkcs1privkey_t* load_pkcs1_private_key(const char* filename,
42 const char* passphrase);
44 extern bool parse_pkcs7_cert(chunk_t blob, x509cert_t **cert);