"this" removed from comments.
[strongswan.git] / src / libstrongswan / credentials / certificates / ac.h
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 #include <credentials/ietf_attributes/ietf_attributes.h>
28
29 typedef struct ac_t ac_t;
30
31 /**
32 * X.509 attribute certificate interface.
33 *
34 * This interface adds additional methods to the certificate_t type to
35 * allow further operations on these certificates.
36 */
37 struct ac_t {
38
39 /**
40 * Implements the certificate_t interface
41 */
42 certificate_t certificate;
43
44 /**
45 * Get the attribute certificate's serial number.
46 *
47 * @return chunk pointing to serialNumber
48 */
49 chunk_t (*get_serial)(ac_t *this);
50
51 /**
52 * Get the serial number of the holder certificate.
53 *
54 * @return chunk pointing to serialNumber
55 */
56 chunk_t (*get_holderSerial)(ac_t *this);
57
58 /**
59 * Get the issuer of the holder certificate.
60 *
61 * @return holderIssuer as identification_t*
62 */
63 identification_t* (*get_holderIssuer)(ac_t *this);
64
65 /**
66 * Get the authorityKeyIdentifier.
67 *
68 * @return authKeyIdentifier as chunk_t, to internal data
69 */
70 chunk_t (*get_authKeyIdentifier)(ac_t *this);
71
72 /**
73 * Get the group memberships as a list of IETF attributes
74 *
75 * @return object containing a list of IETF attributes
76 */
77 ietf_attributes_t* (*get_groups)(ac_t *this);
78
79 /**
80 * @brief Checks if two attribute certificates belong to the same holder
81 *
82 * @param that other attribute certificate
83 * @return TRUE if same holder
84 */
85 bool (*equals_holder) (ac_t *this, ac_t *other);
86 };
87
88 #endif /** AC_H_ @}*/