updated Doxyfile
[strongswan.git] / src / charon / plugins / stroke / stroke_cred.h
1 /*
2 * Copyright (C) 2008 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 * $Id$
16 */
17
18 /**
19 * @defgroup stroke_cred stroke_cred
20 * @{ @ingroup stroke
21 */
22
23 #ifndef STROKE_CRED_H_
24 #define STROKE_CRED_H_
25
26 #include <stroke_msg.h>
27 #include <credentials/credential_set.h>
28 #include <credentials/certificates/certificate.h>
29
30 typedef struct stroke_cred_t stroke_cred_t;
31
32 /**
33 * Stroke in-memory credential storage.
34 */
35 struct stroke_cred_t {
36
37 /**
38 * Implements credential_set_t
39 */
40 credential_set_t set;
41
42 /**
43 * Reread secrets from config files.
44 *
45 * @param msg stroke message
46 */
47 void (*reread)(stroke_cred_t *this, stroke_msg_t *msg);
48
49 /**
50 * Load a CA certificate, and serve it through the credential_set.
51 *
52 * @param filename file to load CA cert from
53 * @return reference to loaded certificate, or NULL
54 */
55 certificate_t* (*load_ca)(stroke_cred_t *this, char *filename);
56
57 /**
58 * Load a peer certificate and serve it rhrough the credential_set.
59 *
60 * @param filename file to load peer cert from
61 * @return reference to loaded certificate, or NULL
62 */
63 certificate_t* (*load_peer)(stroke_cred_t *this, char *filename);
64
65 /**
66 * Enable/Disable CRL caching to disk.
67 *
68 * @param enabled TRUE to enable, FALSE to disable
69 */
70 void (*cachecrl)(stroke_cred_t *this, bool enabled);
71
72 /**
73 * Destroy a stroke_cred instance.
74 */
75 void (*destroy)(stroke_cred_t *this);
76 };
77
78 /**
79 * Create a stroke_cred instance.
80 */
81 stroke_cred_t *stroke_cred_create();
82
83 #endif /** STROKE_CRED_H_ @}*/