]> git.ipfire.org Git - thirdparty/strongswan.git/blame - src/libstrongswan/credentials/certificates/ac.h
Update copyright headers after acquisition by secunet
[thirdparty/strongswan.git] / src / libstrongswan / credentials / certificates / ac.h
CommitLineData
bdec2e4f 1/*
fc12e3cd 2 * Copyright (C) 2002-2009 Andreas Steffen
bdec2e4f 3 *
19ef2aec
TB
4 *
5 * Copyright (C) secunet Security Networks AG
bdec2e4f
AS
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * for more details.
bdec2e4f
AS
16 */
17
18/**
19 * @defgroup ac ac
20 * @{ @ingroup certificates
21 */
22
23#ifndef AC_H_
24#define AC_H_
25
26#include <library.h>
27#include <credentials/certificates/certificate.h>
28
29typedef struct ac_t ac_t;
61b2d815
MW
30typedef enum ac_group_type_t ac_group_type_t;
31
32/**
33 * Common group types, from IETF Attributes Syntax
34 */
35enum ac_group_type_t {
36 AC_GROUP_TYPE_OCTETS,
37 AC_GROUP_TYPE_STRING,
38 AC_GROUP_TYPE_OID,
39};
bdec2e4f
AS
40
41/**
42 * X.509 attribute certificate interface.
43 *
44 * This interface adds additional methods to the certificate_t type to
45 * allow further operations on these certificates.
46 */
47struct ac_t {
48
49 /**
50 * Implements the certificate_t interface
51 */
52 certificate_t certificate;
7daf5226 53
0672aa7b
AS
54 /**
55 * Get the attribute certificate's serial number.
56 *
57 * @return chunk pointing to serialNumber
58 */
59 chunk_t (*get_serial)(ac_t *this);
7daf5226 60
0672aa7b
AS
61 /**
62 * Get the serial number of the holder certificate.
63 *
64 * @return chunk pointing to serialNumber
65 */
66 chunk_t (*get_holderSerial)(ac_t *this);
7daf5226 67
0672aa7b
AS
68 /**
69 * Get the issuer of the holder certificate.
70 *
71 * @return holderIssuer as identification_t*
72 */
73 identification_t* (*get_holderIssuer)(ac_t *this);
7daf5226 74
0672aa7b 75 /**
fc12e3cd 76 * Get the authorityKeyIdentifier.
0672aa7b 77 *
a5e3153a 78 * @return authKeyIdentifier as chunk_t, to internal data
0672aa7b 79 */
a5e3153a 80 chunk_t (*get_authKeyIdentifier)(ac_t *this);
7daf5226 81
fc12e3cd 82 /**
61b2d815 83 * Create an enumerator of contained Group memberships.
fc12e3cd 84 *
61b2d815 85 * @return enumerator over (ac_group_type_t, chunk_t)
fc12e3cd 86 */
61b2d815 87 enumerator_t* (*create_group_enumerator)(ac_t *this);
bdec2e4f
AS
88};
89
1490ff4d 90#endif /** AC_H_ @}*/