Updated pem plugin to the new builder API
[strongswan.git] / src / libstrongswan / plugins / pem / pem_builder.h
1 /*
2 * Copyright (C) 2009 Martin Willi
3 * Hochschule fuer Technik Rapperswil
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 */
15
16 /**
17 * @defgroup pem_builder pem_builder
18 * @{ @ingroup pem_p
19 */
20
21 #ifndef PEM_PRIVATE_KEY_H_
22 #define PEM_PRIVATE_KEY_H_
23
24 #include <credentials/builder.h>
25 #include <credentials/credential_factory.h>
26 #include <credentials/keys/private_key.h>
27 #include <credentials/certificates/certificate.h>
28
29 /**
30 * Load PEM encoded private keys.
31 *
32 * @param type type of the key
33 * @param args builder_part_t argument list
34 * @return private key, NULL if failed
35 */
36 private_key_t *pem_private_key_load(key_type_t type, va_list args);
37
38 /**
39 * Load PEM encoded public keys.
40 *
41 * @param type type of the key
42 * @param args builder_part_t argument list
43 * @return public key, NULL if failed
44 */
45 public_key_t *pem_public_key_load(key_type_t type, va_list args);
46
47 /**
48 * Build PEM encoded certificates..
49 *
50 * @param type type of the certificate
51 * @param args builder_part_t argument list
52 * @return certificate, NULL if failed
53 */
54 certificate_t *pem_certificate_load(certificate_type_t type, va_list args);
55
56 #endif /** PEM_PRIVATE_KEY_H_ @}*/
57