Annotation of embedaddon/strongswan/src/libcharon/plugins/vici/vici_cred.h, revision 1.1.1.1

1.1       misho       1: /*
                      2:  * Copyright (C) 2014 Martin Willi
                      3:  * Copyright (C) 2014 revosec AG
                      4:  *
                      5:  * Copyright (C) 2016 Andreas Steffen
                      6:  * HSR Hochschule fuer Technik Rapperswil
                      7:  *
                      8:  * This program is free software; you can redistribute it and/or modify it
                      9:  * under the terms of the GNU General Public License as published by the
                     10:  * Free Software Foundation; either version 2 of the License, or (at your
                     11:  * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
                     12:  *
                     13:  * This program is distributed in the hope that it will be useful, but
                     14:  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
                     15:  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
                     16:  * for more details.
                     17:  */
                     18: 
                     19: /**
                     20:  * @defgroup vici_cred vici_cred
                     21:  * @{ @ingroup vici
                     22:  */
                     23: 
                     24: #ifndef VICI_CRED_H_
                     25: #define VICI_CRED_H_
                     26: 
                     27: #include "vici_dispatcher.h"
                     28: 
                     29: #include <credentials/credential_set.h>
                     30: 
                     31: typedef struct vici_cred_t vici_cred_t;
                     32: 
                     33: /**
                     34:  * In-memory credential backend, managed by VICI.
                     35:  */
                     36: struct vici_cred_t {
                     37: 
                     38:        /**
                     39:         * Implements credential_set_t
                     40:         */
                     41:        credential_set_t set;
                     42: 
                     43:        /**
                     44:         * Add a certificate to the certificate store
                     45:         *
                     46:         * @param cert  certificate to be added to store
                     47:         * @return              reference to certificate or cached copy
                     48:         */
                     49:        certificate_t* (*add_cert)(vici_cred_t *this, certificate_t *cert);
                     50: 
                     51:        /**
                     52:         * Destroy a vici_cred_t.
                     53:         */
                     54:        void (*destroy)(vici_cred_t *this);
                     55: };
                     56: 
                     57: /**
                     58:  * Create a vici_cred instance.
                     59:  *
                     60:  * @param dispatcher           dispatcher to receive requests from
                     61:  * @return                                     credential backend
                     62:  */
                     63: vici_cred_t *vici_cred_create(vici_dispatcher_t *dispatcher);
                     64: 
                     65: #endif /** VICI_CRED_H_ @}*/

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>