Annotation of embedaddon/strongswan/src/libstrongswan/credentials/containers/pkcs7.h, revision 1.1.1.1

1.1       misho       1: /*
                      2:  * Copyright (C) 2012 Martin Willi
                      3:  * Copyright (C) 2012 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 pkcs7 pkcs7
                     18:  * @{ @ingroup containers
                     19:  */
                     20: 
                     21: #ifndef PKCS7_H_
                     22: #define PKCS7_H_
                     23: 
                     24: #include <credentials/containers/container.h>
                     25: 
                     26: typedef struct pkcs7_t pkcs7_t;
                     27: 
                     28: /**
                     29:  * PKCS#7/CMS container type.
                     30:  */
                     31: struct pkcs7_t {
                     32: 
                     33:        /**
                     34:         * Implements container_t.
                     35:         */
                     36:        container_t container;
                     37: 
                     38:        /**
                     39:         * Get an authenticated PKCS#9 attribute from PKCS#7 signerInfo.
                     40:         *
                     41:         * To select the signerInfo structure to get the attribute from, pass
                     42:         * the enumerator position from container_t.create_signature_enumerator().
                     43:         *
                     44:         * The attribute returned does not contain type information and must be
                     45:         * freed after use.
                     46:         *
                     47:         * @param oid                   OID from the attribute to get
                     48:         * @param enumerator    enumerator to select signerInfo
                     49:         * @param value                 chunk receiving attribute value, allocated
                     50:         * @return                              TRUE if attribute found
                     51:         */
                     52:        bool (*get_attribute)(pkcs7_t *this, int oid, enumerator_t *enumerator,
                     53:                                                  chunk_t *value);
                     54: 
                     55:        /**
                     56:         * Create an enumerator over attached certificates.
                     57:         *
                     58:         * @return                              enumerator over certificate_t
                     59:         */
                     60:        enumerator_t* (*create_cert_enumerator)(pkcs7_t *this);
                     61: };
                     62: 
                     63: #endif /** PKCS7_H_ @}*/

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