openssl: Fix AES-GCM with BoringSSL
[strongswan.git] / src / libcharon / plugins / vici / vici_cred.h
1 /*
2 * Copyright (C) 2014 Martin Willi
3 * Copyright (C) 2014 revosec AG
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 vici_cred vici_cred
18 * @{ @ingroup vici
19 */
20
21 #ifndef VICI_CRED_H_
22 #define VICI_CRED_H_
23
24 #include "vici_dispatcher.h"
25
26 typedef struct vici_cred_t vici_cred_t;
27
28 /**
29 * In-memory credential backend, managed by VICI.
30 */
31 struct vici_cred_t {
32
33 /**
34 * Add a certificate to the certificate store
35 *
36 * @param cert certificate to be added to store
37 * @return reference to certificate or cached copy
38 */
39 certificate_t* (*add_cert)(vici_cred_t *this, certificate_t *cert);
40
41 /**
42 * Destroy a vici_cred_t.
43 */
44 void (*destroy)(vici_cred_t *this);
45 };
46
47 /**
48 * Create a vici_cred instance.
49 *
50 * @param dispatcher dispatcher to receive requests from
51 * @return credential backend
52 */
53 vici_cred_t *vici_cred_create(vici_dispatcher_t *dispatcher);
54
55 #endif /** VICI_CRED_H_ @}*/