2 * Copyright (C) 2008-2009 Martin Willi
3 * Copyright (C) 2009 Andreas Steffen
5 * HSR Hochschule fuer Technik Rapperswil
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 * @defgroup x509_pkcs10 x509_pkcs10
23 #ifndef X509_PKCS10_H_
24 #define X509_PKCS10_H_
26 typedef struct x509_pkcs10_t x509_pkcs10_t
;
28 #include <credentials/builder.h>
29 #include <credentials/certificates/pkcs10.h>
32 * Implementation of pkcs10_t/certificate_t using own ASN.1 parser.
34 struct x509_pkcs10_t
{
37 * Implements the pkcs10_t interface
43 * Load a PKCS#10 certificate.
45 * This function takes a BUILD_BLOB_ASN1_DER.
47 * @param type certificate type, CERT_PKCS10_REQUEST only
48 * @param args builder_part_t argument list
49 * @return PKCS#10 certificate request, NULL on failure
51 x509_pkcs10_t
*x509_pkcs10_load(certificate_type_t type
, va_list args
);
54 * Generate a PKCS#10 certificate request.
56 * To issue a self-signed certificate, the function takes:
57 * BUILD_SUBJECT, BUILD_SUBJECT_ALTNAMES, BUILD_SIGNING_KEY, BUILD_DIGEST_ALG.
59 * @param type certificate type, CERT_PKCS10_REQUEST only
60 * @param args builder_part_t argument list
61 * @return PKCS#10 certificate request, NULL on failure
63 x509_pkcs10_t
*x509_pkcs10_gen(certificate_type_t type
, va_list args
);
65 #endif /** X509_PKCS10_H_ @}*/