Debian Codegraph @

src/crl.h

raw
1 /* crl.h - Internal definitions for the CRL Parser
2 * Copyright (C) 2002, 2012 g10 Code GmbH
3 *
4 * This file is part of KSBA.
5 *
6 * KSBA is free software; you can redistribute it and/or modify
7 * it under the terms of either
8 *
9 * - the GNU Lesser General Public License as published by the Free
10 * Software Foundation; either version 3 of the License, or (at
11 * your option) any later version.
12 *
13 * or
14 *
15 * - the GNU General Public License as published by the Free
16 * Software Foundation; either version 2 of the License, or (at
17 * your option) any later version.
18 *
19 * or both in parallel, as here.
20 *
21 * KSBA is distributed in the hope that it will be useful, but WITHOUT
22 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
23 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
24 * License for more details.
25 *
26 * You should have received a copies of the GNU General Public License
27 * and the GNU Lesser General Public License along with this program;
28 * if not, see <http://www.gnu.org/licenses/>.
29 */
30
31 #ifndef CRL_H
32 #define CRL_H 1
33
34 #include "ksba.h"
35
36 #ifndef HAVE_TYPEDEFD_ASNNODE
37 typedef struct asn_node_struct *AsnNode; /* FIXME: should not go here */
38 #define HAVE_TYPEDEFD_ASNNODE
39 #endif
40
41
42 struct crl_extn_s {
43 struct crl_extn_s *next;
44 char *oid;
45 int critical;
46 size_t derlen;
47 unsigned char der[1];
48 };
49 typedef struct crl_extn_s *crl_extn_t;
50
51 struct ksba_crl_s {
52 gpg_error_t last_error;
53
54 ksba_reader_t reader;
55 int any_parse_done;
56
57 void (*hash_fnc)(void *, const void *, size_t);
58 void *hash_fnc_arg;
59
60 struct {
61 struct tag_info ti;
62 unsigned long outer_len, tbs_len, seqseq_len;
63 int outer_ndef, tbs_ndef, seqseq_ndef;
64 int have_seqseq;
65 } state;
66
67 int crl_version;
68 struct {
69 char *oid;
70 char *parm;
71 size_t parmlen;
72 } algo;
73 struct {
74 AsnNode root; /* root of the tree with the values */
75 unsigned char *image;
76 size_t imagelen;
77 } issuer;
78 ksba_isotime_t this_update;
79 ksba_isotime_t next_update;
80
81 struct {
82 ksba_sexp_t serial;
83 ksba_crl_reason_t reason;
84 ksba_isotime_t revocation_date;
85 } item;
86
87 crl_extn_t extension_list;
88 ksba_sexp_t sigval;
89
90 struct {
91 int used;
92 char buffer[8192];
93 } hashbuf;
94
95 };
96
97
98 /*-- crl.c --*/
99
100
101 #endif /*CRL_H*/