1 /* Do not modify this file. */
2 /* It is created automatically by the ASN.1 to Wireshark dissector compiler */
3 /* .\packet-x509af.c */
4 /* ../../tools/asn2wrs.py -b -e -p x509af -c x509af.cnf -s packet-x509af-template AuthenticationFramework.asn */
6 /* Input file: packet-x509af-template.c */
8 #line 1 "packet-x509af-template.c"
10 * Routines for X.509 Authentication Framework packet dissection
11 * Ronnie Sahlberg 2004
15 * Wireshark - Network traffic analyzer
16 * By Gerald Combs <gerald@wireshark.org>
17 * Copyright 1998 Gerald Combs
19 * This program is free software; you can redistribute it and/or
20 * modify it under the terms of the GNU General Public License
21 * as published by the Free Software Foundation; either version 2
22 * of the License, or (at your option) any later version.
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
29 * You should have received a copy of the GNU General Public License
30 * along with this program; if not, write to the Free Software
31 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
39 #include <epan/packet.h>
40 #include <epan/conversation.h>
41 #include <epan/oid_resolv.h>
42 #include <epan/asn1.h>
47 #include "packet-ber.h"
48 #include "packet-x509af.h"
49 #include "packet-x509ce.h"
50 #include "packet-x509if.h"
51 #include "packet-x509sat.h"
52 #include "packet-ldap.h"
54 #define PNAME "X.509 Authentication Framework"
55 #define PSNAME "X509AF"
56 #define PFNAME "x509af"
58 /* Initialize the protocol and registered fields */
59 static int proto_x509af = -1;
60 static int hf_x509af_algorithm_id = -1;
61 static int hf_x509af_extension_id = -1;
63 /*--- Included file: packet-x509af-hf.c ---*/
64 #line 1 "packet-x509af-hf.c"
65 static int hf_x509af_Certificate_PDU = -1; /* Certificate */
66 static int hf_x509af_CertificatePair_PDU = -1; /* CertificatePair */
67 static int hf_x509af_CertificateList_PDU = -1; /* CertificateList */
68 static int hf_x509af_AttributeCertificate_PDU = -1; /* AttributeCertificate */
69 static int hf_x509af_DSS_Params_PDU = -1; /* DSS_Params */
70 static int hf_x509af_signedCertificate = -1; /* T_signedCertificate */
71 static int hf_x509af_version = -1; /* Version */
72 static int hf_x509af_serialNumber = -1; /* CertificateSerialNumber */
73 static int hf_x509af_signature = -1; /* AlgorithmIdentifier */
74 static int hf_x509af_issuer = -1; /* Name */
75 static int hf_x509af_validity = -1; /* Validity */
76 static int hf_x509af_subject = -1; /* SubjectName */
77 static int hf_x509af_subjectPublicKeyInfo = -1; /* SubjectPublicKeyInfo */
78 static int hf_x509af_issuerUniqueIdentifier = -1; /* UniqueIdentifier */
79 static int hf_x509af_subjectUniqueIdentifier = -1; /* UniqueIdentifier */
80 static int hf_x509af_extensions = -1; /* Extensions */
81 static int hf_x509af_algorithmIdentifier = -1; /* AlgorithmIdentifier */
82 static int hf_x509af_encrypted = -1; /* BIT_STRING */
83 static int hf_x509af_rdnSequence = -1; /* RDNSequence */
84 static int hf_x509af_algorithmId = -1; /* T_algorithmId */
85 static int hf_x509af_parameters = -1; /* T_parameters */
86 static int hf_x509af_notBefore = -1; /* Time */
87 static int hf_x509af_notAfter = -1; /* Time */
88 static int hf_x509af_algorithm = -1; /* AlgorithmIdentifier */
89 static int hf_x509af_subjectPublicKey = -1; /* BIT_STRING */
90 static int hf_x509af_utcTime = -1; /* UTCTime */
91 static int hf_x509af_generalizedTime = -1; /* GeneralizedTime */
92 static int hf_x509af_Extensions_item = -1; /* Extension */
93 static int hf_x509af_extnId = -1; /* T_extnId */
94 static int hf_x509af_critical = -1; /* BOOLEAN */
95 static int hf_x509af_extnValue = -1; /* T_extnValue */
96 static int hf_x509af_userCertificate = -1; /* Certificate */
97 static int hf_x509af_certificationPath = -1; /* ForwardCertificationPath */
98 static int hf_x509af_ForwardCertificationPath_item = -1; /* CrossCertificates */
99 static int hf_x509af_CrossCertificates_item = -1; /* Certificate */
100 static int hf_x509af_theCACertificates = -1; /* SEQUENCE_OF_CertificatePair */
101 static int hf_x509af_theCACertificates_item = -1; /* CertificatePair */
102 static int hf_x509af_issuedByThisCA = -1; /* Certificate */
103 static int hf_x509af_issuedToThisCA = -1; /* Certificate */
104 static int hf_x509af_signedCertificateList = -1; /* T_signedCertificateList */
105 static int hf_x509af_thisUpdate = -1; /* Time */
106 static int hf_x509af_nextUpdate = -1; /* Time */
107 static int hf_x509af_revokedCertificates = -1; /* T_revokedCertificates */
108 static int hf_x509af_revokedCertificates_item = -1; /* T_revokedCertificates_item */
109 static int hf_x509af_revokedUserCertificate = -1; /* CertificateSerialNumber */
110 static int hf_x509af_revocationDate = -1; /* Time */
111 static int hf_x509af_crlEntryExtensions = -1; /* Extensions */
112 static int hf_x509af_crlExtensions = -1; /* Extensions */
113 static int hf_x509af_attributeCertificate = -1; /* AttributeCertificate */
114 static int hf_x509af_acPath = -1; /* SEQUENCE_OF_ACPathData */
115 static int hf_x509af_acPath_item = -1; /* ACPathData */
116 static int hf_x509af_certificate = -1; /* Certificate */
117 static int hf_x509af_signedAttributeCertificateInfo = -1; /* AttributeCertificateInfo */
118 static int hf_x509af_info_subject = -1; /* InfoSubject */
119 static int hf_x509af_baseCertificateID = -1; /* IssuerSerial */
120 static int hf_x509af_infoSubjectName = -1; /* GeneralNames */
121 static int hf_x509af_issuerName = -1; /* GeneralNames */
122 static int hf_x509af_attCertValidityPeriod = -1; /* AttCertValidityPeriod */
123 static int hf_x509af_attributes = -1; /* SEQUENCE_OF_Attribute */
124 static int hf_x509af_attributes_item = -1; /* Attribute */
125 static int hf_x509af_issuerUniqueID = -1; /* UniqueIdentifier */
126 static int hf_x509af_serial = -1; /* CertificateSerialNumber */
127 static int hf_x509af_issuerUID = -1; /* UniqueIdentifier */
128 static int hf_x509af_notBeforeTime = -1; /* GeneralizedTime */
129 static int hf_x509af_notAfterTime = -1; /* GeneralizedTime */
130 static int hf_x509af_assertion_subject = -1; /* AssertionSubject */
131 static int hf_x509af_assertionSubjectName = -1; /* SubjectName */
132 static int hf_x509af_assertionIssuer = -1; /* Name */
133 static int hf_x509af_attCertValidity = -1; /* GeneralizedTime */
134 static int hf_x509af_attType = -1; /* SET_OF_AttributeType */
135 static int hf_x509af_attType_item = -1; /* AttributeType */
136 static int hf_x509af_p = -1; /* INTEGER */
137 static int hf_x509af_q = -1; /* INTEGER */
138 static int hf_x509af_g = -1; /* INTEGER */
140 /*--- End of included file: packet-x509af-hf.c ---*/
141 #line 55 "packet-x509af-template.c"
143 /* Initialize the subtree pointers */
144 static gint ett_pkix_crl = -1;
146 /*--- Included file: packet-x509af-ett.c ---*/
147 #line 1 "packet-x509af-ett.c"
148 static gint ett_x509af_Certificate = -1;
149 static gint ett_x509af_T_signedCertificate = -1;
150 static gint ett_x509af_SubjectName = -1;
151 static gint ett_x509af_AlgorithmIdentifier = -1;
152 static gint ett_x509af_Validity = -1;
153 static gint ett_x509af_SubjectPublicKeyInfo = -1;
154 static gint ett_x509af_Time = -1;
155 static gint ett_x509af_Extensions = -1;
156 static gint ett_x509af_Extension = -1;
157 static gint ett_x509af_Certificates = -1;
158 static gint ett_x509af_ForwardCertificationPath = -1;
159 static gint ett_x509af_CrossCertificates = -1;
160 static gint ett_x509af_CertificationPath = -1;
161 static gint ett_x509af_SEQUENCE_OF_CertificatePair = -1;
162 static gint ett_x509af_CertificatePair = -1;
163 static gint ett_x509af_CertificateList = -1;
164 static gint ett_x509af_T_signedCertificateList = -1;
165 static gint ett_x509af_T_revokedCertificates = -1;
166 static gint ett_x509af_T_revokedCertificates_item = -1;
167 static gint ett_x509af_AttributeCertificationPath = -1;
168 static gint ett_x509af_SEQUENCE_OF_ACPathData = -1;
169 static gint ett_x509af_ACPathData = -1;
170 static gint ett_x509af_AttributeCertificate = -1;
171 static gint ett_x509af_AttributeCertificateInfo = -1;
172 static gint ett_x509af_InfoSubject = -1;
173 static gint ett_x509af_SEQUENCE_OF_Attribute = -1;
174 static gint ett_x509af_IssuerSerial = -1;
175 static gint ett_x509af_AttCertValidityPeriod = -1;
176 static gint ett_x509af_AttributeCertificateAssertion = -1;
177 static gint ett_x509af_AssertionSubject = -1;
178 static gint ett_x509af_SET_OF_AttributeType = -1;
179 static gint ett_x509af_DSS_Params = -1;
181 /*--- End of included file: packet-x509af-ett.c ---*/
182 #line 59 "packet-x509af-template.c"
184 static const char *algorithm_id;
185 static const char *extension_id;
188 /*--- Included file: packet-x509af-fn.c ---*/
189 #line 1 "packet-x509af-fn.c"
190 /*--- Fields for imported types ---*/
192 static int dissect_issuer(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
193 return dissect_x509if_Name(FALSE, tvb, offset, actx, tree, hf_x509af_issuer);
195 static int dissect_issuerUniqueIdentifier_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
196 return dissect_x509sat_UniqueIdentifier(TRUE, tvb, offset, actx, tree, hf_x509af_issuerUniqueIdentifier);
198 static int dissect_subjectUniqueIdentifier_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
199 return dissect_x509sat_UniqueIdentifier(TRUE, tvb, offset, actx, tree, hf_x509af_subjectUniqueIdentifier);
201 static int dissect_rdnSequence(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
202 return dissect_x509if_RDNSequence(FALSE, tvb, offset, actx, tree, hf_x509af_rdnSequence);
204 static int dissect_infoSubjectName(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
205 return dissect_x509ce_GeneralNames(FALSE, tvb, offset, actx, tree, hf_x509af_infoSubjectName);
207 static int dissect_issuerName(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
208 return dissect_x509ce_GeneralNames(FALSE, tvb, offset, actx, tree, hf_x509af_issuerName);
210 static int dissect_attributes_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
211 return dissect_x509if_Attribute(FALSE, tvb, offset, actx, tree, hf_x509af_attributes_item);
213 static int dissect_issuerUniqueID(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
214 return dissect_x509sat_UniqueIdentifier(FALSE, tvb, offset, actx, tree, hf_x509af_issuerUniqueID);
216 static int dissect_issuerUID(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
217 return dissect_x509sat_UniqueIdentifier(FALSE, tvb, offset, actx, tree, hf_x509af_issuerUID);
219 static int dissect_assertionIssuer(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
220 return dissect_x509if_Name(FALSE, tvb, offset, actx, tree, hf_x509af_assertionIssuer);
222 static int dissect_attType_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
223 return dissect_x509if_AttributeType(FALSE, tvb, offset, actx, tree, hf_x509af_attType_item);
227 const value_string x509af_Version_vals[] = {
236 dissect_x509af_Version(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
237 offset = dissect_ber_integer(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index,
242 static int dissect_version(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
243 return dissect_x509af_Version(FALSE, tvb, offset, actx, tree, hf_x509af_version);
249 dissect_x509af_CertificateSerialNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
250 offset = dissect_ber_integer(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index,
255 static int dissect_serialNumber(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
256 return dissect_x509af_CertificateSerialNumber(FALSE, tvb, offset, actx, tree, hf_x509af_serialNumber);
258 static int dissect_revokedUserCertificate(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
259 return dissect_x509af_CertificateSerialNumber(FALSE, tvb, offset, actx, tree, hf_x509af_revokedUserCertificate);
261 static int dissect_serial(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
262 return dissect_x509af_CertificateSerialNumber(FALSE, tvb, offset, actx, tree, hf_x509af_serial);
268 dissect_x509af_T_algorithmId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
269 #line 69 "x509af.cnf"
272 offset = dissect_ber_object_identifier_str(implicit_tag, actx->pinfo, tree, tvb, offset, hf_x509af_algorithm_id, &algorithm_id);
276 name = get_oid_str_name(algorithm_id);
278 proto_item_append_text(tree, " (%s)", name ? name : algorithm_id);
285 static int dissect_algorithmId(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
286 return dissect_x509af_T_algorithmId(FALSE, tvb, offset, actx, tree, hf_x509af_algorithmId);
292 dissect_x509af_T_parameters(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
293 #line 80 "x509af.cnf"
294 offset=call_ber_oid_callback(algorithm_id, tvb, offset, actx->pinfo, tree);
300 static int dissect_parameters(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
301 return dissect_x509af_T_parameters(FALSE, tvb, offset, actx, tree, hf_x509af_parameters);
305 static const ber_sequence_t AlgorithmIdentifier_sequence[] = {
306 { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_algorithmId },
307 { BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_parameters },
312 dissect_x509af_AlgorithmIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
313 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
314 AlgorithmIdentifier_sequence, hf_index, ett_x509af_AlgorithmIdentifier);
318 static int dissect_signature(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
319 return dissect_x509af_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_x509af_signature);
321 static int dissect_algorithmIdentifier(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
322 return dissect_x509af_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_x509af_algorithmIdentifier);
324 static int dissect_algorithm(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
325 return dissect_x509af_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_x509af_algorithm);
331 dissect_x509af_UTCTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
332 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTCTime,
333 actx->pinfo, tree, tvb, offset, hf_index,
338 static int dissect_utcTime(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
339 return dissect_x509af_UTCTime(FALSE, tvb, offset, actx, tree, hf_x509af_utcTime);
345 dissect_x509af_GeneralizedTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
346 offset = dissect_ber_GeneralizedTime(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index);
350 static int dissect_generalizedTime(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
351 return dissect_x509af_GeneralizedTime(FALSE, tvb, offset, actx, tree, hf_x509af_generalizedTime);
353 static int dissect_notBeforeTime(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
354 return dissect_x509af_GeneralizedTime(FALSE, tvb, offset, actx, tree, hf_x509af_notBeforeTime);
356 static int dissect_notAfterTime(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
357 return dissect_x509af_GeneralizedTime(FALSE, tvb, offset, actx, tree, hf_x509af_notAfterTime);
359 static int dissect_attCertValidity(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
360 return dissect_x509af_GeneralizedTime(FALSE, tvb, offset, actx, tree, hf_x509af_attCertValidity);
364 const value_string x509af_Time_vals[] = {
366 { 1, "generalizedTime" },
370 static const ber_choice_t Time_choice[] = {
371 { 0, BER_CLASS_UNI, BER_UNI_TAG_UTCTime, BER_FLAGS_NOOWNTAG, dissect_utcTime },
372 { 1, BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_generalizedTime },
377 dissect_x509af_Time(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
378 offset = dissect_ber_choice(actx, tree, tvb, offset,
379 Time_choice, hf_index, ett_x509af_Time,
384 static int dissect_notBefore(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
385 return dissect_x509af_Time(FALSE, tvb, offset, actx, tree, hf_x509af_notBefore);
387 static int dissect_notAfter(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
388 return dissect_x509af_Time(FALSE, tvb, offset, actx, tree, hf_x509af_notAfter);
390 static int dissect_thisUpdate(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
391 return dissect_x509af_Time(FALSE, tvb, offset, actx, tree, hf_x509af_thisUpdate);
393 static int dissect_nextUpdate(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
394 return dissect_x509af_Time(FALSE, tvb, offset, actx, tree, hf_x509af_nextUpdate);
396 static int dissect_revocationDate(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
397 return dissect_x509af_Time(FALSE, tvb, offset, actx, tree, hf_x509af_revocationDate);
401 static const ber_sequence_t Validity_sequence[] = {
402 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_notBefore },
403 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_notAfter },
408 dissect_x509af_Validity(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
409 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
410 Validity_sequence, hf_index, ett_x509af_Validity);
414 static int dissect_validity(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
415 return dissect_x509af_Validity(FALSE, tvb, offset, actx, tree, hf_x509af_validity);
419 static const value_string x509af_SubjectName_vals[] = {
420 { 0, "rdnSequence" },
424 static const ber_choice_t SubjectName_choice[] = {
425 { 0, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rdnSequence },
430 dissect_x509af_SubjectName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
431 #line 107 "x509af.cnf"
434 offset = dissect_ber_choice(actx, tree, tvb, offset,
435 SubjectName_choice, hf_index, ett_x509af_SubjectName,
439 str = x509if_get_last_dn();
440 proto_item_append_text(proto_item_get_parent(tree), " (%s)", str?str:"");
446 static int dissect_subject(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
447 return dissect_x509af_SubjectName(FALSE, tvb, offset, actx, tree, hf_x509af_subject);
449 static int dissect_assertionSubjectName(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
450 return dissect_x509af_SubjectName(FALSE, tvb, offset, actx, tree, hf_x509af_assertionSubjectName);
456 dissect_x509af_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_) {
457 offset = dissect_ber_bitstring(implicit_tag, actx->pinfo, tree, tvb, offset,
463 static int dissect_encrypted(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
464 return dissect_x509af_BIT_STRING(FALSE, tvb, offset, actx, tree, hf_x509af_encrypted);
466 static int dissect_subjectPublicKey(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
467 return dissect_x509af_BIT_STRING(FALSE, tvb, offset, actx, tree, hf_x509af_subjectPublicKey);
471 static const ber_sequence_t SubjectPublicKeyInfo_sequence[] = {
472 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_algorithm },
473 { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_subjectPublicKey },
478 dissect_x509af_SubjectPublicKeyInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
479 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
480 SubjectPublicKeyInfo_sequence, hf_index, ett_x509af_SubjectPublicKeyInfo);
484 static int dissect_subjectPublicKeyInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
485 return dissect_x509af_SubjectPublicKeyInfo(FALSE, tvb, offset, actx, tree, hf_x509af_subjectPublicKeyInfo);
491 dissect_x509af_T_extnId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
492 #line 86 "x509af.cnf"
495 offset = dissect_ber_object_identifier_str(implicit_tag, actx->pinfo, tree, tvb, offset, hf_x509af_extension_id, &extension_id);
499 name = get_oid_str_name(extension_id);
501 proto_item_append_text(tree, " (%s)", name ? name : extension_id);
508 static int dissect_extnId(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
509 return dissect_x509af_T_extnId(FALSE, tvb, offset, actx, tree, hf_x509af_extnId);
515 dissect_x509af_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_) {
516 offset = dissect_ber_boolean(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index);
520 static int dissect_critical(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
521 return dissect_x509af_BOOLEAN(FALSE, tvb, offset, actx, tree, hf_x509af_critical);
527 dissect_x509af_T_extnValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
528 #line 97 "x509af.cnf"
533 /* skip past the T and L */
534 offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
535 offset = dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind);
536 offset=call_ber_oid_callback(extension_id, tvb, offset, actx->pinfo, tree);
542 static int dissect_extnValue(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
543 return dissect_x509af_T_extnValue(FALSE, tvb, offset, actx, tree, hf_x509af_extnValue);
547 static const ber_sequence_t Extension_sequence[] = {
548 { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_extnId },
549 { BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_critical },
550 { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_extnValue },
555 dissect_x509af_Extension(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
556 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
557 Extension_sequence, hf_index, ett_x509af_Extension);
561 static int dissect_Extensions_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
562 return dissect_x509af_Extension(FALSE, tvb, offset, actx, tree, hf_x509af_Extensions_item);
566 static const ber_sequence_t Extensions_sequence_of[1] = {
567 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Extensions_item },
571 dissect_x509af_Extensions(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
572 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
573 Extensions_sequence_of, hf_index, ett_x509af_Extensions);
577 static int dissect_extensions(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
578 return dissect_x509af_Extensions(FALSE, tvb, offset, actx, tree, hf_x509af_extensions);
580 static int dissect_crlEntryExtensions(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
581 return dissect_x509af_Extensions(FALSE, tvb, offset, actx, tree, hf_x509af_crlEntryExtensions);
583 static int dissect_crlExtensions(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
584 return dissect_x509af_Extensions(FALSE, tvb, offset, actx, tree, hf_x509af_crlExtensions);
588 static const ber_sequence_t T_signedCertificate_sequence[] = {
589 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_version },
590 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_serialNumber },
591 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_signature },
592 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_issuer },
593 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_validity },
594 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_subject },
595 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_subjectPublicKeyInfo },
596 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_issuerUniqueIdentifier_impl },
597 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_subjectUniqueIdentifier_impl },
598 { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL, dissect_extensions },
603 dissect_x509af_T_signedCertificate(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
604 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
605 T_signedCertificate_sequence, hf_index, ett_x509af_T_signedCertificate);
609 static int dissect_signedCertificate(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
610 return dissect_x509af_T_signedCertificate(FALSE, tvb, offset, actx, tree, hf_x509af_signedCertificate);
614 static const ber_sequence_t Certificate_sequence[] = {
615 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_signedCertificate },
616 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_algorithmIdentifier },
617 { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_encrypted },
622 dissect_x509af_Certificate(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
623 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
624 Certificate_sequence, hf_index, ett_x509af_Certificate);
628 static int dissect_userCertificate(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
629 return dissect_x509af_Certificate(FALSE, tvb, offset, actx, tree, hf_x509af_userCertificate);
631 static int dissect_CrossCertificates_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
632 return dissect_x509af_Certificate(FALSE, tvb, offset, actx, tree, hf_x509af_CrossCertificates_item);
634 static int dissect_issuedByThisCA(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
635 return dissect_x509af_Certificate(FALSE, tvb, offset, actx, tree, hf_x509af_issuedByThisCA);
637 static int dissect_issuedToThisCA(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
638 return dissect_x509af_Certificate(FALSE, tvb, offset, actx, tree, hf_x509af_issuedToThisCA);
640 static int dissect_certificate(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
641 return dissect_x509af_Certificate(FALSE, tvb, offset, actx, tree, hf_x509af_certificate);
645 static const ber_sequence_t CrossCertificates_set_of[1] = {
646 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_CrossCertificates_item },
650 dissect_x509af_CrossCertificates(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
651 offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset,
652 CrossCertificates_set_of, hf_index, ett_x509af_CrossCertificates);
656 static int dissect_ForwardCertificationPath_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
657 return dissect_x509af_CrossCertificates(FALSE, tvb, offset, actx, tree, hf_x509af_ForwardCertificationPath_item);
661 static const ber_sequence_t ForwardCertificationPath_sequence_of[1] = {
662 { BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_ForwardCertificationPath_item },
666 dissect_x509af_ForwardCertificationPath(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
667 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
668 ForwardCertificationPath_sequence_of, hf_index, ett_x509af_ForwardCertificationPath);
672 static int dissect_certificationPath(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
673 return dissect_x509af_ForwardCertificationPath(FALSE, tvb, offset, actx, tree, hf_x509af_certificationPath);
677 static const ber_sequence_t Certificates_sequence[] = {
678 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_userCertificate },
679 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_certificationPath },
684 dissect_x509af_Certificates(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
685 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
686 Certificates_sequence, hf_index, ett_x509af_Certificates);
692 static const ber_sequence_t CertificatePair_sequence[] = {
693 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_issuedByThisCA },
694 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_issuedToThisCA },
699 dissect_x509af_CertificatePair(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
700 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
701 CertificatePair_sequence, hf_index, ett_x509af_CertificatePair);
705 static int dissect_theCACertificates_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
706 return dissect_x509af_CertificatePair(FALSE, tvb, offset, actx, tree, hf_x509af_theCACertificates_item);
710 static const ber_sequence_t SEQUENCE_OF_CertificatePair_sequence_of[1] = {
711 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_theCACertificates_item },
715 dissect_x509af_SEQUENCE_OF_CertificatePair(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
716 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
717 SEQUENCE_OF_CertificatePair_sequence_of, hf_index, ett_x509af_SEQUENCE_OF_CertificatePair);
721 static int dissect_theCACertificates(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
722 return dissect_x509af_SEQUENCE_OF_CertificatePair(FALSE, tvb, offset, actx, tree, hf_x509af_theCACertificates);
726 static const ber_sequence_t CertificationPath_sequence[] = {
727 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_userCertificate },
728 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_theCACertificates },
733 dissect_x509af_CertificationPath(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
734 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
735 CertificationPath_sequence, hf_index, ett_x509af_CertificationPath);
741 static const ber_sequence_t T_revokedCertificates_item_sequence[] = {
742 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_revokedUserCertificate },
743 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_revocationDate },
744 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_crlEntryExtensions },
749 dissect_x509af_T_revokedCertificates_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_) {
750 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
751 T_revokedCertificates_item_sequence, hf_index, ett_x509af_T_revokedCertificates_item);
755 static int dissect_revokedCertificates_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
756 return dissect_x509af_T_revokedCertificates_item(FALSE, tvb, offset, actx, tree, hf_x509af_revokedCertificates_item);
760 static const ber_sequence_t T_revokedCertificates_sequence_of[1] = {
761 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_revokedCertificates_item },
765 dissect_x509af_T_revokedCertificates(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
766 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
767 T_revokedCertificates_sequence_of, hf_index, ett_x509af_T_revokedCertificates);
771 static int dissect_revokedCertificates(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
772 return dissect_x509af_T_revokedCertificates(FALSE, tvb, offset, actx, tree, hf_x509af_revokedCertificates);
776 static const ber_sequence_t T_signedCertificateList_sequence[] = {
777 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_version },
778 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_signature },
779 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_issuer },
780 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_thisUpdate },
781 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_nextUpdate },
782 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_revokedCertificates },
783 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_crlExtensions },
788 dissect_x509af_T_signedCertificateList(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
789 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
790 T_signedCertificateList_sequence, hf_index, ett_x509af_T_signedCertificateList);
794 static int dissect_signedCertificateList(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
795 return dissect_x509af_T_signedCertificateList(FALSE, tvb, offset, actx, tree, hf_x509af_signedCertificateList);
799 static const ber_sequence_t CertificateList_sequence[] = {
800 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_signedCertificateList },
801 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_algorithmIdentifier },
802 { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_encrypted },
807 dissect_x509af_CertificateList(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
808 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
809 CertificateList_sequence, hf_index, ett_x509af_CertificateList);
815 static const ber_sequence_t IssuerSerial_sequence[] = {
816 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_issuerName },
817 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_serial },
818 { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_issuerUID },
823 dissect_x509af_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_) {
824 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
825 IssuerSerial_sequence, hf_index, ett_x509af_IssuerSerial);
829 static int dissect_baseCertificateID(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
830 return dissect_x509af_IssuerSerial(FALSE, tvb, offset, actx, tree, hf_x509af_baseCertificateID);
834 static const value_string x509af_InfoSubject_vals[] = {
835 { 0, "baseCertificateID" },
836 { 1, "subjectName" },
840 static const ber_choice_t InfoSubject_choice[] = {
841 { 0, BER_CLASS_CON, 0, 0, dissect_baseCertificateID },
842 { 1, BER_CLASS_CON, 1, 0, dissect_infoSubjectName },
847 dissect_x509af_InfoSubject(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
848 offset = dissect_ber_choice(actx, tree, tvb, offset,
849 InfoSubject_choice, hf_index, ett_x509af_InfoSubject,
854 static int dissect_info_subject(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
855 return dissect_x509af_InfoSubject(FALSE, tvb, offset, actx, tree, hf_x509af_info_subject);
859 static const ber_sequence_t AttCertValidityPeriod_sequence[] = {
860 { BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_notBeforeTime },
861 { BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_notAfterTime },
866 dissect_x509af_AttCertValidityPeriod(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
867 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
868 AttCertValidityPeriod_sequence, hf_index, ett_x509af_AttCertValidityPeriod);
872 static int dissect_attCertValidityPeriod(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
873 return dissect_x509af_AttCertValidityPeriod(FALSE, tvb, offset, actx, tree, hf_x509af_attCertValidityPeriod);
877 static const ber_sequence_t SEQUENCE_OF_Attribute_sequence_of[1] = {
878 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_attributes_item },
882 dissect_x509af_SEQUENCE_OF_Attribute(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
883 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
884 SEQUENCE_OF_Attribute_sequence_of, hf_index, ett_x509af_SEQUENCE_OF_Attribute);
888 static int dissect_attributes(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
889 return dissect_x509af_SEQUENCE_OF_Attribute(FALSE, tvb, offset, actx, tree, hf_x509af_attributes);
893 static const ber_sequence_t AttributeCertificateInfo_sequence[] = {
894 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_version },
895 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_info_subject },
896 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_issuerName },
897 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_signature },
898 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_serialNumber },
899 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_attCertValidityPeriod },
900 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_attributes },
901 { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_issuerUniqueID },
902 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_extensions },
907 dissect_x509af_AttributeCertificateInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
908 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
909 AttributeCertificateInfo_sequence, hf_index, ett_x509af_AttributeCertificateInfo);
913 static int dissect_signedAttributeCertificateInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
914 return dissect_x509af_AttributeCertificateInfo(FALSE, tvb, offset, actx, tree, hf_x509af_signedAttributeCertificateInfo);
918 static const ber_sequence_t AttributeCertificate_sequence[] = {
919 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_signedAttributeCertificateInfo },
920 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_algorithmIdentifier },
921 { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_encrypted },
926 dissect_x509af_AttributeCertificate(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
927 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
928 AttributeCertificate_sequence, hf_index, ett_x509af_AttributeCertificate);
932 static int dissect_attributeCertificate(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
933 return dissect_x509af_AttributeCertificate(FALSE, tvb, offset, actx, tree, hf_x509af_attributeCertificate);
937 static const ber_sequence_t ACPathData_sequence[] = {
938 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_certificate },
939 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_attributeCertificate },
944 dissect_x509af_ACPathData(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
945 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
946 ACPathData_sequence, hf_index, ett_x509af_ACPathData);
950 static int dissect_acPath_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
951 return dissect_x509af_ACPathData(FALSE, tvb, offset, actx, tree, hf_x509af_acPath_item);
955 static const ber_sequence_t SEQUENCE_OF_ACPathData_sequence_of[1] = {
956 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_acPath_item },
960 dissect_x509af_SEQUENCE_OF_ACPathData(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
961 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
962 SEQUENCE_OF_ACPathData_sequence_of, hf_index, ett_x509af_SEQUENCE_OF_ACPathData);
966 static int dissect_acPath(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
967 return dissect_x509af_SEQUENCE_OF_ACPathData(FALSE, tvb, offset, actx, tree, hf_x509af_acPath);
971 static const ber_sequence_t AttributeCertificationPath_sequence[] = {
972 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_attributeCertificate },
973 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_acPath },
978 dissect_x509af_AttributeCertificationPath(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
979 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
980 AttributeCertificationPath_sequence, hf_index, ett_x509af_AttributeCertificationPath);
986 static const value_string x509af_AssertionSubject_vals[] = {
987 { 0, "baseCertificateID" },
988 { 1, "subjectName" },
992 static const ber_choice_t AssertionSubject_choice[] = {
993 { 0, BER_CLASS_CON, 0, 0, dissect_baseCertificateID },
994 { 1, BER_CLASS_CON, 1, 0, dissect_assertionSubjectName },
999 dissect_x509af_AssertionSubject(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1000 offset = dissect_ber_choice(actx, tree, tvb, offset,
1001 AssertionSubject_choice, hf_index, ett_x509af_AssertionSubject,
1006 static int dissect_assertion_subject(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1007 return dissect_x509af_AssertionSubject(FALSE, tvb, offset, actx, tree, hf_x509af_assertion_subject);
1011 static const ber_sequence_t SET_OF_AttributeType_set_of[1] = {
1012 { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_attType_item },
1016 dissect_x509af_SET_OF_AttributeType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1017 offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset,
1018 SET_OF_AttributeType_set_of, hf_index, ett_x509af_SET_OF_AttributeType);
1022 static int dissect_attType(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1023 return dissect_x509af_SET_OF_AttributeType(FALSE, tvb, offset, actx, tree, hf_x509af_attType);
1027 static const ber_sequence_t AttributeCertificateAssertion_sequence[] = {
1028 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_assertion_subject },
1029 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_assertionIssuer },
1030 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_attCertValidity },
1031 { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL, dissect_attType },
1036 dissect_x509af_AttributeCertificateAssertion(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1037 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1038 AttributeCertificateAssertion_sequence, hf_index, ett_x509af_AttributeCertificateAssertion);
1046 dissect_x509af_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1047 offset = dissect_ber_integer(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index,
1052 static int dissect_p(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1053 return dissect_x509af_INTEGER(FALSE, tvb, offset, actx, tree, hf_x509af_p);
1055 static int dissect_q(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1056 return dissect_x509af_INTEGER(FALSE, tvb, offset, actx, tree, hf_x509af_q);
1058 static int dissect_g(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) {
1059 return dissect_x509af_INTEGER(FALSE, tvb, offset, actx, tree, hf_x509af_g);
1063 static const ber_sequence_t DSS_Params_sequence[] = {
1064 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_p },
1065 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_q },
1066 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_g },
1071 dissect_x509af_DSS_Params(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1072 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1073 DSS_Params_sequence, hf_index, ett_x509af_DSS_Params);
1080 static void dissect_Certificate_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1081 asn1_ctx_t asn1_ctx;
1082 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1083 dissect_x509af_Certificate(FALSE, tvb, 0, &asn1_ctx, tree, hf_x509af_Certificate_PDU);
1085 static void dissect_CertificatePair_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1086 asn1_ctx_t asn1_ctx;
1087 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1088 dissect_x509af_CertificatePair(FALSE, tvb, 0, &asn1_ctx, tree, hf_x509af_CertificatePair_PDU);
1090 static void dissect_CertificateList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1091 asn1_ctx_t asn1_ctx;
1092 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1093 dissect_x509af_CertificateList(FALSE, tvb, 0, &asn1_ctx, tree, hf_x509af_CertificateList_PDU);
1095 static void dissect_AttributeCertificate_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1096 asn1_ctx_t asn1_ctx;
1097 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1098 dissect_x509af_AttributeCertificate(FALSE, tvb, 0, &asn1_ctx, tree, hf_x509af_AttributeCertificate_PDU);
1100 static void dissect_DSS_Params_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1101 asn1_ctx_t asn1_ctx;
1102 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1103 dissect_x509af_DSS_Params(FALSE, tvb, 0, &asn1_ctx, tree, hf_x509af_DSS_Params_PDU);
1107 /*--- End of included file: packet-x509af-fn.c ---*/
1108 #line 64 "packet-x509af-template.c"
1110 const char *x509af_get_last_algorithm_id(void) {
1111 return algorithm_id;
1116 dissect_pkix_crl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
1118 proto_item *item=NULL;
1119 proto_tree *tree=NULL;
1120 asn1_ctx_t asn1_ctx;
1121 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1123 if (check_col(pinfo->cinfo, COL_PROTOCOL))
1124 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PKIX-CRL");
1126 if (check_col(pinfo->cinfo, COL_INFO)) {
1127 col_clear(pinfo->cinfo, COL_INFO);
1129 col_add_fstr(pinfo->cinfo, COL_INFO, "Certificate Revocation List");
1134 item=proto_tree_add_text(parent_tree, tvb, 0, -1, "Certificate Revocation List");
1135 tree = proto_item_add_subtree(item, ett_pkix_crl);
1138 return dissect_x509af_CertificateList(FALSE, tvb, 0, &asn1_ctx, tree, -1);
1141 /*--- proto_register_x509af ----------------------------------------------*/
1142 void proto_register_x509af(void) {
1144 /* List of fields */
1145 static hf_register_info hf[] = {
1146 { &hf_x509af_algorithm_id,
1147 { "Algorithm Id", "x509af.algorithm.id",
1148 FT_OID, BASE_NONE, NULL, 0,
1149 "Algorithm Id", HFILL }},
1150 { &hf_x509af_extension_id,
1151 { "Extension Id", "x509af.extension.id",
1152 FT_OID, BASE_NONE, NULL, 0,
1153 "Extension Id", HFILL }},
1155 /*--- Included file: packet-x509af-hfarr.c ---*/
1156 #line 1 "packet-x509af-hfarr.c"
1157 { &hf_x509af_Certificate_PDU,
1158 { "Certificate", "x509af.Certificate",
1159 FT_NONE, BASE_NONE, NULL, 0,
1160 "x509af.Certificate", HFILL }},
1161 { &hf_x509af_CertificatePair_PDU,
1162 { "CertificatePair", "x509af.CertificatePair",
1163 FT_NONE, BASE_NONE, NULL, 0,
1164 "x509af.CertificatePair", HFILL }},
1165 { &hf_x509af_CertificateList_PDU,
1166 { "CertificateList", "x509af.CertificateList",
1167 FT_NONE, BASE_NONE, NULL, 0,
1168 "x509af.CertificateList", HFILL }},
1169 { &hf_x509af_AttributeCertificate_PDU,
1170 { "AttributeCertificate", "x509af.AttributeCertificate",
1171 FT_NONE, BASE_NONE, NULL, 0,
1172 "x509af.AttributeCertificate", HFILL }},
1173 { &hf_x509af_DSS_Params_PDU,
1174 { "DSS-Params", "x509af.DSS_Params",
1175 FT_NONE, BASE_NONE, NULL, 0,
1176 "x509af.DSS_Params", HFILL }},
1177 { &hf_x509af_signedCertificate,
1178 { "signedCertificate", "x509af.signedCertificate",
1179 FT_NONE, BASE_NONE, NULL, 0,
1180 "x509af.T_signedCertificate", HFILL }},
1181 { &hf_x509af_version,
1182 { "version", "x509af.version",
1183 FT_INT32, BASE_DEC, VALS(x509af_Version_vals), 0,
1184 "x509af.Version", HFILL }},
1185 { &hf_x509af_serialNumber,
1186 { "serialNumber", "x509af.serialNumber",
1187 FT_INT32, BASE_DEC, NULL, 0,
1188 "x509af.CertificateSerialNumber", HFILL }},
1189 { &hf_x509af_signature,
1190 { "signature", "x509af.signature",
1191 FT_NONE, BASE_NONE, NULL, 0,
1192 "x509af.AlgorithmIdentifier", HFILL }},
1193 { &hf_x509af_issuer,
1194 { "issuer", "x509af.issuer",
1195 FT_UINT32, BASE_DEC, VALS(x509if_Name_vals), 0,
1196 "x509if.Name", HFILL }},
1197 { &hf_x509af_validity,
1198 { "validity", "x509af.validity",
1199 FT_NONE, BASE_NONE, NULL, 0,
1200 "x509af.Validity", HFILL }},
1201 { &hf_x509af_subject,
1202 { "subject", "x509af.subject",
1203 FT_UINT32, BASE_DEC, VALS(x509af_SubjectName_vals), 0,
1204 "x509af.SubjectName", HFILL }},
1205 { &hf_x509af_subjectPublicKeyInfo,
1206 { "subjectPublicKeyInfo", "x509af.subjectPublicKeyInfo",
1207 FT_NONE, BASE_NONE, NULL, 0,
1208 "x509af.SubjectPublicKeyInfo", HFILL }},
1209 { &hf_x509af_issuerUniqueIdentifier,
1210 { "issuerUniqueIdentifier", "x509af.issuerUniqueIdentifier",
1211 FT_BYTES, BASE_HEX, NULL, 0,
1212 "x509sat.UniqueIdentifier", HFILL }},
1213 { &hf_x509af_subjectUniqueIdentifier,
1214 { "subjectUniqueIdentifier", "x509af.subjectUniqueIdentifier",
1215 FT_BYTES, BASE_HEX, NULL, 0,
1216 "x509sat.UniqueIdentifier", HFILL }},
1217 { &hf_x509af_extensions,
1218 { "extensions", "x509af.extensions",
1219 FT_UINT32, BASE_DEC, NULL, 0,
1220 "x509af.Extensions", HFILL }},
1221 { &hf_x509af_algorithmIdentifier,
1222 { "algorithmIdentifier", "x509af.algorithmIdentifier",
1223 FT_NONE, BASE_NONE, NULL, 0,
1224 "x509af.AlgorithmIdentifier", HFILL }},
1225 { &hf_x509af_encrypted,
1226 { "encrypted", "x509af.encrypted",
1227 FT_BYTES, BASE_HEX, NULL, 0,
1228 "x509af.BIT_STRING", HFILL }},
1229 { &hf_x509af_rdnSequence,
1230 { "rdnSequence", "x509af.rdnSequence",
1231 FT_UINT32, BASE_DEC, NULL, 0,
1232 "x509if.RDNSequence", HFILL }},
1233 { &hf_x509af_algorithmId,
1234 { "algorithmId", "x509af.algorithmId",
1235 FT_OID, BASE_NONE, NULL, 0,
1236 "x509af.T_algorithmId", HFILL }},
1237 { &hf_x509af_parameters,
1238 { "parameters", "x509af.parameters",
1239 FT_NONE, BASE_NONE, NULL, 0,
1240 "x509af.T_parameters", HFILL }},
1241 { &hf_x509af_notBefore,
1242 { "notBefore", "x509af.notBefore",
1243 FT_UINT32, BASE_DEC, VALS(x509af_Time_vals), 0,
1244 "x509af.Time", HFILL }},
1245 { &hf_x509af_notAfter,
1246 { "notAfter", "x509af.notAfter",
1247 FT_UINT32, BASE_DEC, VALS(x509af_Time_vals), 0,
1248 "x509af.Time", HFILL }},
1249 { &hf_x509af_algorithm,
1250 { "algorithm", "x509af.algorithm",
1251 FT_NONE, BASE_NONE, NULL, 0,
1252 "x509af.AlgorithmIdentifier", HFILL }},
1253 { &hf_x509af_subjectPublicKey,
1254 { "subjectPublicKey", "x509af.subjectPublicKey",
1255 FT_BYTES, BASE_HEX, NULL, 0,
1256 "x509af.BIT_STRING", HFILL }},
1257 { &hf_x509af_utcTime,
1258 { "utcTime", "x509af.utcTime",
1259 FT_STRING, BASE_NONE, NULL, 0,
1260 "x509af.UTCTime", HFILL }},
1261 { &hf_x509af_generalizedTime,
1262 { "generalizedTime", "x509af.generalizedTime",
1263 FT_STRING, BASE_NONE, NULL, 0,
1264 "x509af.GeneralizedTime", HFILL }},
1265 { &hf_x509af_Extensions_item,
1266 { "Item", "x509af.Extensions_item",
1267 FT_NONE, BASE_NONE, NULL, 0,
1268 "x509af.Extension", HFILL }},
1269 { &hf_x509af_extnId,
1270 { "extnId", "x509af.extnId",
1271 FT_OID, BASE_NONE, NULL, 0,
1272 "x509af.T_extnId", HFILL }},
1273 { &hf_x509af_critical,
1274 { "critical", "x509af.critical",
1275 FT_BOOLEAN, 8, NULL, 0,
1276 "x509af.BOOLEAN", HFILL }},
1277 { &hf_x509af_extnValue,
1278 { "extnValue", "x509af.extnValue",
1279 FT_BYTES, BASE_HEX, NULL, 0,
1280 "x509af.T_extnValue", HFILL }},
1281 { &hf_x509af_userCertificate,
1282 { "userCertificate", "x509af.userCertificate",
1283 FT_NONE, BASE_NONE, NULL, 0,
1284 "x509af.Certificate", HFILL }},
1285 { &hf_x509af_certificationPath,
1286 { "certificationPath", "x509af.certificationPath",
1287 FT_UINT32, BASE_DEC, NULL, 0,
1288 "x509af.ForwardCertificationPath", HFILL }},
1289 { &hf_x509af_ForwardCertificationPath_item,
1290 { "Item", "x509af.ForwardCertificationPath_item",
1291 FT_UINT32, BASE_DEC, NULL, 0,
1292 "x509af.CrossCertificates", HFILL }},
1293 { &hf_x509af_CrossCertificates_item,
1294 { "Item", "x509af.CrossCertificates_item",
1295 FT_NONE, BASE_NONE, NULL, 0,
1296 "x509af.Certificate", HFILL }},
1297 { &hf_x509af_theCACertificates,
1298 { "theCACertificates", "x509af.theCACertificates",
1299 FT_UINT32, BASE_DEC, NULL, 0,
1300 "x509af.SEQUENCE_OF_CertificatePair", HFILL }},
1301 { &hf_x509af_theCACertificates_item,
1302 { "Item", "x509af.theCACertificates_item",
1303 FT_NONE, BASE_NONE, NULL, 0,
1304 "x509af.CertificatePair", HFILL }},
1305 { &hf_x509af_issuedByThisCA,
1306 { "issuedByThisCA", "x509af.issuedByThisCA",
1307 FT_NONE, BASE_NONE, NULL, 0,
1308 "x509af.Certificate", HFILL }},
1309 { &hf_x509af_issuedToThisCA,
1310 { "issuedToThisCA", "x509af.issuedToThisCA",
1311 FT_NONE, BASE_NONE, NULL, 0,
1312 "x509af.Certificate", HFILL }},
1313 { &hf_x509af_signedCertificateList,
1314 { "signedCertificateList", "x509af.signedCertificateList",
1315 FT_NONE, BASE_NONE, NULL, 0,
1316 "x509af.T_signedCertificateList", HFILL }},
1317 { &hf_x509af_thisUpdate,
1318 { "thisUpdate", "x509af.thisUpdate",
1319 FT_UINT32, BASE_DEC, VALS(x509af_Time_vals), 0,
1320 "x509af.Time", HFILL }},
1321 { &hf_x509af_nextUpdate,
1322 { "nextUpdate", "x509af.nextUpdate",
1323 FT_UINT32, BASE_DEC, VALS(x509af_Time_vals), 0,
1324 "x509af.Time", HFILL }},
1325 { &hf_x509af_revokedCertificates,
1326 { "revokedCertificates", "x509af.revokedCertificates",
1327 FT_UINT32, BASE_DEC, NULL, 0,
1328 "x509af.T_revokedCertificates", HFILL }},
1329 { &hf_x509af_revokedCertificates_item,
1330 { "Item", "x509af.revokedCertificates_item",
1331 FT_NONE, BASE_NONE, NULL, 0,
1332 "x509af.T_revokedCertificates_item", HFILL }},
1333 { &hf_x509af_revokedUserCertificate,
1334 { "userCertificate", "x509af.userCertificate",
1335 FT_INT32, BASE_DEC, NULL, 0,
1336 "x509af.CertificateSerialNumber", HFILL }},
1337 { &hf_x509af_revocationDate,
1338 { "revocationDate", "x509af.revocationDate",
1339 FT_UINT32, BASE_DEC, VALS(x509af_Time_vals), 0,
1340 "x509af.Time", HFILL }},
1341 { &hf_x509af_crlEntryExtensions,
1342 { "crlEntryExtensions", "x509af.crlEntryExtensions",
1343 FT_UINT32, BASE_DEC, NULL, 0,
1344 "x509af.Extensions", HFILL }},
1345 { &hf_x509af_crlExtensions,
1346 { "crlExtensions", "x509af.crlExtensions",
1347 FT_UINT32, BASE_DEC, NULL, 0,
1348 "x509af.Extensions", HFILL }},
1349 { &hf_x509af_attributeCertificate,
1350 { "attributeCertificate", "x509af.attributeCertificate",
1351 FT_NONE, BASE_NONE, NULL, 0,
1352 "x509af.AttributeCertificate", HFILL }},
1353 { &hf_x509af_acPath,
1354 { "acPath", "x509af.acPath",
1355 FT_UINT32, BASE_DEC, NULL, 0,
1356 "x509af.SEQUENCE_OF_ACPathData", HFILL }},
1357 { &hf_x509af_acPath_item,
1358 { "Item", "x509af.acPath_item",
1359 FT_NONE, BASE_NONE, NULL, 0,
1360 "x509af.ACPathData", HFILL }},
1361 { &hf_x509af_certificate,
1362 { "certificate", "x509af.certificate",
1363 FT_NONE, BASE_NONE, NULL, 0,
1364 "x509af.Certificate", HFILL }},
1365 { &hf_x509af_signedAttributeCertificateInfo,
1366 { "signedAttributeCertificateInfo", "x509af.signedAttributeCertificateInfo",
1367 FT_NONE, BASE_NONE, NULL, 0,
1368 "x509af.AttributeCertificateInfo", HFILL }},
1369 { &hf_x509af_info_subject,
1370 { "subject", "x509af.subject",
1371 FT_UINT32, BASE_DEC, VALS(x509af_InfoSubject_vals), 0,
1372 "x509af.InfoSubject", HFILL }},
1373 { &hf_x509af_baseCertificateID,
1374 { "baseCertificateID", "x509af.baseCertificateID",
1375 FT_NONE, BASE_NONE, NULL, 0,
1376 "x509af.IssuerSerial", HFILL }},
1377 { &hf_x509af_infoSubjectName,
1378 { "subjectName", "x509af.subjectName",
1379 FT_UINT32, BASE_DEC, NULL, 0,
1380 "x509ce.GeneralNames", HFILL }},
1381 { &hf_x509af_issuerName,
1382 { "issuer", "x509af.issuer",
1383 FT_UINT32, BASE_DEC, NULL, 0,
1384 "x509ce.GeneralNames", HFILL }},
1385 { &hf_x509af_attCertValidityPeriod,
1386 { "attCertValidityPeriod", "x509af.attCertValidityPeriod",
1387 FT_NONE, BASE_NONE, NULL, 0,
1388 "x509af.AttCertValidityPeriod", HFILL }},
1389 { &hf_x509af_attributes,
1390 { "attributes", "x509af.attributes",
1391 FT_UINT32, BASE_DEC, NULL, 0,
1392 "x509af.SEQUENCE_OF_Attribute", HFILL }},
1393 { &hf_x509af_attributes_item,
1394 { "Item", "x509af.attributes_item",
1395 FT_NONE, BASE_NONE, NULL, 0,
1396 "x509if.Attribute", HFILL }},
1397 { &hf_x509af_issuerUniqueID,
1398 { "issuerUniqueID", "x509af.issuerUniqueID",
1399 FT_BYTES, BASE_HEX, NULL, 0,
1400 "x509sat.UniqueIdentifier", HFILL }},
1401 { &hf_x509af_serial,
1402 { "serial", "x509af.serial",
1403 FT_INT32, BASE_DEC, NULL, 0,
1404 "x509af.CertificateSerialNumber", HFILL }},
1405 { &hf_x509af_issuerUID,
1406 { "issuerUID", "x509af.issuerUID",
1407 FT_BYTES, BASE_HEX, NULL, 0,
1408 "x509sat.UniqueIdentifier", HFILL }},
1409 { &hf_x509af_notBeforeTime,
1410 { "notBeforeTime", "x509af.notBeforeTime",
1411 FT_STRING, BASE_NONE, NULL, 0,
1412 "x509af.GeneralizedTime", HFILL }},
1413 { &hf_x509af_notAfterTime,
1414 { "notAfterTime", "x509af.notAfterTime",
1415 FT_STRING, BASE_NONE, NULL, 0,
1416 "x509af.GeneralizedTime", HFILL }},
1417 { &hf_x509af_assertion_subject,
1418 { "subject", "x509af.subject",
1419 FT_UINT32, BASE_DEC, VALS(x509af_AssertionSubject_vals), 0,
1420 "x509af.AssertionSubject", HFILL }},
1421 { &hf_x509af_assertionSubjectName,
1422 { "subjectName", "x509af.subjectName",
1423 FT_UINT32, BASE_DEC, VALS(x509af_SubjectName_vals), 0,
1424 "x509af.SubjectName", HFILL }},
1425 { &hf_x509af_assertionIssuer,
1426 { "issuer", "x509af.issuer",
1427 FT_UINT32, BASE_DEC, VALS(x509if_Name_vals), 0,
1428 "x509if.Name", HFILL }},
1429 { &hf_x509af_attCertValidity,
1430 { "attCertValidity", "x509af.attCertValidity",
1431 FT_STRING, BASE_NONE, NULL, 0,
1432 "x509af.GeneralizedTime", HFILL }},
1433 { &hf_x509af_attType,
1434 { "attType", "x509af.attType",
1435 FT_UINT32, BASE_DEC, NULL, 0,
1436 "x509af.SET_OF_AttributeType", HFILL }},
1437 { &hf_x509af_attType_item,
1438 { "Item", "x509af.attType_item",
1439 FT_OID, BASE_NONE, NULL, 0,
1440 "x509if.AttributeType", HFILL }},
1443 FT_INT32, BASE_DEC, NULL, 0,
1444 "x509af.INTEGER", HFILL }},
1447 FT_INT32, BASE_DEC, NULL, 0,
1448 "x509af.INTEGER", HFILL }},
1451 FT_INT32, BASE_DEC, NULL, 0,
1452 "x509af.INTEGER", HFILL }},
1454 /*--- End of included file: packet-x509af-hfarr.c ---*/
1455 #line 110 "packet-x509af-template.c"
1458 /* List of subtrees */
1459 static gint *ett[] = {
1462 /*--- Included file: packet-x509af-ettarr.c ---*/
1463 #line 1 "packet-x509af-ettarr.c"
1464 &ett_x509af_Certificate,
1465 &ett_x509af_T_signedCertificate,
1466 &ett_x509af_SubjectName,
1467 &ett_x509af_AlgorithmIdentifier,
1468 &ett_x509af_Validity,
1469 &ett_x509af_SubjectPublicKeyInfo,
1471 &ett_x509af_Extensions,
1472 &ett_x509af_Extension,
1473 &ett_x509af_Certificates,
1474 &ett_x509af_ForwardCertificationPath,
1475 &ett_x509af_CrossCertificates,
1476 &ett_x509af_CertificationPath,
1477 &ett_x509af_SEQUENCE_OF_CertificatePair,
1478 &ett_x509af_CertificatePair,
1479 &ett_x509af_CertificateList,
1480 &ett_x509af_T_signedCertificateList,
1481 &ett_x509af_T_revokedCertificates,
1482 &ett_x509af_T_revokedCertificates_item,
1483 &ett_x509af_AttributeCertificationPath,
1484 &ett_x509af_SEQUENCE_OF_ACPathData,
1485 &ett_x509af_ACPathData,
1486 &ett_x509af_AttributeCertificate,
1487 &ett_x509af_AttributeCertificateInfo,
1488 &ett_x509af_InfoSubject,
1489 &ett_x509af_SEQUENCE_OF_Attribute,
1490 &ett_x509af_IssuerSerial,
1491 &ett_x509af_AttCertValidityPeriod,
1492 &ett_x509af_AttributeCertificateAssertion,
1493 &ett_x509af_AssertionSubject,
1494 &ett_x509af_SET_OF_AttributeType,
1495 &ett_x509af_DSS_Params,
1497 /*--- End of included file: packet-x509af-ettarr.c ---*/
1498 #line 116 "packet-x509af-template.c"
1501 /* Register protocol */
1502 proto_x509af = proto_register_protocol(PNAME, PSNAME, PFNAME);
1504 /* Register fields and subtrees */
1505 proto_register_field_array(proto_x509af, hf, array_length(hf));
1506 proto_register_subtree_array(ett, array_length(ett));
1511 /*--- proto_reg_handoff_x509af -------------------------------------------*/
1512 void proto_reg_handoff_x509af(void) {
1513 dissector_handle_t pkix_crl_handle;
1515 pkix_crl_handle = new_create_dissector_handle(dissect_pkix_crl, proto_x509af);
1516 dissector_add_string("media_type", "application/pkix-crl", pkix_crl_handle);
1519 /*--- Included file: packet-x509af-dis-tab.c ---*/
1520 #line 1 "packet-x509af-dis-tab.c"
1521 register_ber_oid_dissector("2.5.4.36", dissect_Certificate_PDU, proto_x509af, "id-at-userCertificate");
1522 register_ber_oid_dissector("2.5.4.37", dissect_Certificate_PDU, proto_x509af, "id-at-cAcertificate");
1523 register_ber_oid_dissector("2.5.4.38", dissect_CertificateList_PDU, proto_x509af, "id-at-authorityRevocationList");
1524 register_ber_oid_dissector("2.5.4.39", dissect_CertificateList_PDU, proto_x509af, "id-at-certificateRevocationList");
1525 register_ber_oid_dissector("2.5.4.40", dissect_CertificatePair_PDU, proto_x509af, "id-at-crossCertificatePair");
1526 register_ber_oid_dissector("2.5.4.58", dissect_AttributeCertificate_PDU, proto_x509af, "id-at-attributeCertificate");
1527 register_ber_oid_dissector("2.5.4.59", dissect_CertificateList_PDU, proto_x509af, "id-at-attributeCertificateRevocationList");
1528 register_ber_oid_dissector("1.2.840.10040.4.1", dissect_DSS_Params_PDU, proto_x509af, "id-dsa");
1531 /*--- End of included file: packet-x509af-dis-tab.c ---*/
1532 #line 136 "packet-x509af-template.c"
1534 /*XXX these should really go to a better place but since that
1535 I have not that ITU standard, ill put it here for the time
1537 Only implemented those algorithms that take no parameters
1538 for the time being, ronnie
1540 /* from http://www.alvestrand.no/objectid/1.3.14.3.2.html */
1541 register_ber_oid_dissector("1.3.14.3.2.2", dissect_ber_oid_NULL_callback, proto_x509af, "md4WithRSA");
1542 register_ber_oid_dissector("1.3.14.3.2.3", dissect_ber_oid_NULL_callback, proto_x509af, "md5WithRSA");
1543 register_ber_oid_dissector("1.3.14.3.2.4", dissect_ber_oid_NULL_callback, proto_x509af, "md4WithRSAEncryption");
1544 register_ber_oid_dissector("1.3.14.3.2.6", dissect_ber_oid_NULL_callback, proto_x509af, "desECB");
1545 register_ber_oid_dissector("1.3.14.3.2.11", dissect_ber_oid_NULL_callback, proto_x509af, "rsaSignature");
1546 register_ber_oid_dissector("1.3.14.3.2.14", dissect_ber_oid_NULL_callback, proto_x509af, "mdc2WithRSASignature");
1547 register_ber_oid_dissector("1.3.14.3.2.15", dissect_ber_oid_NULL_callback, proto_x509af, "shaWithRSASignature");
1548 register_ber_oid_dissector("1.3.14.3.2.16", dissect_ber_oid_NULL_callback, proto_x509af, "dhWithCommonModulus");
1549 register_ber_oid_dissector("1.3.14.3.2.17", dissect_ber_oid_NULL_callback, proto_x509af, "desEDE");
1550 register_ber_oid_dissector("1.3.14.3.2.18", dissect_ber_oid_NULL_callback, proto_x509af, "sha");
1551 register_ber_oid_dissector("1.3.14.3.2.19", dissect_ber_oid_NULL_callback, proto_x509af, "mdc-2");
1552 register_ber_oid_dissector("1.3.14.3.2.20", dissect_ber_oid_NULL_callback, proto_x509af, "dsaCommon");
1553 register_ber_oid_dissector("1.3.14.3.2.21", dissect_ber_oid_NULL_callback, proto_x509af, "dsaCommonWithSHA");
1554 register_ber_oid_dissector("1.3.14.3.2.22", dissect_ber_oid_NULL_callback, proto_x509af, "rsaKeyTransport");
1555 register_ber_oid_dissector("1.3.14.3.2.23", dissect_ber_oid_NULL_callback, proto_x509af, "keyed-hash-seal");
1556 register_ber_oid_dissector("1.3.14.3.2.24", dissect_ber_oid_NULL_callback, proto_x509af, "md2WithRSASignature");
1557 register_ber_oid_dissector("1.3.14.3.2.25", dissect_ber_oid_NULL_callback, proto_x509af, "md5WithRSASignature");
1558 register_ber_oid_dissector("1.3.14.3.2.26", dissect_ber_oid_NULL_callback, proto_x509af, "SHA-1");
1560 /* these will generally be encoded as ";binary" in LDAP */
1562 register_ldap_name_dissector("cACertificate", dissect_Certificate_PDU, proto_x509af);
1563 register_ldap_name_dissector("certificate", dissect_Certificate_PDU, proto_x509af);
1565 register_ldap_name_dissector("certificateRevocationList", dissect_CertificateList_PDU, proto_x509af);
1566 register_ldap_name_dissector("crl", dissect_CertificateList_PDU, proto_x509af);
1568 register_ldap_name_dissector("authorityRevocationList", dissect_CertificateList_PDU, proto_x509af);
1569 register_ldap_name_dissector("arl", dissect_CertificateList_PDU, proto_x509af);
1571 register_ldap_name_dissector("crossCertificatePair", dissect_CertificatePair_PDU, proto_x509af);
1573 register_ber_syntax_dissector("Certificate", proto_x509af, dissect_Certificate_PDU);
1574 register_ber_oid_syntax(".cer", NULL, "Certificate");
1575 register_ber_oid_syntax(".crt", NULL, "Certificate");
1576 register_ber_syntax_dissector("CertificateList", proto_x509af, dissect_CertificateList_PDU);
1577 register_ber_oid_syntax(".crl", NULL, "CertificateList");
1578 register_ber_syntax_dissector("CrossCertificatePair", proto_x509af, dissect_CertificatePair_PDU);