1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
/*
* Automatically generated by asn1_compiler. Do not edit
*
* ASN.1 parser for x509_akid
*/
#include <linux/asn1_ber_bytecode.h>
#include "x509_akid.asn1.h"
enum x509_akid_actions {
ACT_x509_akid_note_kid = 0,
ACT_x509_akid_note_name = 1,
ACT_x509_akid_note_serial = 2,
ACT_x509_extract_name_segment = 3,
ACT_x509_note_OID = 4,
NR__x509_akid_actions = 5
};
static const asn1_action_t x509_akid_action_table[NR__x509_akid_actions] = {
[ 0] = x509_akid_note_kid,
[ 1] = x509_akid_note_name,
[ 2] = x509_akid_note_serial,
[ 3] = x509_extract_name_segment,
[ 4] = x509_note_OID,
};
static const unsigned char x509_akid_machine[] = {
// AuthorityKeyIdentifier
[ 0] = ASN1_OP_MATCH,
[ 1] = _tag(UNIV, CONS, SEQ),
// KeyIdentifier
[ 2] = ASN1_OP_MATCH_ACT_OR_SKIP, // keyIdentifier
[ 3] = _tagn(CONT, PRIM, 0),
[ 4] = _action(ACT_x509_akid_note_kid),
// GeneralNames
[ 5] = ASN1_OP_MATCH_JUMP_OR_SKIP, // authorityCertIssuer
[ 6] = _tagn(CONT, CONS, 1),
[ 7] = _jump_target(13), // --> GeneralNames
// CertificateSerialNumber
[ 8] = ASN1_OP_MATCH_ACT_OR_SKIP, // authorityCertSerialNumber
[ 9] = _tagn(CONT, PRIM, 2),
[ 10] = _action(ACT_x509_akid_note_serial),
[ 11] = ASN1_OP_END_SEQ,
[ 12] = ASN1_OP_COMPLETE,
// GeneralName
[ 13] = ASN1_OP_MATCH_JUMP_OR_SKIP, // otherName
[ 14] = _tagn(CONT, CONS, 0),
[ 15] = _jump_target(44),
[ 16] = ASN1_OP_COND_MATCH_JUMP_OR_SKIP, // rfc822Name
[ 17] = _tagn(CONT, CONS, 1),
[ 18] = _jump_target(47),
[ 19] = ASN1_OP_COND_MATCH_JUMP_OR_SKIP, // dNSName
[ 20] = _tagn(CONT, CONS, 2),
[ 21] = _jump_target(51),
[ 22] = ASN1_OP_COND_MATCH_JUMP_OR_SKIP, // x400Address
[ 23] = _tagn(CONT, CONS, 3),
[ 24] = _jump_target(55),
[ 25] = ASN1_OP_COND_MATCH_JUMP_OR_SKIP, // directoryName
[ 26] = _tagn(CONT, CONS, 4),
[ 27] = _jump_target(58),
[ 28] = ASN1_OP_COND_MATCH_JUMP_OR_SKIP, // ediPartyName
[ 29] = _tagn(CONT, CONS, 5),
[ 30] = _jump_target(78),
[ 31] = ASN1_OP_COND_MATCH_JUMP_OR_SKIP, // uniformResourceIdentifier
[ 32] = _tagn(CONT, CONS, 6),
[ 33] = _jump_target(81),
[ 34] = ASN1_OP_COND_MATCH_JUMP_OR_SKIP, // iPAddress
[ 35] = _tagn(CONT, CONS, 7),
[ 36] = _jump_target(85),
[ 37] = ASN1_OP_COND_MATCH_JUMP_OR_SKIP, // registeredID
[ 38] = _tagn(CONT, CONS, 8),
[ 39] = _jump_target(89),
[ 40] = ASN1_OP_COND_FAIL,
[ 41] = ASN1_OP_END_SEQ_OF,
[ 42] = _jump_target(13),
[ 43] = ASN1_OP_RETURN,
[ 44] = ASN1_OP_MATCH_ANY, // otherName
[ 45] = ASN1_OP_END_SEQ,
[ 46] = ASN1_OP_RETURN,
[ 47] = ASN1_OP_MATCH, // rfc822Name
[ 48] = _tag(UNIV, PRIM, IA5STR),
[ 49] = ASN1_OP_END_SEQ,
[ 50] = ASN1_OP_RETURN,
[ 51] = ASN1_OP_MATCH, // dNSName
[ 52] = _tag(UNIV, PRIM, IA5STR),
[ 53] = ASN1_OP_END_SEQ,
[ 54] = ASN1_OP_RETURN,
[ 55] = ASN1_OP_MATCH_ANY, // x400Address
[ 56] = ASN1_OP_END_SEQ,
[ 57] = ASN1_OP_RETURN,
// Name
[ 58] = ASN1_OP_MATCH,
[ 59] = _tag(UNIV, CONS, SEQ),
// RelativeDistinguishedName
[ 60] = ASN1_OP_MATCH,
[ 61] = _tag(UNIV, CONS, SET),
// AttributeValueAssertion
[ 62] = ASN1_OP_MATCH,
[ 63] = _tag(UNIV, CONS, SEQ),
[ 64] = ASN1_OP_MATCH_ACT, // attributeType
[ 65] = _tag(UNIV, PRIM, OID),
[ 66] = _action(ACT_x509_note_OID),
[ 67] = ASN1_OP_MATCH_ANY_ACT, // attributeValue
[ 68] = _action(ACT_x509_extract_name_segment),
[ 69] = ASN1_OP_END_SEQ,
[ 70] = ASN1_OP_END_SET_OF,
[ 71] = _jump_target(62),
[ 72] = ASN1_OP_END_SEQ_OF,
[ 73] = _jump_target(60),
[ 74] = ASN1_OP_ACT,
[ 75] = _action(ACT_x509_akid_note_name),
[ 76] = ASN1_OP_END_SEQ,
[ 77] = ASN1_OP_RETURN,
[ 78] = ASN1_OP_MATCH_ANY, // ediPartyName
[ 79] = ASN1_OP_END_SEQ,
[ 80] = ASN1_OP_RETURN,
[ 81] = ASN1_OP_MATCH, // uniformResourceIdentifier
[ 82] = _tag(UNIV, PRIM, IA5STR),
[ 83] = ASN1_OP_END_SEQ,
[ 84] = ASN1_OP_RETURN,
[ 85] = ASN1_OP_MATCH, // iPAddress
[ 86] = _tag(UNIV, PRIM, OTS),
[ 87] = ASN1_OP_END_SEQ,
[ 88] = ASN1_OP_RETURN,
[ 89] = ASN1_OP_MATCH, // registeredID
[ 90] = _tag(UNIV, PRIM, OID),
[ 91] = ASN1_OP_END_SEQ,
[ 92] = ASN1_OP_RETURN,
};
const struct asn1_decoder x509_akid_decoder = {
.machine = x509_akid_machine,
.machlen = sizeof(x509_akid_machine),
.actions = x509_akid_action_table,
};
|