/src/wireshark/epan/dissectors/packet-pkixac.c
Line | Count | Source |
1 | | /* Do not modify this file. Changes will be overwritten. */ |
2 | | /* Generated automatically by the ASN.1 to Wireshark dissector compiler */ |
3 | | /* packet-pkixac.c */ |
4 | | /* asn2wrs.py -b -q -L -p pkixac -c ./pkixac.cnf -s ./packet-pkixac-template -D . -O ../.. PKIXAttributeCertificate.asn */ |
5 | | |
6 | | /* packet-pkixac.c |
7 | | * |
8 | | * Routines for PKIXAttributeCertificate (RFC3281) packet dissection. |
9 | | * |
10 | | * Copyright 2010, Stig Bjorlykke <stig@bjorlykke.org> |
11 | | * |
12 | | * Wireshark - Network traffic analyzer |
13 | | * By Gerald Combs <gerald@wireshark.org> |
14 | | * Copyright 1998 Gerald Combs |
15 | | * |
16 | | * SPDX-License-Identifier: GPL-2.0-or-later |
17 | | */ |
18 | | |
19 | | #include "config.h" |
20 | | |
21 | | #include <epan/packet.h> |
22 | | #include <wsutil/array.h> |
23 | | |
24 | | #include <epan/asn1.h> |
25 | | #include "packet-ber.h" |
26 | | #include "packet-pkixac.h" |
27 | | #include "packet-pkix1explicit.h" |
28 | | #include "packet-pkix1implicit.h" |
29 | | #include "packet-x509ce.h" |
30 | | |
31 | 14 | #define PNAME "PKIX Attribute Certificate" |
32 | 14 | #define PSNAME "PKIXAC" |
33 | 14 | #define PFNAME "pkixac" |
34 | | |
35 | | void proto_register_pkixac(void); |
36 | | void proto_reg_handoff_pkixac(void); |
37 | | |
38 | | /* Initialize the protocol and registered fields */ |
39 | | static int proto_pkixac; |
40 | | static int hf_pkixac_Targets_PDU; /* Targets */ |
41 | | static int hf_pkixac_IetfAttrSyntax_PDU; /* IetfAttrSyntax */ |
42 | | static int hf_pkixac_SvceAuthInfo_PDU; /* SvceAuthInfo */ |
43 | | static int hf_pkixac_RoleSyntax_PDU; /* RoleSyntax */ |
44 | | static int hf_pkixac_Clearance_PDU; /* Clearance */ |
45 | | static int hf_pkixac_RFC3281Clearance_PDU; /* RFC3281Clearance */ |
46 | | static int hf_pkixac_AAControls_PDU; /* AAControls */ |
47 | | static int hf_pkixac_ProxyInfo_PDU; /* ProxyInfo */ |
48 | | static int hf_pkixac_digestedObjectType; /* T_digestedObjectType */ |
49 | | static int hf_pkixac_otherObjectTypeID; /* OBJECT_IDENTIFIER */ |
50 | | static int hf_pkixac_digestAlgorithm; /* AlgorithmIdentifier */ |
51 | | static int hf_pkixac_objectDigest; /* BIT_STRING */ |
52 | | static int hf_pkixac_issuer; /* GeneralNames */ |
53 | | static int hf_pkixac_serial; /* CertificateSerialNumber */ |
54 | | static int hf_pkixac_issuerUID; /* UniqueIdentifier */ |
55 | | static int hf_pkixac_Targets_item; /* Target */ |
56 | | static int hf_pkixac_targetName; /* GeneralName */ |
57 | | static int hf_pkixac_targetGroup; /* GeneralName */ |
58 | | static int hf_pkixac_targetCert; /* TargetCert */ |
59 | | static int hf_pkixac_targetCertificate; /* IssuerSerial */ |
60 | | static int hf_pkixac_certDigestInfo; /* ObjectDigestInfo */ |
61 | | static int hf_pkixac_policyAuthority; /* GeneralNames */ |
62 | | static int hf_pkixac_values; /* T_values */ |
63 | | static int hf_pkixac_values_item; /* T_values_item */ |
64 | | static int hf_pkixac_octets; /* OCTET_STRING */ |
65 | | static int hf_pkixac_oid; /* OBJECT_IDENTIFIER */ |
66 | | static int hf_pkixac_string; /* UTF8String */ |
67 | | static int hf_pkixac_service; /* GeneralName */ |
68 | | static int hf_pkixac_ident; /* GeneralName */ |
69 | | static int hf_pkixac_authInfo; /* OCTET_STRING */ |
70 | | static int hf_pkixac_roleAuthority; /* GeneralNames */ |
71 | | static int hf_pkixac_roleName; /* GeneralName */ |
72 | | static int hf_pkixac_policyId; /* OBJECT_IDENTIFIER */ |
73 | | static int hf_pkixac_classList; /* ClassList */ |
74 | | static int hf_pkixac_securityCategories; /* SET_OF_SecurityCategory */ |
75 | | static int hf_pkixac_securityCategories_item; /* SecurityCategory */ |
76 | | static int hf_pkixac_type; /* T_type */ |
77 | | static int hf_pkixac_value; /* T_value */ |
78 | | static int hf_pkixac_pathLenConstraint; /* INTEGER_0_MAX */ |
79 | | static int hf_pkixac_permittedAttrs; /* AttrSpec */ |
80 | | static int hf_pkixac_excludedAttrs; /* AttrSpec */ |
81 | | static int hf_pkixac_permitUnSpecified; /* BOOLEAN */ |
82 | | static int hf_pkixac_AttrSpec_item; /* OBJECT_IDENTIFIER */ |
83 | | static int hf_pkixac_ProxyInfo_item; /* Targets */ |
84 | | /* named bits */ |
85 | | static int hf_pkixac_ClassList_unmarked; |
86 | | static int hf_pkixac_ClassList_unclassified; |
87 | | static int hf_pkixac_ClassList_restricted; |
88 | | static int hf_pkixac_ClassList_confidential; |
89 | | static int hf_pkixac_ClassList_secret; |
90 | | static int hf_pkixac_ClassList_topSecret; |
91 | | |
92 | | /* Initialize the subtree pointers */ |
93 | | static int ett_pkixac; |
94 | | static int ett_pkixac_ObjectDigestInfo; |
95 | | static int ett_pkixac_IssuerSerial; |
96 | | static int ett_pkixac_Targets; |
97 | | static int ett_pkixac_Target; |
98 | | static int ett_pkixac_TargetCert; |
99 | | static int ett_pkixac_IetfAttrSyntax; |
100 | | static int ett_pkixac_T_values; |
101 | | static int ett_pkixac_T_values_item; |
102 | | static int ett_pkixac_SvceAuthInfo; |
103 | | static int ett_pkixac_RoleSyntax; |
104 | | static int ett_pkixac_Clearance; |
105 | | static int ett_pkixac_SET_OF_SecurityCategory; |
106 | | static int ett_pkixac_RFC3281Clearance; |
107 | | static int ett_pkixac_ClassList; |
108 | | static int ett_pkixac_SecurityCategory; |
109 | | static int ett_pkixac_AAControls; |
110 | | static int ett_pkixac_AttrSpec; |
111 | | static int ett_pkixac_ProxyInfo; |
112 | | |
113 | | static const char *object_identifier_id; |
114 | | |
115 | | |
116 | | static const value_string pkixac_T_digestedObjectType_vals[] = { |
117 | | { 0, "publicKey" }, |
118 | | { 1, "publicKeyCert" }, |
119 | | { 2, "otherObjectTypes" }, |
120 | | { 0, NULL } |
121 | | }; |
122 | | |
123 | | |
124 | | static unsigned |
125 | 0 | dissect_pkixac_T_digestedObjectType(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
126 | 0 | offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, |
127 | 0 | NULL); |
128 | |
|
129 | 0 | return offset; |
130 | 0 | } |
131 | | |
132 | | |
133 | | |
134 | | static unsigned |
135 | 0 | dissect_pkixac_OBJECT_IDENTIFIER(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
136 | 0 | offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL); |
137 | |
|
138 | 0 | return offset; |
139 | 0 | } |
140 | | |
141 | | |
142 | | |
143 | | static unsigned |
144 | 0 | dissect_pkixac_BIT_STRING(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
145 | 0 | offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset, |
146 | 0 | NULL, 0, hf_index, -1, |
147 | 0 | NULL); |
148 | |
|
149 | 0 | return offset; |
150 | 0 | } |
151 | | |
152 | | |
153 | | static const ber_sequence_t ObjectDigestInfo_sequence[] = { |
154 | | { &hf_pkixac_digestedObjectType, BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_pkixac_T_digestedObjectType }, |
155 | | { &hf_pkixac_otherObjectTypeID, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixac_OBJECT_IDENTIFIER }, |
156 | | { &hf_pkixac_digestAlgorithm, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier }, |
157 | | { &hf_pkixac_objectDigest , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_pkixac_BIT_STRING }, |
158 | | { NULL, 0, 0, 0, NULL } |
159 | | }; |
160 | | |
161 | | static unsigned |
162 | 0 | dissect_pkixac_ObjectDigestInfo(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
163 | 0 | offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, |
164 | 0 | ObjectDigestInfo_sequence, hf_index, ett_pkixac_ObjectDigestInfo); |
165 | |
|
166 | 0 | return offset; |
167 | 0 | } |
168 | | |
169 | | |
170 | | static const ber_sequence_t IssuerSerial_sequence[] = { |
171 | | { &hf_pkixac_issuer , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509ce_GeneralNames }, |
172 | | { &hf_pkixac_serial , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_CertificateSerialNumber }, |
173 | | { &hf_pkixac_issuerUID , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_UniqueIdentifier }, |
174 | | { NULL, 0, 0, 0, NULL } |
175 | | }; |
176 | | |
177 | | static unsigned |
178 | 0 | dissect_pkixac_IssuerSerial(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
179 | 0 | offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, |
180 | 0 | IssuerSerial_sequence, hf_index, ett_pkixac_IssuerSerial); |
181 | |
|
182 | 0 | return offset; |
183 | 0 | } |
184 | | |
185 | | |
186 | | static const ber_sequence_t TargetCert_sequence[] = { |
187 | | { &hf_pkixac_targetCertificate, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixac_IssuerSerial }, |
188 | | { &hf_pkixac_targetName , BER_CLASS_CON, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_x509ce_GeneralName }, |
189 | | { &hf_pkixac_certDigestInfo, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixac_ObjectDigestInfo }, |
190 | | { NULL, 0, 0, 0, NULL } |
191 | | }; |
192 | | |
193 | | static unsigned |
194 | 0 | dissect_pkixac_TargetCert(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
195 | 0 | offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, |
196 | 0 | TargetCert_sequence, hf_index, ett_pkixac_TargetCert); |
197 | |
|
198 | 0 | return offset; |
199 | 0 | } |
200 | | |
201 | | |
202 | | static const value_string pkixac_Target_vals[] = { |
203 | | { 0, "targetName" }, |
204 | | { 1, "targetGroup" }, |
205 | | { 2, "targetCert" }, |
206 | | { 0, NULL } |
207 | | }; |
208 | | |
209 | | static const ber_choice_t Target_choice[] = { |
210 | | { 0, &hf_pkixac_targetName , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_x509ce_GeneralName }, |
211 | | { 1, &hf_pkixac_targetGroup , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_x509ce_GeneralName }, |
212 | | { 2, &hf_pkixac_targetCert , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_pkixac_TargetCert }, |
213 | | { 0, NULL, 0, 0, 0, NULL } |
214 | | }; |
215 | | |
216 | | static unsigned |
217 | 0 | dissect_pkixac_Target(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
218 | 0 | offset = dissect_ber_choice(actx, tree, tvb, offset, |
219 | 0 | Target_choice, hf_index, ett_pkixac_Target, |
220 | 0 | NULL); |
221 | |
|
222 | 0 | return offset; |
223 | 0 | } |
224 | | |
225 | | |
226 | | static const ber_sequence_t Targets_sequence_of[1] = { |
227 | | { &hf_pkixac_Targets_item , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_pkixac_Target }, |
228 | | }; |
229 | | |
230 | | static unsigned |
231 | 0 | dissect_pkixac_Targets(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
232 | 0 | offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, |
233 | 0 | Targets_sequence_of, hf_index, ett_pkixac_Targets); |
234 | |
|
235 | 0 | return offset; |
236 | 0 | } |
237 | | |
238 | | |
239 | | |
240 | | static unsigned |
241 | 0 | dissect_pkixac_OCTET_STRING(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
242 | 0 | offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, |
243 | 0 | NULL); |
244 | |
|
245 | 0 | return offset; |
246 | 0 | } |
247 | | |
248 | | |
249 | | |
250 | | static unsigned |
251 | 0 | dissect_pkixac_UTF8String(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
252 | 0 | offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String, |
253 | 0 | actx, tree, tvb, offset, hf_index, |
254 | 0 | NULL); |
255 | |
|
256 | 0 | return offset; |
257 | 0 | } |
258 | | |
259 | | |
260 | | static const value_string pkixac_T_values_item_vals[] = { |
261 | | { 0, "octets" }, |
262 | | { 1, "oid" }, |
263 | | { 2, "string" }, |
264 | | { 0, NULL } |
265 | | }; |
266 | | |
267 | | static const ber_choice_t T_values_item_choice[] = { |
268 | | { 0, &hf_pkixac_octets , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_pkixac_OCTET_STRING }, |
269 | | { 1, &hf_pkixac_oid , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_pkixac_OBJECT_IDENTIFIER }, |
270 | | { 2, &hf_pkixac_string , BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_pkixac_UTF8String }, |
271 | | { 0, NULL, 0, 0, 0, NULL } |
272 | | }; |
273 | | |
274 | | static unsigned |
275 | 0 | dissect_pkixac_T_values_item(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
276 | 0 | offset = dissect_ber_choice(actx, tree, tvb, offset, |
277 | 0 | T_values_item_choice, hf_index, ett_pkixac_T_values_item, |
278 | 0 | NULL); |
279 | |
|
280 | 0 | return offset; |
281 | 0 | } |
282 | | |
283 | | |
284 | | static const ber_sequence_t T_values_sequence_of[1] = { |
285 | | { &hf_pkixac_values_item , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_pkixac_T_values_item }, |
286 | | }; |
287 | | |
288 | | static unsigned |
289 | 0 | dissect_pkixac_T_values(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
290 | 0 | offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, |
291 | 0 | T_values_sequence_of, hf_index, ett_pkixac_T_values); |
292 | |
|
293 | 0 | return offset; |
294 | 0 | } |
295 | | |
296 | | |
297 | | static const ber_sequence_t IetfAttrSyntax_sequence[] = { |
298 | | { &hf_pkixac_policyAuthority, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_x509ce_GeneralNames }, |
299 | | { &hf_pkixac_values , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixac_T_values }, |
300 | | { NULL, 0, 0, 0, NULL } |
301 | | }; |
302 | | |
303 | | static unsigned |
304 | 0 | dissect_pkixac_IetfAttrSyntax(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
305 | 0 | offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, |
306 | 0 | IetfAttrSyntax_sequence, hf_index, ett_pkixac_IetfAttrSyntax); |
307 | |
|
308 | 0 | return offset; |
309 | 0 | } |
310 | | |
311 | | |
312 | | static const ber_sequence_t SvceAuthInfo_sequence[] = { |
313 | | { &hf_pkixac_service , BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_x509ce_GeneralName }, |
314 | | { &hf_pkixac_ident , BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_x509ce_GeneralName }, |
315 | | { &hf_pkixac_authInfo , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixac_OCTET_STRING }, |
316 | | { NULL, 0, 0, 0, NULL } |
317 | | }; |
318 | | |
319 | | static unsigned |
320 | 0 | dissect_pkixac_SvceAuthInfo(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
321 | 0 | offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, |
322 | 0 | SvceAuthInfo_sequence, hf_index, ett_pkixac_SvceAuthInfo); |
323 | |
|
324 | 0 | return offset; |
325 | 0 | } |
326 | | |
327 | | |
328 | | static const ber_sequence_t RoleSyntax_sequence[] = { |
329 | | { &hf_pkixac_roleAuthority, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_x509ce_GeneralNames }, |
330 | | { &hf_pkixac_roleName , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_x509ce_GeneralName }, |
331 | | { NULL, 0, 0, 0, NULL } |
332 | | }; |
333 | | |
334 | | static unsigned |
335 | 0 | dissect_pkixac_RoleSyntax(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
336 | 0 | offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, |
337 | 0 | RoleSyntax_sequence, hf_index, ett_pkixac_RoleSyntax); |
338 | |
|
339 | 0 | return offset; |
340 | 0 | } |
341 | | |
342 | | |
343 | | static int * const ClassList_bits[] = { |
344 | | &hf_pkixac_ClassList_unmarked, |
345 | | &hf_pkixac_ClassList_unclassified, |
346 | | &hf_pkixac_ClassList_restricted, |
347 | | &hf_pkixac_ClassList_confidential, |
348 | | &hf_pkixac_ClassList_secret, |
349 | | &hf_pkixac_ClassList_topSecret, |
350 | | NULL |
351 | | }; |
352 | | |
353 | | static unsigned |
354 | 0 | dissect_pkixac_ClassList(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
355 | 0 | offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset, |
356 | 0 | ClassList_bits, 6, hf_index, ett_pkixac_ClassList, |
357 | 0 | NULL); |
358 | |
|
359 | 0 | return offset; |
360 | 0 | } |
361 | | |
362 | | |
363 | | |
364 | | static unsigned |
365 | 0 | dissect_pkixac_T_type(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
366 | 0 | offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &object_identifier_id); |
367 | |
|
368 | 0 | return offset; |
369 | 0 | } |
370 | | |
371 | | |
372 | | |
373 | | static unsigned |
374 | 0 | dissect_pkixac_T_value(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
375 | 0 | if (object_identifier_id) |
376 | 0 | offset = call_ber_oid_callback (object_identifier_id, tvb, offset, actx->pinfo, tree, NULL); |
377 | | |
378 | |
|
379 | 0 | return offset; |
380 | 0 | } |
381 | | |
382 | | |
383 | | static const ber_sequence_t SecurityCategory_sequence[] = { |
384 | | { &hf_pkixac_type , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_pkixac_T_type }, |
385 | | { &hf_pkixac_value , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_pkixac_T_value }, |
386 | | { NULL, 0, 0, 0, NULL } |
387 | | }; |
388 | | |
389 | | static unsigned |
390 | 0 | dissect_pkixac_SecurityCategory(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
391 | 0 | object_identifier_id = NULL; |
392 | 0 | offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, |
393 | 0 | SecurityCategory_sequence, hf_index, ett_pkixac_SecurityCategory); |
394 | | |
395 | | |
396 | |
|
397 | 0 | return offset; |
398 | 0 | } |
399 | | |
400 | | |
401 | | static const ber_sequence_t SET_OF_SecurityCategory_set_of[1] = { |
402 | | { &hf_pkixac_securityCategories_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixac_SecurityCategory }, |
403 | | }; |
404 | | |
405 | | static unsigned |
406 | 0 | dissect_pkixac_SET_OF_SecurityCategory(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
407 | 0 | offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset, |
408 | 0 | SET_OF_SecurityCategory_set_of, hf_index, ett_pkixac_SET_OF_SecurityCategory); |
409 | |
|
410 | 0 | return offset; |
411 | 0 | } |
412 | | |
413 | | |
414 | | static const ber_sequence_t Clearance_sequence[] = { |
415 | | { &hf_pkixac_policyId , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_pkixac_OBJECT_IDENTIFIER }, |
416 | | { &hf_pkixac_classList , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixac_ClassList }, |
417 | | { &hf_pkixac_securityCategories, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixac_SET_OF_SecurityCategory }, |
418 | | { NULL, 0, 0, 0, NULL } |
419 | | }; |
420 | | |
421 | | static unsigned |
422 | 0 | dissect_pkixac_Clearance(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
423 | 0 | offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, |
424 | 0 | Clearance_sequence, hf_index, ett_pkixac_Clearance); |
425 | |
|
426 | 0 | return offset; |
427 | 0 | } |
428 | | |
429 | | |
430 | | static const ber_sequence_t RFC3281Clearance_sequence[] = { |
431 | | { &hf_pkixac_policyId , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_pkixac_OBJECT_IDENTIFIER }, |
432 | | { &hf_pkixac_classList , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkixac_ClassList }, |
433 | | { &hf_pkixac_securityCategories, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkixac_SET_OF_SecurityCategory }, |
434 | | { NULL, 0, 0, 0, NULL } |
435 | | }; |
436 | | |
437 | | static unsigned |
438 | 0 | dissect_pkixac_RFC3281Clearance(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
439 | 0 | offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, |
440 | 0 | RFC3281Clearance_sequence, hf_index, ett_pkixac_RFC3281Clearance); |
441 | |
|
442 | 0 | return offset; |
443 | 0 | } |
444 | | |
445 | | |
446 | | |
447 | | static unsigned |
448 | 0 | dissect_pkixac_INTEGER_0_MAX(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
449 | 0 | offset = dissect_ber_constrained_integer64(implicit_tag, actx, tree, tvb, offset, |
450 | 0 | 0U, NO_BOUND, hf_index, NULL); |
451 | |
|
452 | 0 | return offset; |
453 | 0 | } |
454 | | |
455 | | |
456 | | static const ber_sequence_t AttrSpec_sequence_of[1] = { |
457 | | { &hf_pkixac_AttrSpec_item, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_pkixac_OBJECT_IDENTIFIER }, |
458 | | }; |
459 | | |
460 | | static unsigned |
461 | 0 | dissect_pkixac_AttrSpec(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
462 | 0 | offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, |
463 | 0 | AttrSpec_sequence_of, hf_index, ett_pkixac_AttrSpec); |
464 | |
|
465 | 0 | return offset; |
466 | 0 | } |
467 | | |
468 | | |
469 | | |
470 | | static unsigned |
471 | 0 | dissect_pkixac_BOOLEAN(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
472 | 0 | offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, NULL); |
473 | |
|
474 | 0 | return offset; |
475 | 0 | } |
476 | | |
477 | | |
478 | | static const ber_sequence_t AAControls_sequence[] = { |
479 | | { &hf_pkixac_pathLenConstraint, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixac_INTEGER_0_MAX }, |
480 | | { &hf_pkixac_permittedAttrs, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkixac_AttrSpec }, |
481 | | { &hf_pkixac_excludedAttrs, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkixac_AttrSpec }, |
482 | | { &hf_pkixac_permitUnSpecified, BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixac_BOOLEAN }, |
483 | | { NULL, 0, 0, 0, NULL } |
484 | | }; |
485 | | |
486 | | static unsigned |
487 | 0 | dissect_pkixac_AAControls(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
488 | 0 | offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, |
489 | 0 | AAControls_sequence, hf_index, ett_pkixac_AAControls); |
490 | |
|
491 | 0 | return offset; |
492 | 0 | } |
493 | | |
494 | | |
495 | | static const ber_sequence_t ProxyInfo_sequence_of[1] = { |
496 | | { &hf_pkixac_ProxyInfo_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixac_Targets }, |
497 | | }; |
498 | | |
499 | | static unsigned |
500 | 0 | dissect_pkixac_ProxyInfo(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
501 | 0 | offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, |
502 | 0 | ProxyInfo_sequence_of, hf_index, ett_pkixac_ProxyInfo); |
503 | |
|
504 | 0 | return offset; |
505 | 0 | } |
506 | | |
507 | | /*--- PDUs ---*/ |
508 | | |
509 | 0 | static int dissect_Targets_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { |
510 | 0 | unsigned offset = 0; |
511 | 0 | asn1_ctx_t asn1_ctx; |
512 | 0 | asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo); |
513 | 0 | offset = dissect_pkixac_Targets(false, tvb, offset, &asn1_ctx, tree, hf_pkixac_Targets_PDU); |
514 | 0 | return offset; |
515 | 0 | } |
516 | 0 | static int dissect_IetfAttrSyntax_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { |
517 | 0 | unsigned offset = 0; |
518 | 0 | asn1_ctx_t asn1_ctx; |
519 | 0 | asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo); |
520 | 0 | offset = dissect_pkixac_IetfAttrSyntax(false, tvb, offset, &asn1_ctx, tree, hf_pkixac_IetfAttrSyntax_PDU); |
521 | 0 | return offset; |
522 | 0 | } |
523 | 0 | static int dissect_SvceAuthInfo_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { |
524 | 0 | unsigned offset = 0; |
525 | 0 | asn1_ctx_t asn1_ctx; |
526 | 0 | asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo); |
527 | 0 | offset = dissect_pkixac_SvceAuthInfo(false, tvb, offset, &asn1_ctx, tree, hf_pkixac_SvceAuthInfo_PDU); |
528 | 0 | return offset; |
529 | 0 | } |
530 | 0 | static int dissect_RoleSyntax_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { |
531 | 0 | unsigned offset = 0; |
532 | 0 | asn1_ctx_t asn1_ctx; |
533 | 0 | asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo); |
534 | 0 | offset = dissect_pkixac_RoleSyntax(false, tvb, offset, &asn1_ctx, tree, hf_pkixac_RoleSyntax_PDU); |
535 | 0 | return offset; |
536 | 0 | } |
537 | 0 | static int dissect_Clearance_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { |
538 | 0 | unsigned offset = 0; |
539 | 0 | asn1_ctx_t asn1_ctx; |
540 | 0 | asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo); |
541 | 0 | offset = dissect_pkixac_Clearance(false, tvb, offset, &asn1_ctx, tree, hf_pkixac_Clearance_PDU); |
542 | 0 | return offset; |
543 | 0 | } |
544 | 0 | static int dissect_RFC3281Clearance_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { |
545 | 0 | unsigned offset = 0; |
546 | 0 | asn1_ctx_t asn1_ctx; |
547 | 0 | asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo); |
548 | 0 | offset = dissect_pkixac_RFC3281Clearance(false, tvb, offset, &asn1_ctx, tree, hf_pkixac_RFC3281Clearance_PDU); |
549 | 0 | return offset; |
550 | 0 | } |
551 | 0 | static int dissect_AAControls_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { |
552 | 0 | unsigned offset = 0; |
553 | 0 | asn1_ctx_t asn1_ctx; |
554 | 0 | asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo); |
555 | 0 | offset = dissect_pkixac_AAControls(false, tvb, offset, &asn1_ctx, tree, hf_pkixac_AAControls_PDU); |
556 | 0 | return offset; |
557 | 0 | } |
558 | 0 | static int dissect_ProxyInfo_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { |
559 | 0 | unsigned offset = 0; |
560 | 0 | asn1_ctx_t asn1_ctx; |
561 | 0 | asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo); |
562 | 0 | offset = dissect_pkixac_ProxyInfo(false, tvb, offset, &asn1_ctx, tree, hf_pkixac_ProxyInfo_PDU); |
563 | 0 | return offset; |
564 | 0 | } |
565 | | |
566 | | |
567 | | /*--- proto_register_pkixac ----------------------------------------------*/ |
568 | 14 | void proto_register_pkixac(void) { |
569 | | |
570 | | /* List of fields */ |
571 | 14 | static hf_register_info hf[] = { |
572 | 14 | { &hf_pkixac_Targets_PDU, |
573 | 14 | { "Targets", "pkixac.Targets", |
574 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
575 | 14 | NULL, HFILL }}, |
576 | 14 | { &hf_pkixac_IetfAttrSyntax_PDU, |
577 | 14 | { "IetfAttrSyntax", "pkixac.IetfAttrSyntax_element", |
578 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
579 | 14 | NULL, HFILL }}, |
580 | 14 | { &hf_pkixac_SvceAuthInfo_PDU, |
581 | 14 | { "SvceAuthInfo", "pkixac.SvceAuthInfo_element", |
582 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
583 | 14 | NULL, HFILL }}, |
584 | 14 | { &hf_pkixac_RoleSyntax_PDU, |
585 | 14 | { "RoleSyntax", "pkixac.RoleSyntax_element", |
586 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
587 | 14 | NULL, HFILL }}, |
588 | 14 | { &hf_pkixac_Clearance_PDU, |
589 | 14 | { "Clearance", "pkixac.Clearance_element", |
590 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
591 | 14 | NULL, HFILL }}, |
592 | 14 | { &hf_pkixac_RFC3281Clearance_PDU, |
593 | 14 | { "RFC3281Clearance", "pkixac.RFC3281Clearance_element", |
594 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
595 | 14 | NULL, HFILL }}, |
596 | 14 | { &hf_pkixac_AAControls_PDU, |
597 | 14 | { "AAControls", "pkixac.AAControls_element", |
598 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
599 | 14 | NULL, HFILL }}, |
600 | 14 | { &hf_pkixac_ProxyInfo_PDU, |
601 | 14 | { "ProxyInfo", "pkixac.ProxyInfo", |
602 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
603 | 14 | NULL, HFILL }}, |
604 | 14 | { &hf_pkixac_digestedObjectType, |
605 | 14 | { "digestedObjectType", "pkixac.digestedObjectType", |
606 | 14 | FT_UINT32, BASE_DEC, VALS(pkixac_T_digestedObjectType_vals), 0, |
607 | 14 | NULL, HFILL }}, |
608 | 14 | { &hf_pkixac_otherObjectTypeID, |
609 | 14 | { "otherObjectTypeID", "pkixac.otherObjectTypeID", |
610 | 14 | FT_OID, BASE_NONE, NULL, 0, |
611 | 14 | "OBJECT_IDENTIFIER", HFILL }}, |
612 | 14 | { &hf_pkixac_digestAlgorithm, |
613 | 14 | { "digestAlgorithm", "pkixac.digestAlgorithm_element", |
614 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
615 | 14 | "AlgorithmIdentifier", HFILL }}, |
616 | 14 | { &hf_pkixac_objectDigest, |
617 | 14 | { "objectDigest", "pkixac.objectDigest", |
618 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
619 | 14 | "BIT_STRING", HFILL }}, |
620 | 14 | { &hf_pkixac_issuer, |
621 | 14 | { "issuer", "pkixac.issuer", |
622 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
623 | 14 | "GeneralNames", HFILL }}, |
624 | 14 | { &hf_pkixac_serial, |
625 | 14 | { "serial", "pkixac.serial", |
626 | 14 | FT_INT32, BASE_DEC, NULL, 0, |
627 | 14 | "CertificateSerialNumber", HFILL }}, |
628 | 14 | { &hf_pkixac_issuerUID, |
629 | 14 | { "issuerUID", "pkixac.issuerUID", |
630 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
631 | 14 | "UniqueIdentifier", HFILL }}, |
632 | 14 | { &hf_pkixac_Targets_item, |
633 | 14 | { "Target", "pkixac.Target", |
634 | 14 | FT_UINT32, BASE_DEC, VALS(pkixac_Target_vals), 0, |
635 | 14 | NULL, HFILL }}, |
636 | 14 | { &hf_pkixac_targetName, |
637 | 14 | { "targetName", "pkixac.targetName", |
638 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
639 | 14 | "GeneralName", HFILL }}, |
640 | 14 | { &hf_pkixac_targetGroup, |
641 | 14 | { "targetGroup", "pkixac.targetGroup", |
642 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
643 | 14 | "GeneralName", HFILL }}, |
644 | 14 | { &hf_pkixac_targetCert, |
645 | 14 | { "targetCert", "pkixac.targetCert_element", |
646 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
647 | 14 | NULL, HFILL }}, |
648 | 14 | { &hf_pkixac_targetCertificate, |
649 | 14 | { "targetCertificate", "pkixac.targetCertificate_element", |
650 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
651 | 14 | "IssuerSerial", HFILL }}, |
652 | 14 | { &hf_pkixac_certDigestInfo, |
653 | 14 | { "certDigestInfo", "pkixac.certDigestInfo_element", |
654 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
655 | 14 | "ObjectDigestInfo", HFILL }}, |
656 | 14 | { &hf_pkixac_policyAuthority, |
657 | 14 | { "policyAuthority", "pkixac.policyAuthority", |
658 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
659 | 14 | "GeneralNames", HFILL }}, |
660 | 14 | { &hf_pkixac_values, |
661 | 14 | { "values", "pkixac.values", |
662 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
663 | 14 | NULL, HFILL }}, |
664 | 14 | { &hf_pkixac_values_item, |
665 | 14 | { "values item", "pkixac.values_item", |
666 | 14 | FT_UINT32, BASE_DEC, VALS(pkixac_T_values_item_vals), 0, |
667 | 14 | NULL, HFILL }}, |
668 | 14 | { &hf_pkixac_octets, |
669 | 14 | { "octets", "pkixac.octets", |
670 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
671 | 14 | "OCTET_STRING", HFILL }}, |
672 | 14 | { &hf_pkixac_oid, |
673 | 14 | { "oid", "pkixac.oid", |
674 | 14 | FT_OID, BASE_NONE, NULL, 0, |
675 | 14 | "OBJECT_IDENTIFIER", HFILL }}, |
676 | 14 | { &hf_pkixac_string, |
677 | 14 | { "string", "pkixac.string", |
678 | 14 | FT_STRING, BASE_NONE, NULL, 0, |
679 | 14 | "UTF8String", HFILL }}, |
680 | 14 | { &hf_pkixac_service, |
681 | 14 | { "service", "pkixac.service", |
682 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
683 | 14 | "GeneralName", HFILL }}, |
684 | 14 | { &hf_pkixac_ident, |
685 | 14 | { "ident", "pkixac.ident", |
686 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
687 | 14 | "GeneralName", HFILL }}, |
688 | 14 | { &hf_pkixac_authInfo, |
689 | 14 | { "authInfo", "pkixac.authInfo", |
690 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
691 | 14 | "OCTET_STRING", HFILL }}, |
692 | 14 | { &hf_pkixac_roleAuthority, |
693 | 14 | { "roleAuthority", "pkixac.roleAuthority", |
694 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
695 | 14 | "GeneralNames", HFILL }}, |
696 | 14 | { &hf_pkixac_roleName, |
697 | 14 | { "roleName", "pkixac.roleName", |
698 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
699 | 14 | "GeneralName", HFILL }}, |
700 | 14 | { &hf_pkixac_policyId, |
701 | 14 | { "policyId", "pkixac.policyId", |
702 | 14 | FT_OID, BASE_NONE, NULL, 0, |
703 | 14 | "OBJECT_IDENTIFIER", HFILL }}, |
704 | 14 | { &hf_pkixac_classList, |
705 | 14 | { "classList", "pkixac.classList", |
706 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
707 | 14 | NULL, HFILL }}, |
708 | 14 | { &hf_pkixac_securityCategories, |
709 | 14 | { "securityCategories", "pkixac.securityCategories", |
710 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
711 | 14 | "SET_OF_SecurityCategory", HFILL }}, |
712 | 14 | { &hf_pkixac_securityCategories_item, |
713 | 14 | { "SecurityCategory", "pkixac.SecurityCategory_element", |
714 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
715 | 14 | NULL, HFILL }}, |
716 | 14 | { &hf_pkixac_type, |
717 | 14 | { "type", "pkixac.type", |
718 | 14 | FT_OID, BASE_NONE, NULL, 0, |
719 | 14 | NULL, HFILL }}, |
720 | 14 | { &hf_pkixac_value, |
721 | 14 | { "value", "pkixac.value_element", |
722 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
723 | 14 | NULL, HFILL }}, |
724 | 14 | { &hf_pkixac_pathLenConstraint, |
725 | 14 | { "pathLenConstraint", "pkixac.pathLenConstraint", |
726 | 14 | FT_UINT64, BASE_DEC, NULL, 0, |
727 | 14 | "INTEGER_0_MAX", HFILL }}, |
728 | 14 | { &hf_pkixac_permittedAttrs, |
729 | 14 | { "permittedAttrs", "pkixac.permittedAttrs", |
730 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
731 | 14 | "AttrSpec", HFILL }}, |
732 | 14 | { &hf_pkixac_excludedAttrs, |
733 | 14 | { "excludedAttrs", "pkixac.excludedAttrs", |
734 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
735 | 14 | "AttrSpec", HFILL }}, |
736 | 14 | { &hf_pkixac_permitUnSpecified, |
737 | 14 | { "permitUnSpecified", "pkixac.permitUnSpecified", |
738 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0, |
739 | 14 | "BOOLEAN", HFILL }}, |
740 | 14 | { &hf_pkixac_AttrSpec_item, |
741 | 14 | { "AttrSpec item", "pkixac.AttrSpec_item", |
742 | 14 | FT_OID, BASE_NONE, NULL, 0, |
743 | 14 | "OBJECT_IDENTIFIER", HFILL }}, |
744 | 14 | { &hf_pkixac_ProxyInfo_item, |
745 | 14 | { "Targets", "pkixac.Targets", |
746 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
747 | 14 | NULL, HFILL }}, |
748 | 14 | { &hf_pkixac_ClassList_unmarked, |
749 | 14 | { "unmarked", "pkixac.ClassList.unmarked", |
750 | 14 | FT_BOOLEAN, 8, NULL, 0x80, |
751 | 14 | NULL, HFILL }}, |
752 | 14 | { &hf_pkixac_ClassList_unclassified, |
753 | 14 | { "unclassified", "pkixac.ClassList.unclassified", |
754 | 14 | FT_BOOLEAN, 8, NULL, 0x40, |
755 | 14 | NULL, HFILL }}, |
756 | 14 | { &hf_pkixac_ClassList_restricted, |
757 | 14 | { "restricted", "pkixac.ClassList.restricted", |
758 | 14 | FT_BOOLEAN, 8, NULL, 0x20, |
759 | 14 | NULL, HFILL }}, |
760 | 14 | { &hf_pkixac_ClassList_confidential, |
761 | 14 | { "confidential", "pkixac.ClassList.confidential", |
762 | 14 | FT_BOOLEAN, 8, NULL, 0x10, |
763 | 14 | NULL, HFILL }}, |
764 | 14 | { &hf_pkixac_ClassList_secret, |
765 | 14 | { "secret", "pkixac.ClassList.secret", |
766 | 14 | FT_BOOLEAN, 8, NULL, 0x08, |
767 | 14 | NULL, HFILL }}, |
768 | 14 | { &hf_pkixac_ClassList_topSecret, |
769 | 14 | { "topSecret", "pkixac.ClassList.topSecret", |
770 | 14 | FT_BOOLEAN, 8, NULL, 0x04, |
771 | 14 | NULL, HFILL }}, |
772 | 14 | }; |
773 | | |
774 | | /* List of subtrees */ |
775 | 14 | static int *ett[] = { |
776 | 14 | &ett_pkixac, |
777 | 14 | &ett_pkixac_ObjectDigestInfo, |
778 | 14 | &ett_pkixac_IssuerSerial, |
779 | 14 | &ett_pkixac_Targets, |
780 | 14 | &ett_pkixac_Target, |
781 | 14 | &ett_pkixac_TargetCert, |
782 | 14 | &ett_pkixac_IetfAttrSyntax, |
783 | 14 | &ett_pkixac_T_values, |
784 | 14 | &ett_pkixac_T_values_item, |
785 | 14 | &ett_pkixac_SvceAuthInfo, |
786 | 14 | &ett_pkixac_RoleSyntax, |
787 | 14 | &ett_pkixac_Clearance, |
788 | 14 | &ett_pkixac_SET_OF_SecurityCategory, |
789 | 14 | &ett_pkixac_RFC3281Clearance, |
790 | 14 | &ett_pkixac_ClassList, |
791 | 14 | &ett_pkixac_SecurityCategory, |
792 | 14 | &ett_pkixac_AAControls, |
793 | 14 | &ett_pkixac_AttrSpec, |
794 | 14 | &ett_pkixac_ProxyInfo, |
795 | 14 | }; |
796 | | |
797 | | /* Register protocol */ |
798 | 14 | proto_pkixac = proto_register_protocol(PNAME, PSNAME, PFNAME); |
799 | | |
800 | | /* Register fields and subtrees */ |
801 | 14 | proto_register_field_array(proto_pkixac, hf, array_length(hf)); |
802 | 14 | proto_register_subtree_array(ett, array_length(ett)); |
803 | | |
804 | | /*--- Syntax registrations ---*/ |
805 | 14 | register_ber_syntax_dissector("Clearance", proto_pkixac, dissect_Clearance_PDU); |
806 | 14 | register_ber_syntax_dissector("RFC3281Clearance", proto_pkixac, dissect_RFC3281Clearance_PDU); |
807 | | |
808 | 14 | } |
809 | | |
810 | | |
811 | | /*--- proto_reg_handoff_pkixac -------------------------------------------*/ |
812 | 14 | void proto_reg_handoff_pkixac(void) { |
813 | 14 | register_ber_oid_dissector("1.3.6.1.5.5.7.1.6", dissect_AAControls_PDU, proto_pkixac, "id-pe-aaControls"); |
814 | 14 | register_ber_oid_dissector("1.3.6.1.5.5.7.1.10", dissect_ProxyInfo_PDU, proto_pkixac, "id-pe-ac-proxying"); |
815 | 14 | register_ber_oid_dissector("1.3.6.1.5.5.7.10.1", dissect_SvceAuthInfo_PDU, proto_pkixac, "id-aca-authenticationInfo"); |
816 | 14 | register_ber_oid_dissector("1.3.6.1.5.5.7.10.2", dissect_SvceAuthInfo_PDU, proto_pkixac, "id-aca-accessIdentity"); |
817 | 14 | register_ber_oid_dissector("1.3.6.1.5.5.7.10.3", dissect_IetfAttrSyntax_PDU, proto_pkixac, "id-aca-chargingIdentity"); |
818 | 14 | register_ber_oid_dissector("1.3.6.1.5.5.7.10.4", dissect_IetfAttrSyntax_PDU, proto_pkixac, "id-aca-group"); |
819 | 14 | register_ber_oid_dissector("2.5.1.5.55", dissect_Clearance_PDU, proto_pkixac, "id-at-clearance"); |
820 | 14 | register_ber_oid_dissector("2.5.4.55", dissect_Clearance_PDU, proto_pkixac, "id-at-clearance"); |
821 | 14 | register_ber_oid_dissector("2.5.4.72", dissect_RoleSyntax_PDU, proto_pkixac, "id-at-role"); |
822 | 14 | register_ber_oid_dissector("2.5.29.55", dissect_Targets_PDU, proto_pkixac, "id-ce-targetInformation"); |
823 | | |
824 | 14 | } |
825 | | |