3 * @brief Functions to build PKCS#10 Request's
5 * Contains functions to build DER encoded pkcs#10 certificate requests
9 * Copyright (C) 2005 Jan Hutter, Martin Willi
10 * Hochschule fuer Technik Rapperswil
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
26 #include "../pluto/defs.h"
27 #include "../pluto/pkcs1.h"
28 #include "../pluto/x509.h"
30 typedef struct pkcs10_struct pkcs10_t
;
33 * @brief type representating a pkcs#10 request.
35 * A pkcs#10 request contains a distinguished name, an optional
36 * challenge password, a public key and optional subjectAltNames.
38 * The RSA private key is needed to compute the signature of the given request
40 struct pkcs10_struct
{
41 RSA_private_key_t
*private_key
;
44 chunk_t challengePassword
;
45 generalName_t
*subjectAltNames
;
48 extern const pkcs10_t empty_pkcs10
;
50 extern void pkcs10_add_subjectAltName(generalName_t
**subjectAltNames
51 , generalNames_t kind
, char *value
);
52 extern pkcs10_t
* pkcs10_build(RSA_private_key_t
*key
, chunk_t subject
53 , chunk_t challengePassword
, generalName_t
*subjectAltNames
55 extern void pkcs10_free(pkcs10_t
*pkcs10
);
57 #endif /* _PKCS10_H */