Moved generic RADIUS protocol support to a dedicated libradius
[strongswan.git] / src / pluto / crl.h
1 /* Support of X.509 certificate revocation lists (CRLs)
2 * Copyright (C) 2000-2004 Andreas Steffen, Zuercher Hochschule Winterthur
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * for more details.
13 */
14
15 #include "constants.h"
16
17 #include <utils/linked_list.h>
18 #include <credentials/certificates/certificate.h>
19 #include <credentials/certificates/crl.h>
20
21 /* storage structure for an X.509 CRL */
22
23 typedef struct x509crl x509crl_t;
24
25 struct x509crl {
26 certificate_t *crl;
27 x509crl_t *next;
28 linked_list_t *distributionPoints;
29 };
30
31 /* apply a strict CRL policy
32 * flag set in plutomain.c and used in ipsec_doi.c and rcv_whack.c
33 */
34 extern bool strict_crl_policy;
35
36 /*
37 * cache the retrieved CRLs by storing them locally as a file
38 */
39 extern bool cache_crls;
40
41 /*
42 * check periodically for expired crls
43 */
44 extern long crl_check_interval;
45 extern void load_crls(void);
46 extern void check_crls(void);
47 extern bool insert_crl(x509crl_t *crl, char *crl_uri, bool cache_crl);
48 extern cert_status_t verify_by_crl(cert_t *cert, time_t *until,
49 time_t *revocationDate,
50 crl_reason_t *revocationReason);
51 extern void list_crls(bool utc, bool strict);
52 extern void free_crls(void);
53 extern void free_crl(x509crl_t *crl);