882446afeb6afbfcf4ef7d1fafb62ad1ffdaaf06
[strongswan.git] / src / charon / plugins / stroke / stroke_ca.h
1 /*
2 * Copyright (C) 2008 Tobias Brunner
3 * Copyright (C) 2008 Martin Willi
4 * Hochschule fuer Technik Rapperswil
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 *
16 * $Id$
17 */
18
19 /**
20 * @defgroup stroke_ca stroke_ca
21 * @{ @ingroup stroke
22 */
23
24 #ifndef STROKE_CA_H_
25 #define STROKE_CA_H_
26
27 #include <stroke_msg.h>
28
29 #include "stroke_cred.h"
30
31 typedef struct stroke_ca_t stroke_ca_t;
32
33 /**
34 * ipsec.conf ca section handling.
35 */
36 struct stroke_ca_t {
37
38 /**
39 * Implements credential_set_t
40 */
41 credential_set_t set;
42
43 /**
44 * Add a CA to the set using a stroke_msg_t.
45 *
46 * @param msg stroke message containing CA info
47 */
48 void (*add)(stroke_ca_t *this, stroke_msg_t *msg);
49
50 /**
51 * Remove a CA from the set using a stroke_msg_t.
52 *
53 * @param msg stroke message containing CA info
54 */
55 void (*del)(stroke_ca_t *this, stroke_msg_t *msg);
56
57 /**
58 * List CA sections to stroke console.
59 *
60 * @param msg stroke message
61 */
62 void (*list)(stroke_ca_t *this, stroke_msg_t *msg, FILE *out);
63
64 /**
65 * Check if a certificate can be made available through hash and URL.
66 *
67 * @param cert peer certificate
68 */
69 void (*check_for_hash_and_url)(stroke_ca_t *this, certificate_t* cert);
70
71 /**
72 * Destroy a stroke_ca instance.
73 */
74 void (*destroy)(stroke_ca_t *this);
75 };
76
77 /**
78 * Create a stroke_ca instance.
79 */
80 stroke_ca_t *stroke_ca_create(stroke_cred_t *cred);
81
82 #endif /* STROKE_CA_H_ @}*/