HACK: 2nd try to match RowsetProperties
[wireshark-wip.git] / epan / dissectors / packet-pkixac.c
blobde0956fae324fd855bca01c5eac24dff2be4760b
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 /* ../../tools/asn2wrs.py -b -p pkixac -c ./pkixac.cnf -s ./packet-pkixac-template -D . -O ../../epan/dissectors PKIXAttributeCertificate.asn */
6 /* Input file: packet-pkixac-template.c */
8 #line 1 "../../asn1/pkixac/packet-pkixac-template.c"
9 /* packet-pkixac.c
11 * Routines for PKIXAttributeCertificate (RFC3281) packet dissection.
13 * Copyright 2010, Stig Bjorlykke <stig@bjorlykke.org>
15 * $Id$
17 * Wireshark - Network traffic analyzer
18 * By Gerald Combs <gerald@wireshark.org>
19 * Copyright 1998 Gerald Combs
21 * This program is free software; you can redistribute it and/or
22 * modify it under the terms of the GNU General Public License
23 * as published by the Free Software Foundation; either version 2
24 * of the License, or (at your option) any later version.
26 * This program is distributed in the hope that it will be useful,
27 * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 * GNU General Public License for more details.
31 * You should have received a copy of the GNU General Public License
32 * along with this program; if not, write to the Free Software
33 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
36 #include "config.h"
38 #include <glib.h>
39 #include <epan/packet.h>
41 #include <epan/asn1.h>
42 #include "packet-ber.h"
43 #include "packet-pkixac.h"
44 #include "packet-pkix1explicit.h"
45 #include "packet-pkix1implicit.h"
46 #include "packet-x509ce.h"
48 #define PNAME "PKIX Attribute Certificate"
49 #define PSNAME "PKIXAC"
50 #define PFNAME "pkixac"
52 /* Initialize the protocol and registered fields */
53 static int proto_pkixac = -1;
55 /*--- Included file: packet-pkixac-hf.c ---*/
56 #line 1 "../../asn1/pkixac/packet-pkixac-hf.c"
57 static int hf_pkixac_Targets_PDU = -1; /* Targets */
58 static int hf_pkixac_IetfAttrSyntax_PDU = -1; /* IetfAttrSyntax */
59 static int hf_pkixac_SvceAuthInfo_PDU = -1; /* SvceAuthInfo */
60 static int hf_pkixac_RoleSyntax_PDU = -1; /* RoleSyntax */
61 static int hf_pkixac_Clearance_PDU = -1; /* Clearance */
62 static int hf_pkixac_RFC3281Clearance_PDU = -1; /* RFC3281Clearance */
63 static int hf_pkixac_AAControls_PDU = -1; /* AAControls */
64 static int hf_pkixac_ProxyInfo_PDU = -1; /* ProxyInfo */
65 static int hf_pkixac_digestedObjectType = -1; /* T_digestedObjectType */
66 static int hf_pkixac_otherObjectTypeID = -1; /* OBJECT_IDENTIFIER */
67 static int hf_pkixac_digestAlgorithm = -1; /* AlgorithmIdentifier */
68 static int hf_pkixac_objectDigest = -1; /* BIT_STRING */
69 static int hf_pkixac_issuer = -1; /* GeneralNames */
70 static int hf_pkixac_serial = -1; /* CertificateSerialNumber */
71 static int hf_pkixac_issuerUID = -1; /* UniqueIdentifier */
72 static int hf_pkixac_Targets_item = -1; /* Target */
73 static int hf_pkixac_targetName = -1; /* GeneralName */
74 static int hf_pkixac_targetGroup = -1; /* GeneralName */
75 static int hf_pkixac_targetCert = -1; /* TargetCert */
76 static int hf_pkixac_targetCertificate = -1; /* IssuerSerial */
77 static int hf_pkixac_certDigestInfo = -1; /* ObjectDigestInfo */
78 static int hf_pkixac_policyAuthority = -1; /* GeneralNames */
79 static int hf_pkixac_values = -1; /* T_values */
80 static int hf_pkixac_values_item = -1; /* T_values_item */
81 static int hf_pkixac_octets = -1; /* OCTET_STRING */
82 static int hf_pkixac_oid = -1; /* OBJECT_IDENTIFIER */
83 static int hf_pkixac_string = -1; /* UTF8String */
84 static int hf_pkixac_service = -1; /* GeneralName */
85 static int hf_pkixac_ident = -1; /* GeneralName */
86 static int hf_pkixac_authInfo = -1; /* OCTET_STRING */
87 static int hf_pkixac_roleAuthority = -1; /* GeneralNames */
88 static int hf_pkixac_roleName = -1; /* GeneralName */
89 static int hf_pkixac_policyId = -1; /* OBJECT_IDENTIFIER */
90 static int hf_pkixac_classList = -1; /* ClassList */
91 static int hf_pkixac_securityCategories = -1; /* SET_OF_SecurityCategory */
92 static int hf_pkixac_securityCategories_item = -1; /* SecurityCategory */
93 static int hf_pkixac_type = -1; /* T_type */
94 static int hf_pkixac_value = -1; /* T_value */
95 static int hf_pkixac_pathLenConstraint = -1; /* INTEGER_0_MAX */
96 static int hf_pkixac_permittedAttrs = -1; /* AttrSpec */
97 static int hf_pkixac_excludedAttrs = -1; /* AttrSpec */
98 static int hf_pkixac_permitUnSpecified = -1; /* BOOLEAN */
99 static int hf_pkixac_AttrSpec_item = -1; /* OBJECT_IDENTIFIER */
100 static int hf_pkixac_ProxyInfo_item = -1; /* Targets */
101 /* named bits */
102 static int hf_pkixac_ClassList_unmarked = -1;
103 static int hf_pkixac_ClassList_unclassified = -1;
104 static int hf_pkixac_ClassList_restricted = -1;
105 static int hf_pkixac_ClassList_confidential = -1;
106 static int hf_pkixac_ClassList_secret = -1;
107 static int hf_pkixac_ClassList_topSecret = -1;
109 /*--- End of included file: packet-pkixac-hf.c ---*/
110 #line 47 "../../asn1/pkixac/packet-pkixac-template.c"
112 /* Initialize the subtree pointers */
113 static gint ett_pkixac = -1;
115 /*--- Included file: packet-pkixac-ett.c ---*/
116 #line 1 "../../asn1/pkixac/packet-pkixac-ett.c"
117 static gint ett_pkixac_ObjectDigestInfo = -1;
118 static gint ett_pkixac_IssuerSerial = -1;
119 static gint ett_pkixac_Targets = -1;
120 static gint ett_pkixac_Target = -1;
121 static gint ett_pkixac_TargetCert = -1;
122 static gint ett_pkixac_IetfAttrSyntax = -1;
123 static gint ett_pkixac_T_values = -1;
124 static gint ett_pkixac_T_values_item = -1;
125 static gint ett_pkixac_SvceAuthInfo = -1;
126 static gint ett_pkixac_RoleSyntax = -1;
127 static gint ett_pkixac_Clearance = -1;
128 static gint ett_pkixac_SET_OF_SecurityCategory = -1;
129 static gint ett_pkixac_RFC3281Clearance = -1;
130 static gint ett_pkixac_ClassList = -1;
131 static gint ett_pkixac_SecurityCategory = -1;
132 static gint ett_pkixac_AAControls = -1;
133 static gint ett_pkixac_AttrSpec = -1;
134 static gint ett_pkixac_ProxyInfo = -1;
136 /*--- End of included file: packet-pkixac-ett.c ---*/
137 #line 51 "../../asn1/pkixac/packet-pkixac-template.c"
139 static const char *object_identifier_id;
142 /*--- Included file: packet-pkixac-fn.c ---*/
143 #line 1 "../../asn1/pkixac/packet-pkixac-fn.c"
145 static const value_string pkixac_T_digestedObjectType_vals[] = {
146 { 0, "publicKey" },
147 { 1, "publicKeyCert" },
148 { 2, "otherObjectTypes" },
149 { 0, NULL }
153 static int
154 dissect_pkixac_T_digestedObjectType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
155 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
156 NULL);
158 return offset;
163 static int
164 dissect_pkixac_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
165 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
167 return offset;
172 static int
173 dissect_pkixac_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
174 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
175 NULL, hf_index, -1,
176 NULL);
178 return offset;
182 static const ber_sequence_t ObjectDigestInfo_sequence[] = {
183 { &hf_pkixac_digestedObjectType, BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_pkixac_T_digestedObjectType },
184 { &hf_pkixac_otherObjectTypeID, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixac_OBJECT_IDENTIFIER },
185 { &hf_pkixac_digestAlgorithm, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
186 { &hf_pkixac_objectDigest , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_pkixac_BIT_STRING },
187 { NULL, 0, 0, 0, NULL }
190 static int
191 dissect_pkixac_ObjectDigestInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
192 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
193 ObjectDigestInfo_sequence, hf_index, ett_pkixac_ObjectDigestInfo);
195 return offset;
199 static const ber_sequence_t IssuerSerial_sequence[] = {
200 { &hf_pkixac_issuer , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509ce_GeneralNames },
201 { &hf_pkixac_serial , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_CertificateSerialNumber },
202 { &hf_pkixac_issuerUID , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_UniqueIdentifier },
203 { NULL, 0, 0, 0, NULL }
206 static int
207 dissect_pkixac_IssuerSerial(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
208 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
209 IssuerSerial_sequence, hf_index, ett_pkixac_IssuerSerial);
211 return offset;
215 static const ber_sequence_t TargetCert_sequence[] = {
216 { &hf_pkixac_targetCertificate, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixac_IssuerSerial },
217 { &hf_pkixac_targetName , BER_CLASS_CON, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_x509ce_GeneralName },
218 { &hf_pkixac_certDigestInfo, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixac_ObjectDigestInfo },
219 { NULL, 0, 0, 0, NULL }
222 static int
223 dissect_pkixac_TargetCert(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
224 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
225 TargetCert_sequence, hf_index, ett_pkixac_TargetCert);
227 return offset;
231 static const value_string pkixac_Target_vals[] = {
232 { 0, "targetName" },
233 { 1, "targetGroup" },
234 { 2, "targetCert" },
235 { 0, NULL }
238 static const ber_choice_t Target_choice[] = {
239 { 0, &hf_pkixac_targetName , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_x509ce_GeneralName },
240 { 1, &hf_pkixac_targetGroup , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_x509ce_GeneralName },
241 { 2, &hf_pkixac_targetCert , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_pkixac_TargetCert },
242 { 0, NULL, 0, 0, 0, NULL }
245 static int
246 dissect_pkixac_Target(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
247 offset = dissect_ber_choice(actx, tree, tvb, offset,
248 Target_choice, hf_index, ett_pkixac_Target,
249 NULL);
251 return offset;
255 static const ber_sequence_t Targets_sequence_of[1] = {
256 { &hf_pkixac_Targets_item , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_pkixac_Target },
259 static int
260 dissect_pkixac_Targets(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
261 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
262 Targets_sequence_of, hf_index, ett_pkixac_Targets);
264 return offset;
269 static int
270 dissect_pkixac_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
271 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
272 NULL);
274 return offset;
279 static int
280 dissect_pkixac_UTF8String(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
281 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
282 actx, tree, tvb, offset, hf_index,
283 NULL);
285 return offset;
289 static const value_string pkixac_T_values_item_vals[] = {
290 { 0, "octets" },
291 { 1, "oid" },
292 { 2, "string" },
293 { 0, NULL }
296 static const ber_choice_t T_values_item_choice[] = {
297 { 0, &hf_pkixac_octets , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_pkixac_OCTET_STRING },
298 { 1, &hf_pkixac_oid , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_pkixac_OBJECT_IDENTIFIER },
299 { 2, &hf_pkixac_string , BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_pkixac_UTF8String },
300 { 0, NULL, 0, 0, 0, NULL }
303 static int
304 dissect_pkixac_T_values_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
305 offset = dissect_ber_choice(actx, tree, tvb, offset,
306 T_values_item_choice, hf_index, ett_pkixac_T_values_item,
307 NULL);
309 return offset;
313 static const ber_sequence_t T_values_sequence_of[1] = {
314 { &hf_pkixac_values_item , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_pkixac_T_values_item },
317 static int
318 dissect_pkixac_T_values(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
319 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
320 T_values_sequence_of, hf_index, ett_pkixac_T_values);
322 return offset;
326 static const ber_sequence_t IetfAttrSyntax_sequence[] = {
327 { &hf_pkixac_policyAuthority, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_x509ce_GeneralNames },
328 { &hf_pkixac_values , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixac_T_values },
329 { NULL, 0, 0, 0, NULL }
332 static int
333 dissect_pkixac_IetfAttrSyntax(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
334 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
335 IetfAttrSyntax_sequence, hf_index, ett_pkixac_IetfAttrSyntax);
337 return offset;
341 static const ber_sequence_t SvceAuthInfo_sequence[] = {
342 { &hf_pkixac_service , BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_x509ce_GeneralName },
343 { &hf_pkixac_ident , BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_x509ce_GeneralName },
344 { &hf_pkixac_authInfo , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixac_OCTET_STRING },
345 { NULL, 0, 0, 0, NULL }
348 static int
349 dissect_pkixac_SvceAuthInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
350 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
351 SvceAuthInfo_sequence, hf_index, ett_pkixac_SvceAuthInfo);
353 return offset;
357 static const ber_sequence_t RoleSyntax_sequence[] = {
358 { &hf_pkixac_roleAuthority, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_x509ce_GeneralNames },
359 { &hf_pkixac_roleName , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_x509ce_GeneralName },
360 { NULL, 0, 0, 0, NULL }
363 static int
364 dissect_pkixac_RoleSyntax(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
365 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
366 RoleSyntax_sequence, hf_index, ett_pkixac_RoleSyntax);
368 return offset;
372 static const asn_namedbit ClassList_bits[] = {
373 { 0, &hf_pkixac_ClassList_unmarked, -1, -1, "unmarked", NULL },
374 { 1, &hf_pkixac_ClassList_unclassified, -1, -1, "unclassified", NULL },
375 { 2, &hf_pkixac_ClassList_restricted, -1, -1, "restricted", NULL },
376 { 3, &hf_pkixac_ClassList_confidential, -1, -1, "confidential", NULL },
377 { 4, &hf_pkixac_ClassList_secret, -1, -1, "secret", NULL },
378 { 5, &hf_pkixac_ClassList_topSecret, -1, -1, "topSecret", NULL },
379 { 0, NULL, 0, 0, NULL, NULL }
382 static int
383 dissect_pkixac_ClassList(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
384 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
385 ClassList_bits, hf_index, ett_pkixac_ClassList,
386 NULL);
388 return offset;
393 static int
394 dissect_pkixac_T_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
395 offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &object_identifier_id);
397 return offset;
402 static int
403 dissect_pkixac_T_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
404 #line 63 "../../asn1/pkixac/pkixac.cnf"
405 if (object_identifier_id)
406 offset = call_ber_oid_callback (object_identifier_id, tvb, offset, actx->pinfo, tree, NULL);
410 return offset;
414 static const ber_sequence_t SecurityCategory_sequence[] = {
415 { &hf_pkixac_type , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_pkixac_T_type },
416 { &hf_pkixac_value , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_pkixac_T_value },
417 { NULL, 0, 0, 0, NULL }
420 static int
421 dissect_pkixac_SecurityCategory(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
422 #line 56 "../../asn1/pkixac/pkixac.cnf"
423 object_identifier_id = NULL;
424 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
425 SecurityCategory_sequence, hf_index, ett_pkixac_SecurityCategory);
430 return offset;
434 static const ber_sequence_t SET_OF_SecurityCategory_set_of[1] = {
435 { &hf_pkixac_securityCategories_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixac_SecurityCategory },
438 static int
439 dissect_pkixac_SET_OF_SecurityCategory(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
440 offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset,
441 SET_OF_SecurityCategory_set_of, hf_index, ett_pkixac_SET_OF_SecurityCategory);
443 return offset;
447 static const ber_sequence_t Clearance_sequence[] = {
448 { &hf_pkixac_policyId , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_pkixac_OBJECT_IDENTIFIER },
449 { &hf_pkixac_classList , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixac_ClassList },
450 { &hf_pkixac_securityCategories, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixac_SET_OF_SecurityCategory },
451 { NULL, 0, 0, 0, NULL }
454 static int
455 dissect_pkixac_Clearance(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
456 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
457 Clearance_sequence, hf_index, ett_pkixac_Clearance);
459 return offset;
463 static const ber_sequence_t RFC3281Clearance_sequence[] = {
464 { &hf_pkixac_policyId , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_pkixac_OBJECT_IDENTIFIER },
465 { &hf_pkixac_classList , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkixac_ClassList },
466 { &hf_pkixac_securityCategories, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkixac_SET_OF_SecurityCategory },
467 { NULL, 0, 0, 0, NULL }
470 static int
471 dissect_pkixac_RFC3281Clearance(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
472 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
473 RFC3281Clearance_sequence, hf_index, ett_pkixac_RFC3281Clearance);
475 return offset;
480 static int
481 dissect_pkixac_INTEGER_0_MAX(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
482 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
483 NULL);
485 return offset;
489 static const ber_sequence_t AttrSpec_sequence_of[1] = {
490 { &hf_pkixac_AttrSpec_item, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_pkixac_OBJECT_IDENTIFIER },
493 static int
494 dissect_pkixac_AttrSpec(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
495 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
496 AttrSpec_sequence_of, hf_index, ett_pkixac_AttrSpec);
498 return offset;
503 static int
504 dissect_pkixac_BOOLEAN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
505 offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
507 return offset;
511 static const ber_sequence_t AAControls_sequence[] = {
512 { &hf_pkixac_pathLenConstraint, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixac_INTEGER_0_MAX },
513 { &hf_pkixac_permittedAttrs, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkixac_AttrSpec },
514 { &hf_pkixac_excludedAttrs, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkixac_AttrSpec },
515 { &hf_pkixac_permitUnSpecified, BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixac_BOOLEAN },
516 { NULL, 0, 0, 0, NULL }
519 static int
520 dissect_pkixac_AAControls(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
521 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
522 AAControls_sequence, hf_index, ett_pkixac_AAControls);
524 return offset;
528 static const ber_sequence_t ProxyInfo_sequence_of[1] = {
529 { &hf_pkixac_ProxyInfo_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixac_Targets },
532 static int
533 dissect_pkixac_ProxyInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
534 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
535 ProxyInfo_sequence_of, hf_index, ett_pkixac_ProxyInfo);
537 return offset;
540 /*--- PDUs ---*/
542 static void dissect_Targets_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
543 asn1_ctx_t asn1_ctx;
544 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
545 dissect_pkixac_Targets(FALSE, tvb, 0, &asn1_ctx, tree, hf_pkixac_Targets_PDU);
547 static void dissect_IetfAttrSyntax_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
548 asn1_ctx_t asn1_ctx;
549 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
550 dissect_pkixac_IetfAttrSyntax(FALSE, tvb, 0, &asn1_ctx, tree, hf_pkixac_IetfAttrSyntax_PDU);
552 static void dissect_SvceAuthInfo_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
553 asn1_ctx_t asn1_ctx;
554 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
555 dissect_pkixac_SvceAuthInfo(FALSE, tvb, 0, &asn1_ctx, tree, hf_pkixac_SvceAuthInfo_PDU);
557 static void dissect_RoleSyntax_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
558 asn1_ctx_t asn1_ctx;
559 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
560 dissect_pkixac_RoleSyntax(FALSE, tvb, 0, &asn1_ctx, tree, hf_pkixac_RoleSyntax_PDU);
562 static void dissect_Clearance_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
563 asn1_ctx_t asn1_ctx;
564 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
565 dissect_pkixac_Clearance(FALSE, tvb, 0, &asn1_ctx, tree, hf_pkixac_Clearance_PDU);
567 static void dissect_RFC3281Clearance_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
568 asn1_ctx_t asn1_ctx;
569 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
570 dissect_pkixac_RFC3281Clearance(FALSE, tvb, 0, &asn1_ctx, tree, hf_pkixac_RFC3281Clearance_PDU);
572 static void dissect_AAControls_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
573 asn1_ctx_t asn1_ctx;
574 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
575 dissect_pkixac_AAControls(FALSE, tvb, 0, &asn1_ctx, tree, hf_pkixac_AAControls_PDU);
577 static void dissect_ProxyInfo_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
578 asn1_ctx_t asn1_ctx;
579 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
580 dissect_pkixac_ProxyInfo(FALSE, tvb, 0, &asn1_ctx, tree, hf_pkixac_ProxyInfo_PDU);
584 /*--- End of included file: packet-pkixac-fn.c ---*/
585 #line 55 "../../asn1/pkixac/packet-pkixac-template.c"
587 /*--- proto_register_pkixac ----------------------------------------------*/
588 void proto_register_pkixac(void) {
590 /* List of fields */
591 static hf_register_info hf[] = {
593 /*--- Included file: packet-pkixac-hfarr.c ---*/
594 #line 1 "../../asn1/pkixac/packet-pkixac-hfarr.c"
595 { &hf_pkixac_Targets_PDU,
596 { "Targets", "pkixac.Targets",
597 FT_UINT32, BASE_DEC, NULL, 0,
598 NULL, HFILL }},
599 { &hf_pkixac_IetfAttrSyntax_PDU,
600 { "IetfAttrSyntax", "pkixac.IetfAttrSyntax_element",
601 FT_NONE, BASE_NONE, NULL, 0,
602 NULL, HFILL }},
603 { &hf_pkixac_SvceAuthInfo_PDU,
604 { "SvceAuthInfo", "pkixac.SvceAuthInfo_element",
605 FT_NONE, BASE_NONE, NULL, 0,
606 NULL, HFILL }},
607 { &hf_pkixac_RoleSyntax_PDU,
608 { "RoleSyntax", "pkixac.RoleSyntax_element",
609 FT_NONE, BASE_NONE, NULL, 0,
610 NULL, HFILL }},
611 { &hf_pkixac_Clearance_PDU,
612 { "Clearance", "pkixac.Clearance_element",
613 FT_NONE, BASE_NONE, NULL, 0,
614 NULL, HFILL }},
615 { &hf_pkixac_RFC3281Clearance_PDU,
616 { "RFC3281Clearance", "pkixac.RFC3281Clearance_element",
617 FT_NONE, BASE_NONE, NULL, 0,
618 NULL, HFILL }},
619 { &hf_pkixac_AAControls_PDU,
620 { "AAControls", "pkixac.AAControls_element",
621 FT_NONE, BASE_NONE, NULL, 0,
622 NULL, HFILL }},
623 { &hf_pkixac_ProxyInfo_PDU,
624 { "ProxyInfo", "pkixac.ProxyInfo",
625 FT_UINT32, BASE_DEC, NULL, 0,
626 NULL, HFILL }},
627 { &hf_pkixac_digestedObjectType,
628 { "digestedObjectType", "pkixac.digestedObjectType",
629 FT_UINT32, BASE_DEC, VALS(pkixac_T_digestedObjectType_vals), 0,
630 NULL, HFILL }},
631 { &hf_pkixac_otherObjectTypeID,
632 { "otherObjectTypeID", "pkixac.otherObjectTypeID",
633 FT_OID, BASE_NONE, NULL, 0,
634 "OBJECT_IDENTIFIER", HFILL }},
635 { &hf_pkixac_digestAlgorithm,
636 { "digestAlgorithm", "pkixac.digestAlgorithm_element",
637 FT_NONE, BASE_NONE, NULL, 0,
638 "AlgorithmIdentifier", HFILL }},
639 { &hf_pkixac_objectDigest,
640 { "objectDigest", "pkixac.objectDigest",
641 FT_BYTES, BASE_NONE, NULL, 0,
642 "BIT_STRING", HFILL }},
643 { &hf_pkixac_issuer,
644 { "issuer", "pkixac.issuer",
645 FT_UINT32, BASE_DEC, NULL, 0,
646 "GeneralNames", HFILL }},
647 { &hf_pkixac_serial,
648 { "serial", "pkixac.serial",
649 FT_INT32, BASE_DEC, NULL, 0,
650 "CertificateSerialNumber", HFILL }},
651 { &hf_pkixac_issuerUID,
652 { "issuerUID", "pkixac.issuerUID",
653 FT_BYTES, BASE_NONE, NULL, 0,
654 "UniqueIdentifier", HFILL }},
655 { &hf_pkixac_Targets_item,
656 { "Target", "pkixac.Target",
657 FT_UINT32, BASE_DEC, VALS(pkixac_Target_vals), 0,
658 NULL, HFILL }},
659 { &hf_pkixac_targetName,
660 { "targetName", "pkixac.targetName",
661 FT_UINT32, BASE_DEC, NULL, 0,
662 "GeneralName", HFILL }},
663 { &hf_pkixac_targetGroup,
664 { "targetGroup", "pkixac.targetGroup",
665 FT_UINT32, BASE_DEC, NULL, 0,
666 "GeneralName", HFILL }},
667 { &hf_pkixac_targetCert,
668 { "targetCert", "pkixac.targetCert_element",
669 FT_NONE, BASE_NONE, NULL, 0,
670 NULL, HFILL }},
671 { &hf_pkixac_targetCertificate,
672 { "targetCertificate", "pkixac.targetCertificate_element",
673 FT_NONE, BASE_NONE, NULL, 0,
674 "IssuerSerial", HFILL }},
675 { &hf_pkixac_certDigestInfo,
676 { "certDigestInfo", "pkixac.certDigestInfo_element",
677 FT_NONE, BASE_NONE, NULL, 0,
678 "ObjectDigestInfo", HFILL }},
679 { &hf_pkixac_policyAuthority,
680 { "policyAuthority", "pkixac.policyAuthority",
681 FT_UINT32, BASE_DEC, NULL, 0,
682 "GeneralNames", HFILL }},
683 { &hf_pkixac_values,
684 { "values", "pkixac.values",
685 FT_UINT32, BASE_DEC, NULL, 0,
686 NULL, HFILL }},
687 { &hf_pkixac_values_item,
688 { "values item", "pkixac.values_item",
689 FT_UINT32, BASE_DEC, VALS(pkixac_T_values_item_vals), 0,
690 NULL, HFILL }},
691 { &hf_pkixac_octets,
692 { "octets", "pkixac.octets",
693 FT_BYTES, BASE_NONE, NULL, 0,
694 "OCTET_STRING", HFILL }},
695 { &hf_pkixac_oid,
696 { "oid", "pkixac.oid",
697 FT_OID, BASE_NONE, NULL, 0,
698 "OBJECT_IDENTIFIER", HFILL }},
699 { &hf_pkixac_string,
700 { "string", "pkixac.string",
701 FT_STRING, BASE_NONE, NULL, 0,
702 "UTF8String", HFILL }},
703 { &hf_pkixac_service,
704 { "service", "pkixac.service",
705 FT_UINT32, BASE_DEC, NULL, 0,
706 "GeneralName", HFILL }},
707 { &hf_pkixac_ident,
708 { "ident", "pkixac.ident",
709 FT_UINT32, BASE_DEC, NULL, 0,
710 "GeneralName", HFILL }},
711 { &hf_pkixac_authInfo,
712 { "authInfo", "pkixac.authInfo",
713 FT_BYTES, BASE_NONE, NULL, 0,
714 "OCTET_STRING", HFILL }},
715 { &hf_pkixac_roleAuthority,
716 { "roleAuthority", "pkixac.roleAuthority",
717 FT_UINT32, BASE_DEC, NULL, 0,
718 "GeneralNames", HFILL }},
719 { &hf_pkixac_roleName,
720 { "roleName", "pkixac.roleName",
721 FT_UINT32, BASE_DEC, NULL, 0,
722 "GeneralName", HFILL }},
723 { &hf_pkixac_policyId,
724 { "policyId", "pkixac.policyId",
725 FT_OID, BASE_NONE, NULL, 0,
726 "OBJECT_IDENTIFIER", HFILL }},
727 { &hf_pkixac_classList,
728 { "classList", "pkixac.classList",
729 FT_BYTES, BASE_NONE, NULL, 0,
730 NULL, HFILL }},
731 { &hf_pkixac_securityCategories,
732 { "securityCategories", "pkixac.securityCategories",
733 FT_UINT32, BASE_DEC, NULL, 0,
734 "SET_OF_SecurityCategory", HFILL }},
735 { &hf_pkixac_securityCategories_item,
736 { "SecurityCategory", "pkixac.SecurityCategory_element",
737 FT_NONE, BASE_NONE, NULL, 0,
738 NULL, HFILL }},
739 { &hf_pkixac_type,
740 { "type", "pkixac.type",
741 FT_OID, BASE_NONE, NULL, 0,
742 NULL, HFILL }},
743 { &hf_pkixac_value,
744 { "value", "pkixac.value_element",
745 FT_NONE, BASE_NONE, NULL, 0,
746 NULL, HFILL }},
747 { &hf_pkixac_pathLenConstraint,
748 { "pathLenConstraint", "pkixac.pathLenConstraint",
749 FT_UINT32, BASE_DEC, NULL, 0,
750 "INTEGER_0_MAX", HFILL }},
751 { &hf_pkixac_permittedAttrs,
752 { "permittedAttrs", "pkixac.permittedAttrs",
753 FT_UINT32, BASE_DEC, NULL, 0,
754 "AttrSpec", HFILL }},
755 { &hf_pkixac_excludedAttrs,
756 { "excludedAttrs", "pkixac.excludedAttrs",
757 FT_UINT32, BASE_DEC, NULL, 0,
758 "AttrSpec", HFILL }},
759 { &hf_pkixac_permitUnSpecified,
760 { "permitUnSpecified", "pkixac.permitUnSpecified",
761 FT_BOOLEAN, BASE_NONE, NULL, 0,
762 "BOOLEAN", HFILL }},
763 { &hf_pkixac_AttrSpec_item,
764 { "AttrSpec item", "pkixac.AttrSpec_item",
765 FT_OID, BASE_NONE, NULL, 0,
766 "OBJECT_IDENTIFIER", HFILL }},
767 { &hf_pkixac_ProxyInfo_item,
768 { "Targets", "pkixac.Targets",
769 FT_UINT32, BASE_DEC, NULL, 0,
770 NULL, HFILL }},
771 { &hf_pkixac_ClassList_unmarked,
772 { "unmarked", "pkixac.unmarked",
773 FT_BOOLEAN, 8, NULL, 0x80,
774 NULL, HFILL }},
775 { &hf_pkixac_ClassList_unclassified,
776 { "unclassified", "pkixac.unclassified",
777 FT_BOOLEAN, 8, NULL, 0x40,
778 NULL, HFILL }},
779 { &hf_pkixac_ClassList_restricted,
780 { "restricted", "pkixac.restricted",
781 FT_BOOLEAN, 8, NULL, 0x20,
782 NULL, HFILL }},
783 { &hf_pkixac_ClassList_confidential,
784 { "confidential", "pkixac.confidential",
785 FT_BOOLEAN, 8, NULL, 0x10,
786 NULL, HFILL }},
787 { &hf_pkixac_ClassList_secret,
788 { "secret", "pkixac.secret",
789 FT_BOOLEAN, 8, NULL, 0x08,
790 NULL, HFILL }},
791 { &hf_pkixac_ClassList_topSecret,
792 { "topSecret", "pkixac.topSecret",
793 FT_BOOLEAN, 8, NULL, 0x04,
794 NULL, HFILL }},
796 /*--- End of included file: packet-pkixac-hfarr.c ---*/
797 #line 62 "../../asn1/pkixac/packet-pkixac-template.c"
800 /* List of subtrees */
801 static gint *ett[] = {
802 &ett_pkixac,
804 /*--- Included file: packet-pkixac-ettarr.c ---*/
805 #line 1 "../../asn1/pkixac/packet-pkixac-ettarr.c"
806 &ett_pkixac_ObjectDigestInfo,
807 &ett_pkixac_IssuerSerial,
808 &ett_pkixac_Targets,
809 &ett_pkixac_Target,
810 &ett_pkixac_TargetCert,
811 &ett_pkixac_IetfAttrSyntax,
812 &ett_pkixac_T_values,
813 &ett_pkixac_T_values_item,
814 &ett_pkixac_SvceAuthInfo,
815 &ett_pkixac_RoleSyntax,
816 &ett_pkixac_Clearance,
817 &ett_pkixac_SET_OF_SecurityCategory,
818 &ett_pkixac_RFC3281Clearance,
819 &ett_pkixac_ClassList,
820 &ett_pkixac_SecurityCategory,
821 &ett_pkixac_AAControls,
822 &ett_pkixac_AttrSpec,
823 &ett_pkixac_ProxyInfo,
825 /*--- End of included file: packet-pkixac-ettarr.c ---*/
826 #line 68 "../../asn1/pkixac/packet-pkixac-template.c"
829 /* Register protocol */
830 proto_pkixac = proto_register_protocol(PNAME, PSNAME, PFNAME);
832 /* Register fields and subtrees */
833 proto_register_field_array(proto_pkixac, hf, array_length(hf));
834 proto_register_subtree_array(ett, array_length(ett));
837 /*--- Included file: packet-pkixac-syn-reg.c ---*/
838 #line 1 "../../asn1/pkixac/packet-pkixac-syn-reg.c"
839 /*--- Syntax registrations ---*/
840 register_ber_syntax_dissector("Clearance", proto_pkixac, dissect_Clearance_PDU);
841 register_ber_syntax_dissector("RFC3281Clearance", proto_pkixac, dissect_RFC3281Clearance_PDU);
843 /*--- End of included file: packet-pkixac-syn-reg.c ---*/
844 #line 78 "../../asn1/pkixac/packet-pkixac-template.c"
849 /*--- proto_reg_handoff_pkixac -------------------------------------------*/
850 void proto_reg_handoff_pkixac(void) {
852 /*--- Included file: packet-pkixac-dis-tab.c ---*/
853 #line 1 "../../asn1/pkixac/packet-pkixac-dis-tab.c"
854 register_ber_oid_dissector("1.3.6.1.5.5.7.1.6", dissect_AAControls_PDU, proto_pkixac, "id-pe-aaControls");
855 register_ber_oid_dissector("1.3.6.1.5.5.7.1.10", dissect_ProxyInfo_PDU, proto_pkixac, "id-pe-ac-proxying");
856 register_ber_oid_dissector("1.3.6.1.5.5.7.10.1", dissect_SvceAuthInfo_PDU, proto_pkixac, "id-aca-authenticationInfo");
857 register_ber_oid_dissector("1.3.6.1.5.5.7.10.2", dissect_SvceAuthInfo_PDU, proto_pkixac, "id-aca-accessIdentity");
858 register_ber_oid_dissector("1.3.6.1.5.5.7.10.3", dissect_IetfAttrSyntax_PDU, proto_pkixac, "id-aca-chargingIdentity");
859 register_ber_oid_dissector("1.3.6.1.5.5.7.10.4", dissect_IetfAttrSyntax_PDU, proto_pkixac, "id-aca-group");
860 register_ber_oid_dissector("2.5.1.5.55", dissect_Clearance_PDU, proto_pkixac, "id-at-clearance");
861 register_ber_oid_dissector("2.5.4.55", dissect_Clearance_PDU, proto_pkixac, "id-at-clearance");
862 register_ber_oid_dissector("2.5.4.72", dissect_RoleSyntax_PDU, proto_pkixac, "id-at-role");
863 register_ber_oid_dissector("2.5.29.55", dissect_Targets_PDU, proto_pkixac, "id-ce-targetInformation");
866 /*--- End of included file: packet-pkixac-dis-tab.c ---*/
867 #line 85 "../../asn1/pkixac/packet-pkixac-template.c"