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

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"
1.1.1.2 ! misho      28: #include "vici_authority.h"
1.1       misho      29: 
                     30: #include <credentials/credential_set.h>
                     31: 
                     32: typedef struct vici_cred_t vici_cred_t;
                     33: 
                     34: /**
                     35:  * In-memory credential backend, managed by VICI.
                     36:  */
                     37: struct vici_cred_t {
                     38: 
                     39:        /**
                     40:         * Implements credential_set_t
                     41:         */
                     42:        credential_set_t set;
                     43: 
                     44:        /**
                     45:         * Add a certificate to the certificate store
                     46:         *
                     47:         * @param cert  certificate to be added to store
                     48:         * @return              reference to certificate or cached copy
                     49:         */
                     50:        certificate_t* (*add_cert)(vici_cred_t *this, certificate_t *cert);
                     51: 
                     52:        /**
                     53:         * Destroy a vici_cred_t.
                     54:         */
                     55:        void (*destroy)(vici_cred_t *this);
                     56: };
                     57: 
                     58: /**
                     59:  * Create a vici_cred instance.
                     60:  *
                     61:  * @param dispatcher           dispatcher to receive requests from
1.1.1.2 ! misho      62:  * @param authority                    CA certificate storage
1.1       misho      63:  * @return                                     credential backend
                     64:  */
1.1.1.2 ! misho      65: vici_cred_t *vici_cred_create(vici_dispatcher_t *dispatcher,
        !            66:                                                          vici_authority_t *authority);
1.1       misho      67: 
                     68: #endif /** VICI_CRED_H_ @}*/

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