updated Doxyfile
[strongswan.git] / src / libstrongswan / credentials / certificates / crl.h
1 /*
2 * Copyright (C) 2008 Martin Willi
3 * Copyright (C) 2006 Andreas Steffen
4 * 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 * $Id$
17 */
18
19 /**
20 * @defgroup crl crl
21 * @{ @ingroup certificates
22 */
23
24 #ifndef CRL_H_
25 #define CRL_H_
26
27 typedef struct crl_t crl_t;
28 typedef enum crl_reason_t crl_reason_t;
29
30 #include <library.h>
31 #include <credentials/certificates/certificate.h>
32
33 /**
34 * RFC 2459 CRL reason codes
35 */
36 enum crl_reason_t {
37 CRL_UNSPECIFIED = 0,
38 CRL_KEY_COMPROMISE = 1,
39 CRL_CA_COMPROMISE = 2,
40 CRL_AFFILIATION_CHANGED = 3,
41 CRL_SUPERSEDED = 4,
42 CRL_CESSATION_OF_OPERATON = 5,
43 CRL_CERTIFICATE_HOLD = 6,
44 CRL_REMOVE_FROM_CRL = 8,
45 };
46
47 /**
48 * enum names for crl_reason_t
49 */
50 extern enum_name_t *crl_reason_names;
51
52 /**
53 * X509 certificate revocation list (CRL) interface definition.
54 */
55 struct crl_t {
56
57 /**
58 * Implements (parts of) the certificate_t interface
59 */
60 certificate_t certificate;
61
62 /**
63 * Get the CRL serial number.
64 *
65 * @return chunk pointing to internal crlNumber
66 */
67 chunk_t (*get_serial)(crl_t *this);
68
69 /**
70 * Get the the authorityKeyIdentifier.
71 *
72 * @return authKeyIdentifier as identification_t*
73 */
74 identification_t* (*get_authKeyIdentifier)(crl_t *this);
75
76 /**
77 * Create an enumerator over all revoked certificates.
78 *
79 * The enumerator takes 3 pointer arguments:
80 * chunk_t serial, time_t revocation_date, crl_reason_t reason
81 *
82 * @return enumerator over revoked certificates.
83 */
84 enumerator_t* (*create_enumerator)(crl_t *this);
85
86 };
87
88 #endif /** CRL_H_ @}*/