Return to vici_authority.h CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / strongswan / src / libcharon / plugins / vici |
1.1 misho 1: /* 1.1.1.2 ! misho 2: * Copyright (C) 2020 Tobias Brunner 1.1 misho 3: * Copyright (C) 2015 Andreas Steffen 4: * HSR 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: 17: /** 18: * @defgroup vici_authority vici_authority 19: * @{ @ingroup vici 20: */ 21: 22: #ifndef VICI_AUTHORITY_H_ 23: #define VICI_AUTHORITY_H_ 24: 25: #include "vici_dispatcher.h" 26: 27: typedef struct vici_authority_t vici_authority_t; 28: 29: /** 30: * In-memory certification authority backend, managed by VICI. 31: */ 32: struct vici_authority_t { 33: 34: /** 35: * Implements credential_set_t 36: */ 37: credential_set_t set; 38: 39: /** 1.1.1.2 ! misho 40: * Add a CA certificate and return a reference if it is already stored, ! 41: * otherwise returns the same certificate. ! 42: * ! 43: * @param cert certificate to check ! 44: * @return reference to stored CA certificate, or original ! 45: */ ! 46: certificate_t *(*add_ca_cert)(vici_authority_t *this, certificate_t *cert); ! 47: ! 48: /** ! 49: * Remove CA certificates added via add_ca_cert(). ! 50: */ ! 51: void (*clear_ca_certs)(vici_authority_t *this); ! 52: ! 53: /** 1.1 misho 54: * Destroy a vici_authority_t. 55: */ 56: void (*destroy)(vici_authority_t *this); 57: }; 58: 59: /** 60: * Create a vici_authority instance. 61: * 62: * @param dispatcher dispatcher to receive requests from 63: * @return authority backend 64: */ 1.1.1.2 ! misho 65: vici_authority_t *vici_authority_create(vici_dispatcher_t *dispatcher); 1.1 misho 66: 67: #endif /** VICI_AUTHORITY_H_ @}*/