Annotation of embedaddon/strongswan/src/libstrongswan/credentials/certificates/ac.h, revision 1.1.1.1

1.1       misho       1: /*
                      2:  * Copyright (C) 2002-2009 Andreas Steffen
                      3:  *
                      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 ac ac
                     19:  * @{ @ingroup certificates
                     20:  */
                     21: 
                     22: #ifndef AC_H_
                     23: #define AC_H_
                     24: 
                     25: #include <library.h>
                     26: #include <credentials/certificates/certificate.h>
                     27: 
                     28: typedef struct ac_t ac_t;
                     29: typedef enum ac_group_type_t ac_group_type_t;
                     30: 
                     31: /**
                     32:  * Common group types, from IETF Attributes Syntax
                     33:  */
                     34: enum ac_group_type_t {
                     35:        AC_GROUP_TYPE_OCTETS,
                     36:        AC_GROUP_TYPE_STRING,
                     37:        AC_GROUP_TYPE_OID,
                     38: };
                     39: 
                     40: /**
                     41:  * X.509 attribute certificate interface.
                     42:  *
                     43:  * This interface adds additional methods to the certificate_t type to
                     44:  * allow further operations on these certificates.
                     45:  */
                     46: struct ac_t {
                     47: 
                     48:        /**
                     49:         * Implements the certificate_t interface
                     50:         */
                     51:        certificate_t certificate;
                     52: 
                     53:        /**
                     54:         * Get the attribute certificate's serial number.
                     55:         *
                     56:         * @return                      chunk pointing to serialNumber
                     57:         */
                     58:        chunk_t (*get_serial)(ac_t *this);
                     59: 
                     60:        /**
                     61:         * Get the serial number of the holder certificate.
                     62:         *
                     63:         * @return                      chunk pointing to serialNumber
                     64:         */
                     65:        chunk_t (*get_holderSerial)(ac_t *this);
                     66: 
                     67:        /**
                     68:         * Get the issuer of the holder certificate.
                     69:         *
                     70:         * @return                      holderIssuer as identification_t*
                     71:         */
                     72:        identification_t* (*get_holderIssuer)(ac_t *this);
                     73: 
                     74:        /**
                     75:         * Get the authorityKeyIdentifier.
                     76:         *
                     77:         * @return                      authKeyIdentifier as chunk_t, to internal data
                     78:         */
                     79:        chunk_t (*get_authKeyIdentifier)(ac_t *this);
                     80: 
                     81:        /**
                     82:         * Create an enumerator of contained Group memberships.
                     83:         *
                     84:         * @return                      enumerator over (ac_group_type_t, chunk_t)
                     85:         */
                     86:        enumerator_t* (*create_group_enumerator)(ac_t *this);
                     87: };
                     88: 
                     89: #endif /** AC_H_ @}*/

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