Regenerate asn.1 dissectors.
[metze/wireshark/wip.git] / epan / dissectors / packet-x509af.c
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 -p x509af -c ./x509af.cnf -s ./packet-x509af-template -D . -O ../../epan/dissectors AuthenticationFramework.asn */
5
6 /* Input file: packet-x509af-template.c */
7
8 #line 1 "../../asn1/x509af/packet-x509af-template.c"
9 /* packet-x509af.c
10  * Routines for X.509 Authentication Framework packet dissection
11  *  Ronnie Sahlberg 2004
12  *
13  * $Id$
14  *
15  * Wireshark - Network traffic analyzer
16  * By Gerald Combs <gerald@wireshark.org>
17  * Copyright 1998 Gerald Combs
18  *
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.
23  *
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.
28  *
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
32  */
33
34 #include "config.h"
35
36 #include <glib.h>
37 #include <epan/packet.h>
38 #include <epan/oids.h>
39 #include <epan/asn1.h>
40
41 #include "packet-ber.h"
42 #include "packet-x509af.h"
43 #include "packet-x509ce.h"
44 #include "packet-x509if.h"
45 #include "packet-x509sat.h"
46 #include "packet-ldap.h"
47
48 #define PNAME  "X.509 Authentication Framework"
49 #define PSNAME "X509AF"
50 #define PFNAME "x509af"
51
52 /* Initialize the protocol and registered fields */
53 static int proto_x509af = -1;
54 static int hf_x509af_algorithm_id = -1;
55 static int hf_x509af_extension_id = -1;
56
57 /*--- Included file: packet-x509af-hf.c ---*/
58 #line 1 "../../asn1/x509af/packet-x509af-hf.c"
59 static int hf_x509af_x509af_Certificate_PDU = -1;  /* Certificate */
60 static int hf_x509af_CertificatePair_PDU = -1;    /* CertificatePair */
61 static int hf_x509af_CertificateList_PDU = -1;    /* CertificateList */
62 static int hf_x509af_AttributeCertificate_PDU = -1;  /* AttributeCertificate */
63 static int hf_x509af_DSS_Params_PDU = -1;         /* DSS_Params */
64 static int hf_x509af_signedCertificate = -1;      /* T_signedCertificate */
65 static int hf_x509af_version = -1;                /* Version */
66 static int hf_x509af_serialNumber = -1;           /* CertificateSerialNumber */
67 static int hf_x509af_signature = -1;              /* AlgorithmIdentifier */
68 static int hf_x509af_issuer = -1;                 /* Name */
69 static int hf_x509af_validity = -1;               /* Validity */
70 static int hf_x509af_subject = -1;                /* SubjectName */
71 static int hf_x509af_subjectPublicKeyInfo = -1;   /* SubjectPublicKeyInfo */
72 static int hf_x509af_issuerUniqueIdentifier = -1;  /* UniqueIdentifier */
73 static int hf_x509af_subjectUniqueIdentifier = -1;  /* UniqueIdentifier */
74 static int hf_x509af_extensions = -1;             /* Extensions */
75 static int hf_x509af_algorithmIdentifier = -1;    /* AlgorithmIdentifier */
76 static int hf_x509af_encrypted = -1;              /* BIT_STRING */
77 static int hf_x509af_rdnSequence = -1;            /* RDNSequence */
78 static int hf_x509af_algorithmId = -1;            /* T_algorithmId */
79 static int hf_x509af_parameters = -1;             /* T_parameters */
80 static int hf_x509af_notBefore = -1;              /* Time */
81 static int hf_x509af_notAfter = -1;               /* Time */
82 static int hf_x509af_algorithm = -1;              /* AlgorithmIdentifier */
83 static int hf_x509af_subjectPublicKey = -1;       /* BIT_STRING */
84 static int hf_x509af_utcTime = -1;                /* UTCTime */
85 static int hf_x509af_generalizedTime = -1;        /* GeneralizedTime */
86 static int hf_x509af_Extensions_item = -1;        /* Extension */
87 static int hf_x509af_extnId = -1;                 /* T_extnId */
88 static int hf_x509af_critical = -1;               /* BOOLEAN */
89 static int hf_x509af_extnValue = -1;              /* T_extnValue */
90 static int hf_x509af_userCertificate = -1;        /* Certificate */
91 static int hf_x509af_certificationPath = -1;      /* ForwardCertificationPath */
92 static int hf_x509af_ForwardCertificationPath_item = -1;  /* CrossCertificates */
93 static int hf_x509af_CrossCertificates_item = -1;  /* Certificate */
94 static int hf_x509af_theCACertificates = -1;      /* SEQUENCE_OF_CertificatePair */
95 static int hf_x509af_theCACertificates_item = -1;  /* CertificatePair */
96 static int hf_x509af_issuedByThisCA = -1;         /* Certificate */
97 static int hf_x509af_issuedToThisCA = -1;         /* Certificate */
98 static int hf_x509af_signedCertificateList = -1;  /* T_signedCertificateList */
99 static int hf_x509af_thisUpdate = -1;             /* Time */
100 static int hf_x509af_nextUpdate = -1;             /* Time */
101 static int hf_x509af_revokedCertificates = -1;    /* T_revokedCertificates */
102 static int hf_x509af_revokedCertificates_item = -1;  /* T_revokedCertificates_item */
103 static int hf_x509af_revokedUserCertificate = -1;  /* CertificateSerialNumber */
104 static int hf_x509af_revocationDate = -1;         /* Time */
105 static int hf_x509af_crlEntryExtensions = -1;     /* Extensions */
106 static int hf_x509af_crlExtensions = -1;          /* Extensions */
107 static int hf_x509af_attributeCertificate = -1;   /* AttributeCertificate */
108 static int hf_x509af_acPath = -1;                 /* SEQUENCE_OF_ACPathData */
109 static int hf_x509af_acPath_item = -1;            /* ACPathData */
110 static int hf_x509af_certificate = -1;            /* Certificate */
111 static int hf_x509af_signedAttributeCertificateInfo = -1;  /* AttributeCertificateInfo */
112 static int hf_x509af_info_subject = -1;           /* InfoSubject */
113 static int hf_x509af_baseCertificateID = -1;      /* IssuerSerial */
114 static int hf_x509af_infoSubjectName = -1;        /* GeneralNames */
115 static int hf_x509af_issuerName = -1;             /* GeneralNames */
116 static int hf_x509af_attCertValidityPeriod = -1;  /* AttCertValidityPeriod */
117 static int hf_x509af_attributes = -1;             /* SEQUENCE_OF_Attribute */
118 static int hf_x509af_attributes_item = -1;        /* Attribute */
119 static int hf_x509af_issuerUniqueID = -1;         /* UniqueIdentifier */
120 static int hf_x509af_serial = -1;                 /* CertificateSerialNumber */
121 static int hf_x509af_issuerUID = -1;              /* UniqueIdentifier */
122 static int hf_x509af_notBeforeTime = -1;          /* GeneralizedTime */
123 static int hf_x509af_notAfterTime = -1;           /* GeneralizedTime */
124 static int hf_x509af_assertion_subject = -1;      /* AssertionSubject */
125 static int hf_x509af_assertionSubjectName = -1;   /* SubjectName */
126 static int hf_x509af_assertionIssuer = -1;        /* Name */
127 static int hf_x509af_attCertValidity = -1;        /* GeneralizedTime */
128 static int hf_x509af_attType = -1;                /* SET_OF_AttributeType */
129 static int hf_x509af_attType_item = -1;           /* AttributeType */
130 static int hf_x509af_p = -1;                      /* INTEGER */
131 static int hf_x509af_q = -1;                      /* INTEGER */
132 static int hf_x509af_g = -1;                      /* INTEGER */
133
134 /*--- End of included file: packet-x509af-hf.c ---*/
135 #line 49 "../../asn1/x509af/packet-x509af-template.c"
136
137 /* Initialize the subtree pointers */
138 static gint ett_pkix_crl = -1;
139
140 /*--- Included file: packet-x509af-ett.c ---*/
141 #line 1 "../../asn1/x509af/packet-x509af-ett.c"
142 static gint ett_x509af_Certificate = -1;
143 static gint ett_x509af_T_signedCertificate = -1;
144 static gint ett_x509af_SubjectName = -1;
145 static gint ett_x509af_AlgorithmIdentifier = -1;
146 static gint ett_x509af_Validity = -1;
147 static gint ett_x509af_SubjectPublicKeyInfo = -1;
148 static gint ett_x509af_Time = -1;
149 static gint ett_x509af_Extensions = -1;
150 static gint ett_x509af_Extension = -1;
151 static gint ett_x509af_Certificates = -1;
152 static gint ett_x509af_ForwardCertificationPath = -1;
153 static gint ett_x509af_CrossCertificates = -1;
154 static gint ett_x509af_CertificationPath = -1;
155 static gint ett_x509af_SEQUENCE_OF_CertificatePair = -1;
156 static gint ett_x509af_CertificatePair = -1;
157 static gint ett_x509af_CertificateList = -1;
158 static gint ett_x509af_T_signedCertificateList = -1;
159 static gint ett_x509af_T_revokedCertificates = -1;
160 static gint ett_x509af_T_revokedCertificates_item = -1;
161 static gint ett_x509af_AttributeCertificationPath = -1;
162 static gint ett_x509af_SEQUENCE_OF_ACPathData = -1;
163 static gint ett_x509af_ACPathData = -1;
164 static gint ett_x509af_AttributeCertificate = -1;
165 static gint ett_x509af_AttributeCertificateInfo = -1;
166 static gint ett_x509af_InfoSubject = -1;
167 static gint ett_x509af_SEQUENCE_OF_Attribute = -1;
168 static gint ett_x509af_IssuerSerial = -1;
169 static gint ett_x509af_AttCertValidityPeriod = -1;
170 static gint ett_x509af_AttributeCertificateAssertion = -1;
171 static gint ett_x509af_AssertionSubject = -1;
172 static gint ett_x509af_SET_OF_AttributeType = -1;
173 static gint ett_x509af_DSS_Params = -1;
174
175 /*--- End of included file: packet-x509af-ett.c ---*/
176 #line 53 "../../asn1/x509af/packet-x509af-template.c"
177
178 static const char *algorithm_id;
179 static const char *extension_id;
180
181
182 /*--- Included file: packet-x509af-fn.c ---*/
183 #line 1 "../../asn1/x509af/packet-x509af-fn.c"
184
185 const value_string x509af_Version_vals[] = {
186   {   0, "v1" },
187   {   1, "v2" },
188   {   2, "v3" },
189   { 0, NULL }
190 };
191
192
193 int
194 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_) {
195   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
196                                                 NULL);
197
198   return offset;
199 }
200
201
202
203 int
204 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_) {
205   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
206                                                 NULL);
207
208   return offset;
209 }
210
211
212
213 static int
214 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_) {
215 #line 70 "../../asn1/x509af/x509af.cnf"
216   const char *name;
217
218     offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509af_algorithm_id, &algorithm_id);
219
220
221   if(algorithm_id) {
222     name = oid_resolved_from_string(algorithm_id);
223
224     proto_item_append_text(tree, " (%s)", name ? name : algorithm_id); 
225   }
226
227
228
229   return offset;
230 }
231
232
233
234 static int
235 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_) {
236 #line 81 "../../asn1/x509af/x509af.cnf"
237   offset=call_ber_oid_callback(algorithm_id, tvb, offset, actx->pinfo, tree);
238
239
240
241   return offset;
242 }
243
244
245 static const ber_sequence_t AlgorithmIdentifier_sequence[] = {
246   { &hf_x509af_algorithmId  , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_x509af_T_algorithmId },
247   { &hf_x509af_parameters   , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_x509af_T_parameters },
248   { NULL, 0, 0, 0, NULL }
249 };
250
251 int
252 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_) {
253   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
254                                    AlgorithmIdentifier_sequence, hf_index, ett_x509af_AlgorithmIdentifier);
255
256   return offset;
257 }
258
259
260
261 static int
262 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_) {
263   offset = dissect_ber_UTCTime(implicit_tag, actx, tree, tvb, offset, hf_index);
264
265   return offset;
266 }
267
268
269
270 static int
271 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_) {
272   offset = dissect_ber_GeneralizedTime(implicit_tag, actx, tree, tvb, offset, hf_index);
273
274   return offset;
275 }
276
277
278 const value_string x509af_Time_vals[] = {
279   {   0, "utcTime" },
280   {   1, "generalizedTime" },
281   { 0, NULL }
282 };
283
284 static const ber_choice_t Time_choice[] = {
285   {   0, &hf_x509af_utcTime      , BER_CLASS_UNI, BER_UNI_TAG_UTCTime, BER_FLAGS_NOOWNTAG, dissect_x509af_UTCTime },
286   {   1, &hf_x509af_generalizedTime, BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_x509af_GeneralizedTime },
287   { 0, NULL, 0, 0, 0, NULL }
288 };
289
290 int
291 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_) {
292   offset = dissect_ber_choice(actx, tree, tvb, offset,
293                                  Time_choice, hf_index, ett_x509af_Time,
294                                  NULL);
295
296   return offset;
297 }
298
299
300 static const ber_sequence_t Validity_sequence[] = {
301   { &hf_x509af_notBefore    , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_x509af_Time },
302   { &hf_x509af_notAfter     , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_x509af_Time },
303   { NULL, 0, 0, 0, NULL }
304 };
305
306 int
307 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_) {
308   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
309                                    Validity_sequence, hf_index, ett_x509af_Validity);
310
311   return offset;
312 }
313
314
315 static const value_string x509af_SubjectName_vals[] = {
316   {   0, "rdnSequence" },
317   { 0, NULL }
318 };
319
320 static const ber_choice_t SubjectName_choice[] = {
321   {   0, &hf_x509af_rdnSequence  , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509if_RDNSequence },
322   { 0, NULL, 0, 0, 0, NULL }
323 };
324
325 static int
326 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_) {
327 #line 108 "../../asn1/x509af/x509af.cnf"
328
329   const char* str;
330     offset = dissect_ber_choice(actx, tree, tvb, offset,
331                                  SubjectName_choice, hf_index, ett_x509af_SubjectName,
332                                  NULL);
333
334
335   str = x509if_get_last_dn();
336   proto_item_append_text(proto_item_get_parent(tree), " (%s)", str?str:"");
337
338
339
340   return offset;
341 }
342
343
344
345 static int
346 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_) {
347   offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
348                                     NULL, hf_index, -1,
349                                     NULL);
350
351   return offset;
352 }
353
354
355 static const ber_sequence_t SubjectPublicKeyInfo_sequence[] = {
356   { &hf_x509af_algorithm    , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_AlgorithmIdentifier },
357   { &hf_x509af_subjectPublicKey, BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_x509af_BIT_STRING },
358   { NULL, 0, 0, 0, NULL }
359 };
360
361 int
362 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_) {
363   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
364                                    SubjectPublicKeyInfo_sequence, hf_index, ett_x509af_SubjectPublicKeyInfo);
365
366   return offset;
367 }
368
369
370
371 static int
372 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_) {
373 #line 87 "../../asn1/x509af/x509af.cnf"
374   const char *name;
375
376     offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509af_extension_id, &extension_id);
377
378
379   if(extension_id) {
380     name = oid_resolved_from_string(extension_id);
381
382     proto_item_append_text(tree, " (%s)", name ? name : extension_id);
383   }
384
385
386
387   return offset;
388 }
389
390
391
392 static int
393 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_) {
394   offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
395
396   return offset;
397 }
398
399
400
401 static int
402 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_) {
403 #line 98 "../../asn1/x509af/x509af.cnf"
404   gint8 class;
405   gboolean pc, ind;
406   gint32 tag;
407   guint32 len;
408   /* skip past the T and L  */
409   offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
410   offset = dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind);
411   offset=call_ber_oid_callback(extension_id, tvb, offset, actx->pinfo, tree);
412
413
414
415   return offset;
416 }
417
418
419 static const ber_sequence_t Extension_sequence[] = {
420   { &hf_x509af_extnId       , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_x509af_T_extnId },
421   { &hf_x509af_critical     , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_x509af_BOOLEAN },
422   { &hf_x509af_extnValue    , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_x509af_T_extnValue },
423   { NULL, 0, 0, 0, NULL }
424 };
425
426 int
427 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_) {
428   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
429                                    Extension_sequence, hf_index, ett_x509af_Extension);
430
431   return offset;
432 }
433
434
435 static const ber_sequence_t Extensions_sequence_of[1] = {
436   { &hf_x509af_Extensions_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_Extension },
437 };
438
439 int
440 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_) {
441   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
442                                       Extensions_sequence_of, hf_index, ett_x509af_Extensions);
443
444   return offset;
445 }
446
447
448 static const ber_sequence_t T_signedCertificate_sequence[] = {
449   { &hf_x509af_version      , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_x509af_Version },
450   { &hf_x509af_serialNumber , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_x509af_CertificateSerialNumber },
451   { &hf_x509af_signature    , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_AlgorithmIdentifier },
452   { &hf_x509af_issuer       , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_x509if_Name },
453   { &hf_x509af_validity     , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_Validity },
454   { &hf_x509af_subject      , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_x509af_SubjectName },
455   { &hf_x509af_subjectPublicKeyInfo, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_SubjectPublicKeyInfo },
456   { &hf_x509af_issuerUniqueIdentifier, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_x509sat_UniqueIdentifier },
457   { &hf_x509af_subjectUniqueIdentifier, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_x509sat_UniqueIdentifier },
458   { &hf_x509af_extensions   , BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL, dissect_x509af_Extensions },
459   { NULL, 0, 0, 0, NULL }
460 };
461
462 static int
463 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_) {
464   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
465                                    T_signedCertificate_sequence, hf_index, ett_x509af_T_signedCertificate);
466
467   return offset;
468 }
469
470
471 static const ber_sequence_t Certificate_sequence[] = {
472   { &hf_x509af_signedCertificate, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_T_signedCertificate },
473   { &hf_x509af_algorithmIdentifier, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_AlgorithmIdentifier },
474   { &hf_x509af_encrypted    , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_x509af_BIT_STRING },
475   { NULL, 0, 0, 0, NULL }
476 };
477
478 int
479 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_) {
480   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
481                                    Certificate_sequence, hf_index, ett_x509af_Certificate);
482
483   return offset;
484 }
485
486
487 static const ber_sequence_t CrossCertificates_set_of[1] = {
488   { &hf_x509af_CrossCertificates_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_Certificate },
489 };
490
491 int
492 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_) {
493   offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset,
494                                  CrossCertificates_set_of, hf_index, ett_x509af_CrossCertificates);
495
496   return offset;
497 }
498
499
500 static const ber_sequence_t ForwardCertificationPath_sequence_of[1] = {
501   { &hf_x509af_ForwardCertificationPath_item, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_x509af_CrossCertificates },
502 };
503
504 int
505 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_) {
506   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
507                                       ForwardCertificationPath_sequence_of, hf_index, ett_x509af_ForwardCertificationPath);
508
509   return offset;
510 }
511
512
513 static const ber_sequence_t Certificates_sequence[] = {
514   { &hf_x509af_userCertificate, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_Certificate },
515   { &hf_x509af_certificationPath, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_x509af_ForwardCertificationPath },
516   { NULL, 0, 0, 0, NULL }
517 };
518
519 int
520 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_) {
521   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
522                                    Certificates_sequence, hf_index, ett_x509af_Certificates);
523
524   return offset;
525 }
526
527
528 static const ber_sequence_t CertificatePair_sequence[] = {
529   { &hf_x509af_issuedByThisCA, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_x509af_Certificate },
530   { &hf_x509af_issuedToThisCA, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_x509af_Certificate },
531   { NULL, 0, 0, 0, NULL }
532 };
533
534 int
535 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_) {
536   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
537                                    CertificatePair_sequence, hf_index, ett_x509af_CertificatePair);
538
539   return offset;
540 }
541
542
543 static const ber_sequence_t SEQUENCE_OF_CertificatePair_sequence_of[1] = {
544   { &hf_x509af_theCACertificates_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_CertificatePair },
545 };
546
547 static int
548 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_) {
549   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
550                                       SEQUENCE_OF_CertificatePair_sequence_of, hf_index, ett_x509af_SEQUENCE_OF_CertificatePair);
551
552   return offset;
553 }
554
555
556 static const ber_sequence_t CertificationPath_sequence[] = {
557   { &hf_x509af_userCertificate, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_Certificate },
558   { &hf_x509af_theCACertificates, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_x509af_SEQUENCE_OF_CertificatePair },
559   { NULL, 0, 0, 0, NULL }
560 };
561
562 int
563 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_) {
564   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
565                                    CertificationPath_sequence, hf_index, ett_x509af_CertificationPath);
566
567   return offset;
568 }
569
570
571 static const ber_sequence_t T_revokedCertificates_item_sequence[] = {
572   { &hf_x509af_revokedUserCertificate, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_x509af_CertificateSerialNumber },
573   { &hf_x509af_revocationDate, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_x509af_Time },
574   { &hf_x509af_crlEntryExtensions, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_x509af_Extensions },
575   { NULL, 0, 0, 0, NULL }
576 };
577
578 static int
579 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_) {
580   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
581                                    T_revokedCertificates_item_sequence, hf_index, ett_x509af_T_revokedCertificates_item);
582
583   return offset;
584 }
585
586
587 static const ber_sequence_t T_revokedCertificates_sequence_of[1] = {
588   { &hf_x509af_revokedCertificates_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_T_revokedCertificates_item },
589 };
590
591 static int
592 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_) {
593   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
594                                       T_revokedCertificates_sequence_of, hf_index, ett_x509af_T_revokedCertificates);
595
596   return offset;
597 }
598
599
600 static const ber_sequence_t T_signedCertificateList_sequence[] = {
601   { &hf_x509af_version      , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_x509af_Version },
602   { &hf_x509af_signature    , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_AlgorithmIdentifier },
603   { &hf_x509af_issuer       , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_x509if_Name },
604   { &hf_x509af_thisUpdate   , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_x509af_Time },
605   { &hf_x509af_nextUpdate   , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_x509af_Time },
606   { &hf_x509af_revokedCertificates, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_x509af_T_revokedCertificates },
607   { &hf_x509af_crlExtensions, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_x509af_Extensions },
608   { NULL, 0, 0, 0, NULL }
609 };
610
611 static int
612 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_) {
613   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
614                                    T_signedCertificateList_sequence, hf_index, ett_x509af_T_signedCertificateList);
615
616   return offset;
617 }
618
619
620 static const ber_sequence_t CertificateList_sequence[] = {
621   { &hf_x509af_signedCertificateList, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_T_signedCertificateList },
622   { &hf_x509af_algorithmIdentifier, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_AlgorithmIdentifier },
623   { &hf_x509af_encrypted    , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_x509af_BIT_STRING },
624   { NULL, 0, 0, 0, NULL }
625 };
626
627 int
628 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_) {
629   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
630                                    CertificateList_sequence, hf_index, ett_x509af_CertificateList);
631
632   return offset;
633 }
634
635
636 static const ber_sequence_t IssuerSerial_sequence[] = {
637   { &hf_x509af_issuerName   , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509ce_GeneralNames },
638   { &hf_x509af_serial       , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_x509af_CertificateSerialNumber },
639   { &hf_x509af_issuerUID    , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_x509sat_UniqueIdentifier },
640   { NULL, 0, 0, 0, NULL }
641 };
642
643 int
644 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_) {
645   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
646                                    IssuerSerial_sequence, hf_index, ett_x509af_IssuerSerial);
647
648   return offset;
649 }
650
651
652 static const value_string x509af_InfoSubject_vals[] = {
653   {   0, "baseCertificateID" },
654   {   1, "subjectName" },
655   { 0, NULL }
656 };
657
658 static const ber_choice_t InfoSubject_choice[] = {
659   {   0, &hf_x509af_baseCertificateID, BER_CLASS_CON, 0, 0, dissect_x509af_IssuerSerial },
660   {   1, &hf_x509af_infoSubjectName, BER_CLASS_CON, 1, 0, dissect_x509ce_GeneralNames },
661   { 0, NULL, 0, 0, 0, NULL }
662 };
663
664 static int
665 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_) {
666   offset = dissect_ber_choice(actx, tree, tvb, offset,
667                                  InfoSubject_choice, hf_index, ett_x509af_InfoSubject,
668                                  NULL);
669
670   return offset;
671 }
672
673
674 static const ber_sequence_t AttCertValidityPeriod_sequence[] = {
675   { &hf_x509af_notBeforeTime, BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_x509af_GeneralizedTime },
676   { &hf_x509af_notAfterTime , BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_x509af_GeneralizedTime },
677   { NULL, 0, 0, 0, NULL }
678 };
679
680 int
681 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_) {
682   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
683                                    AttCertValidityPeriod_sequence, hf_index, ett_x509af_AttCertValidityPeriod);
684
685   return offset;
686 }
687
688
689 static const ber_sequence_t SEQUENCE_OF_Attribute_sequence_of[1] = {
690   { &hf_x509af_attributes_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509if_Attribute },
691 };
692
693 static int
694 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_) {
695   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
696                                       SEQUENCE_OF_Attribute_sequence_of, hf_index, ett_x509af_SEQUENCE_OF_Attribute);
697
698   return offset;
699 }
700
701
702 static const ber_sequence_t AttributeCertificateInfo_sequence[] = {
703   { &hf_x509af_version      , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_x509af_Version },
704   { &hf_x509af_info_subject , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_x509af_InfoSubject },
705   { &hf_x509af_issuerName   , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509ce_GeneralNames },
706   { &hf_x509af_signature    , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_AlgorithmIdentifier },
707   { &hf_x509af_serialNumber , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_x509af_CertificateSerialNumber },
708   { &hf_x509af_attCertValidityPeriod, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_AttCertValidityPeriod },
709   { &hf_x509af_attributes   , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_SEQUENCE_OF_Attribute },
710   { &hf_x509af_issuerUniqueID, BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_x509sat_UniqueIdentifier },
711   { &hf_x509af_extensions   , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_x509af_Extensions },
712   { NULL, 0, 0, 0, NULL }
713 };
714
715 int
716 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_) {
717   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
718                                    AttributeCertificateInfo_sequence, hf_index, ett_x509af_AttributeCertificateInfo);
719
720   return offset;
721 }
722
723
724 static const ber_sequence_t AttributeCertificate_sequence[] = {
725   { &hf_x509af_signedAttributeCertificateInfo, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_AttributeCertificateInfo },
726   { &hf_x509af_algorithmIdentifier, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_AlgorithmIdentifier },
727   { &hf_x509af_encrypted    , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_x509af_BIT_STRING },
728   { NULL, 0, 0, 0, NULL }
729 };
730
731 int
732 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_) {
733   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
734                                    AttributeCertificate_sequence, hf_index, ett_x509af_AttributeCertificate);
735
736   return offset;
737 }
738
739
740 static const ber_sequence_t ACPathData_sequence[] = {
741   { &hf_x509af_certificate  , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_x509af_Certificate },
742   { &hf_x509af_attributeCertificate, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_x509af_AttributeCertificate },
743   { NULL, 0, 0, 0, NULL }
744 };
745
746 int
747 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_) {
748   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
749                                    ACPathData_sequence, hf_index, ett_x509af_ACPathData);
750
751   return offset;
752 }
753
754
755 static const ber_sequence_t SEQUENCE_OF_ACPathData_sequence_of[1] = {
756   { &hf_x509af_acPath_item  , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_ACPathData },
757 };
758
759 static int
760 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_) {
761   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
762                                       SEQUENCE_OF_ACPathData_sequence_of, hf_index, ett_x509af_SEQUENCE_OF_ACPathData);
763
764   return offset;
765 }
766
767
768 static const ber_sequence_t AttributeCertificationPath_sequence[] = {
769   { &hf_x509af_attributeCertificate, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_AttributeCertificate },
770   { &hf_x509af_acPath       , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_x509af_SEQUENCE_OF_ACPathData },
771   { NULL, 0, 0, 0, NULL }
772 };
773
774 int
775 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_) {
776   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
777                                    AttributeCertificationPath_sequence, hf_index, ett_x509af_AttributeCertificationPath);
778
779   return offset;
780 }
781
782
783 static const value_string x509af_AssertionSubject_vals[] = {
784   {   0, "baseCertificateID" },
785   {   1, "subjectName" },
786   { 0, NULL }
787 };
788
789 static const ber_choice_t AssertionSubject_choice[] = {
790   {   0, &hf_x509af_baseCertificateID, BER_CLASS_CON, 0, 0, dissect_x509af_IssuerSerial },
791   {   1, &hf_x509af_assertionSubjectName, BER_CLASS_CON, 1, 0, dissect_x509af_SubjectName },
792   { 0, NULL, 0, 0, 0, NULL }
793 };
794
795 static int
796 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_) {
797   offset = dissect_ber_choice(actx, tree, tvb, offset,
798                                  AssertionSubject_choice, hf_index, ett_x509af_AssertionSubject,
799                                  NULL);
800
801   return offset;
802 }
803
804
805 static const ber_sequence_t SET_OF_AttributeType_set_of[1] = {
806   { &hf_x509af_attType_item , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_x509if_AttributeType },
807 };
808
809 static int
810 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_) {
811   offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset,
812                                  SET_OF_AttributeType_set_of, hf_index, ett_x509af_SET_OF_AttributeType);
813
814   return offset;
815 }
816
817
818 static const ber_sequence_t AttributeCertificateAssertion_sequence[] = {
819   { &hf_x509af_assertion_subject, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_x509af_AssertionSubject },
820   { &hf_x509af_assertionIssuer, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_x509if_Name },
821   { &hf_x509af_attCertValidity, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_x509af_GeneralizedTime },
822   { &hf_x509af_attType      , BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL, dissect_x509af_SET_OF_AttributeType },
823   { NULL, 0, 0, 0, NULL }
824 };
825
826 int
827 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_) {
828   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
829                                    AttributeCertificateAssertion_sequence, hf_index, ett_x509af_AttributeCertificateAssertion);
830
831   return offset;
832 }
833
834
835
836 static int
837 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_) {
838   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
839                                                 NULL);
840
841   return offset;
842 }
843
844
845 static const ber_sequence_t DSS_Params_sequence[] = {
846   { &hf_x509af_p            , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_x509af_INTEGER },
847   { &hf_x509af_q            , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_x509af_INTEGER },
848   { &hf_x509af_g            , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_x509af_INTEGER },
849   { NULL, 0, 0, 0, NULL }
850 };
851
852 static int
853 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_) {
854   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
855                                    DSS_Params_sequence, hf_index, ett_x509af_DSS_Params);
856
857   return offset;
858 }
859
860 /*--- PDUs ---*/
861
862 void dissect_x509af_Certificate_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
863   asn1_ctx_t asn1_ctx;
864   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
865   dissect_x509af_Certificate(FALSE, tvb, 0, &asn1_ctx, tree, hf_x509af_x509af_Certificate_PDU);
866 }
867 static void dissect_CertificatePair_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
868   asn1_ctx_t asn1_ctx;
869   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
870   dissect_x509af_CertificatePair(FALSE, tvb, 0, &asn1_ctx, tree, hf_x509af_CertificatePair_PDU);
871 }
872 static void dissect_CertificateList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
873   asn1_ctx_t asn1_ctx;
874   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
875   dissect_x509af_CertificateList(FALSE, tvb, 0, &asn1_ctx, tree, hf_x509af_CertificateList_PDU);
876 }
877 static void dissect_AttributeCertificate_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
878   asn1_ctx_t asn1_ctx;
879   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
880   dissect_x509af_AttributeCertificate(FALSE, tvb, 0, &asn1_ctx, tree, hf_x509af_AttributeCertificate_PDU);
881 }
882 static void dissect_DSS_Params_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
883   asn1_ctx_t asn1_ctx;
884   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
885   dissect_x509af_DSS_Params(FALSE, tvb, 0, &asn1_ctx, tree, hf_x509af_DSS_Params_PDU);
886 }
887
888
889 /*--- End of included file: packet-x509af-fn.c ---*/
890 #line 58 "../../asn1/x509af/packet-x509af-template.c"
891
892 const char *x509af_get_last_algorithm_id(void) {
893   return algorithm_id;
894 }
895
896
897 static int
898 dissect_pkix_crl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U_)
899 {
900         proto_item *item=NULL;
901         proto_tree *tree=NULL;
902         asn1_ctx_t asn1_ctx;
903         asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
904
905         col_set_str(pinfo->cinfo, COL_PROTOCOL, "PKIX-CRL");
906
907         col_set_str(pinfo->cinfo, COL_INFO, "Certificate Revocation List");
908
909
910         if(parent_tree){
911                 item=proto_tree_add_text(parent_tree, tvb, 0, -1, "Certificate Revocation List");
912                 tree = proto_item_add_subtree(item, ett_pkix_crl);
913         }
914
915         return dissect_x509af_CertificateList(FALSE, tvb, 0, &asn1_ctx, tree, -1);
916 }
917
918 /*--- proto_register_x509af ----------------------------------------------*/
919 void proto_register_x509af(void) {
920
921   /* List of fields */
922   static hf_register_info hf[] = {
923     { &hf_x509af_algorithm_id,
924       { "Algorithm Id", "x509af.algorithm.id",
925         FT_OID, BASE_NONE, NULL, 0,
926         NULL, HFILL }},
927     { &hf_x509af_extension_id,
928       { "Extension Id", "x509af.extension.id",
929         FT_OID, BASE_NONE, NULL, 0,
930         NULL, HFILL }},
931
932 /*--- Included file: packet-x509af-hfarr.c ---*/
933 #line 1 "../../asn1/x509af/packet-x509af-hfarr.c"
934     { &hf_x509af_x509af_Certificate_PDU,
935       { "Certificate", "x509af.Certificate",
936         FT_NONE, BASE_NONE, NULL, 0,
937         NULL, HFILL }},
938     { &hf_x509af_CertificatePair_PDU,
939       { "CertificatePair", "x509af.CertificatePair",
940         FT_NONE, BASE_NONE, NULL, 0,
941         NULL, HFILL }},
942     { &hf_x509af_CertificateList_PDU,
943       { "CertificateList", "x509af.CertificateList",
944         FT_NONE, BASE_NONE, NULL, 0,
945         NULL, HFILL }},
946     { &hf_x509af_AttributeCertificate_PDU,
947       { "AttributeCertificate", "x509af.AttributeCertificate",
948         FT_NONE, BASE_NONE, NULL, 0,
949         NULL, HFILL }},
950     { &hf_x509af_DSS_Params_PDU,
951       { "DSS-Params", "x509af.DSS_Params",
952         FT_NONE, BASE_NONE, NULL, 0,
953         NULL, HFILL }},
954     { &hf_x509af_signedCertificate,
955       { "signedCertificate", "x509af.signedCertificate",
956         FT_NONE, BASE_NONE, NULL, 0,
957         NULL, HFILL }},
958     { &hf_x509af_version,
959       { "version", "x509af.version",
960         FT_INT32, BASE_DEC, VALS(x509af_Version_vals), 0,
961         NULL, HFILL }},
962     { &hf_x509af_serialNumber,
963       { "serialNumber", "x509af.serialNumber",
964         FT_INT32, BASE_DEC, NULL, 0,
965         "CertificateSerialNumber", HFILL }},
966     { &hf_x509af_signature,
967       { "signature", "x509af.signature",
968         FT_NONE, BASE_NONE, NULL, 0,
969         "AlgorithmIdentifier", HFILL }},
970     { &hf_x509af_issuer,
971       { "issuer", "x509af.issuer",
972         FT_UINT32, BASE_DEC, VALS(x509if_Name_vals), 0,
973         "Name", HFILL }},
974     { &hf_x509af_validity,
975       { "validity", "x509af.validity",
976         FT_NONE, BASE_NONE, NULL, 0,
977         NULL, HFILL }},
978     { &hf_x509af_subject,
979       { "subject", "x509af.subject",
980         FT_UINT32, BASE_DEC, VALS(x509af_SubjectName_vals), 0,
981         "SubjectName", HFILL }},
982     { &hf_x509af_subjectPublicKeyInfo,
983       { "subjectPublicKeyInfo", "x509af.subjectPublicKeyInfo",
984         FT_NONE, BASE_NONE, NULL, 0,
985         NULL, HFILL }},
986     { &hf_x509af_issuerUniqueIdentifier,
987       { "issuerUniqueIdentifier", "x509af.issuerUniqueIdentifier",
988         FT_BYTES, BASE_NONE, NULL, 0,
989         "UniqueIdentifier", HFILL }},
990     { &hf_x509af_subjectUniqueIdentifier,
991       { "subjectUniqueIdentifier", "x509af.subjectUniqueIdentifier",
992         FT_BYTES, BASE_NONE, NULL, 0,
993         "UniqueIdentifier", HFILL }},
994     { &hf_x509af_extensions,
995       { "extensions", "x509af.extensions",
996         FT_UINT32, BASE_DEC, NULL, 0,
997         NULL, HFILL }},
998     { &hf_x509af_algorithmIdentifier,
999       { "algorithmIdentifier", "x509af.algorithmIdentifier",
1000         FT_NONE, BASE_NONE, NULL, 0,
1001         NULL, HFILL }},
1002     { &hf_x509af_encrypted,
1003       { "encrypted", "x509af.encrypted",
1004         FT_BYTES, BASE_NONE, NULL, 0,
1005         "BIT_STRING", HFILL }},
1006     { &hf_x509af_rdnSequence,
1007       { "rdnSequence", "x509af.rdnSequence",
1008         FT_UINT32, BASE_DEC, NULL, 0,
1009         NULL, HFILL }},
1010     { &hf_x509af_algorithmId,
1011       { "algorithmId", "x509af.algorithmId",
1012         FT_OID, BASE_NONE, NULL, 0,
1013         NULL, HFILL }},
1014     { &hf_x509af_parameters,
1015       { "parameters", "x509af.parameters",
1016         FT_NONE, BASE_NONE, NULL, 0,
1017         NULL, HFILL }},
1018     { &hf_x509af_notBefore,
1019       { "notBefore", "x509af.notBefore",
1020         FT_UINT32, BASE_DEC, VALS(x509af_Time_vals), 0,
1021         "Time", HFILL }},
1022     { &hf_x509af_notAfter,
1023       { "notAfter", "x509af.notAfter",
1024         FT_UINT32, BASE_DEC, VALS(x509af_Time_vals), 0,
1025         "Time", HFILL }},
1026     { &hf_x509af_algorithm,
1027       { "algorithm", "x509af.algorithm",
1028         FT_NONE, BASE_NONE, NULL, 0,
1029         "AlgorithmIdentifier", HFILL }},
1030     { &hf_x509af_subjectPublicKey,
1031       { "subjectPublicKey", "x509af.subjectPublicKey",
1032         FT_BYTES, BASE_NONE, NULL, 0,
1033         "BIT_STRING", HFILL }},
1034     { &hf_x509af_utcTime,
1035       { "utcTime", "x509af.utcTime",
1036         FT_STRING, BASE_NONE, NULL, 0,
1037         NULL, HFILL }},
1038     { &hf_x509af_generalizedTime,
1039       { "generalizedTime", "x509af.generalizedTime",
1040         FT_STRING, BASE_NONE, NULL, 0,
1041         NULL, HFILL }},
1042     { &hf_x509af_Extensions_item,
1043       { "Extension", "x509af.Extension",
1044         FT_NONE, BASE_NONE, NULL, 0,
1045         NULL, HFILL }},
1046     { &hf_x509af_extnId,
1047       { "extnId", "x509af.extnId",
1048         FT_OID, BASE_NONE, NULL, 0,
1049         NULL, HFILL }},
1050     { &hf_x509af_critical,
1051       { "critical", "x509af.critical",
1052         FT_BOOLEAN, BASE_NONE, NULL, 0,
1053         "BOOLEAN", HFILL }},
1054     { &hf_x509af_extnValue,
1055       { "extnValue", "x509af.extnValue",
1056         FT_BYTES, BASE_NONE, NULL, 0,
1057         NULL, HFILL }},
1058     { &hf_x509af_userCertificate,
1059       { "userCertificate", "x509af.userCertificate",
1060         FT_NONE, BASE_NONE, NULL, 0,
1061         "Certificate", HFILL }},
1062     { &hf_x509af_certificationPath,
1063       { "certificationPath", "x509af.certificationPath",
1064         FT_UINT32, BASE_DEC, NULL, 0,
1065         "ForwardCertificationPath", HFILL }},
1066     { &hf_x509af_ForwardCertificationPath_item,
1067       { "CrossCertificates", "x509af.CrossCertificates",
1068         FT_UINT32, BASE_DEC, NULL, 0,
1069         NULL, HFILL }},
1070     { &hf_x509af_CrossCertificates_item,
1071       { "Certificate", "x509af.Certificate",
1072         FT_NONE, BASE_NONE, NULL, 0,
1073         NULL, HFILL }},
1074     { &hf_x509af_theCACertificates,
1075       { "theCACertificates", "x509af.theCACertificates",
1076         FT_UINT32, BASE_DEC, NULL, 0,
1077         "SEQUENCE_OF_CertificatePair", HFILL }},
1078     { &hf_x509af_theCACertificates_item,
1079       { "CertificatePair", "x509af.CertificatePair",
1080         FT_NONE, BASE_NONE, NULL, 0,
1081         NULL, HFILL }},
1082     { &hf_x509af_issuedByThisCA,
1083       { "issuedByThisCA", "x509af.issuedByThisCA",
1084         FT_NONE, BASE_NONE, NULL, 0,
1085         "Certificate", HFILL }},
1086     { &hf_x509af_issuedToThisCA,
1087       { "issuedToThisCA", "x509af.issuedToThisCA",
1088         FT_NONE, BASE_NONE, NULL, 0,
1089         "Certificate", HFILL }},
1090     { &hf_x509af_signedCertificateList,
1091       { "signedCertificateList", "x509af.signedCertificateList",
1092         FT_NONE, BASE_NONE, NULL, 0,
1093         NULL, HFILL }},
1094     { &hf_x509af_thisUpdate,
1095       { "thisUpdate", "x509af.thisUpdate",
1096         FT_UINT32, BASE_DEC, VALS(x509af_Time_vals), 0,
1097         "Time", HFILL }},
1098     { &hf_x509af_nextUpdate,
1099       { "nextUpdate", "x509af.nextUpdate",
1100         FT_UINT32, BASE_DEC, VALS(x509af_Time_vals), 0,
1101         "Time", HFILL }},
1102     { &hf_x509af_revokedCertificates,
1103       { "revokedCertificates", "x509af.revokedCertificates",
1104         FT_UINT32, BASE_DEC, NULL, 0,
1105         NULL, HFILL }},
1106     { &hf_x509af_revokedCertificates_item,
1107       { "revokedCertificates item", "x509af.revokedCertificates_item",
1108         FT_NONE, BASE_NONE, NULL, 0,
1109         NULL, HFILL }},
1110     { &hf_x509af_revokedUserCertificate,
1111       { "userCertificate", "x509af.userCertificate",
1112         FT_INT32, BASE_DEC, NULL, 0,
1113         "CertificateSerialNumber", HFILL }},
1114     { &hf_x509af_revocationDate,
1115       { "revocationDate", "x509af.revocationDate",
1116         FT_UINT32, BASE_DEC, VALS(x509af_Time_vals), 0,
1117         "Time", HFILL }},
1118     { &hf_x509af_crlEntryExtensions,
1119       { "crlEntryExtensions", "x509af.crlEntryExtensions",
1120         FT_UINT32, BASE_DEC, NULL, 0,
1121         "Extensions", HFILL }},
1122     { &hf_x509af_crlExtensions,
1123       { "crlExtensions", "x509af.crlExtensions",
1124         FT_UINT32, BASE_DEC, NULL, 0,
1125         "Extensions", HFILL }},
1126     { &hf_x509af_attributeCertificate,
1127       { "attributeCertificate", "x509af.attributeCertificate",
1128         FT_NONE, BASE_NONE, NULL, 0,
1129         NULL, HFILL }},
1130     { &hf_x509af_acPath,
1131       { "acPath", "x509af.acPath",
1132         FT_UINT32, BASE_DEC, NULL, 0,
1133         "SEQUENCE_OF_ACPathData", HFILL }},
1134     { &hf_x509af_acPath_item,
1135       { "ACPathData", "x509af.ACPathData",
1136         FT_NONE, BASE_NONE, NULL, 0,
1137         NULL, HFILL }},
1138     { &hf_x509af_certificate,
1139       { "certificate", "x509af.certificate",
1140         FT_NONE, BASE_NONE, NULL, 0,
1141         NULL, HFILL }},
1142     { &hf_x509af_signedAttributeCertificateInfo,
1143       { "signedAttributeCertificateInfo", "x509af.signedAttributeCertificateInfo",
1144         FT_NONE, BASE_NONE, NULL, 0,
1145         "AttributeCertificateInfo", HFILL }},
1146     { &hf_x509af_info_subject,
1147       { "subject", "x509af.subject",
1148         FT_UINT32, BASE_DEC, VALS(x509af_InfoSubject_vals), 0,
1149         "InfoSubject", HFILL }},
1150     { &hf_x509af_baseCertificateID,
1151       { "baseCertificateID", "x509af.baseCertificateID",
1152         FT_NONE, BASE_NONE, NULL, 0,
1153         "IssuerSerial", HFILL }},
1154     { &hf_x509af_infoSubjectName,
1155       { "subjectName", "x509af.subjectName",
1156         FT_UINT32, BASE_DEC, NULL, 0,
1157         "GeneralNames", HFILL }},
1158     { &hf_x509af_issuerName,
1159       { "issuer", "x509af.issuer",
1160         FT_UINT32, BASE_DEC, NULL, 0,
1161         "GeneralNames", HFILL }},
1162     { &hf_x509af_attCertValidityPeriod,
1163       { "attCertValidityPeriod", "x509af.attCertValidityPeriod",
1164         FT_NONE, BASE_NONE, NULL, 0,
1165         NULL, HFILL }},
1166     { &hf_x509af_attributes,
1167       { "attributes", "x509af.attributes",
1168         FT_UINT32, BASE_DEC, NULL, 0,
1169         "SEQUENCE_OF_Attribute", HFILL }},
1170     { &hf_x509af_attributes_item,
1171       { "Attribute", "x509af.Attribute",
1172         FT_NONE, BASE_NONE, NULL, 0,
1173         NULL, HFILL }},
1174     { &hf_x509af_issuerUniqueID,
1175       { "issuerUniqueID", "x509af.issuerUniqueID",
1176         FT_BYTES, BASE_NONE, NULL, 0,
1177         "UniqueIdentifier", HFILL }},
1178     { &hf_x509af_serial,
1179       { "serial", "x509af.serial",
1180         FT_INT32, BASE_DEC, NULL, 0,
1181         "CertificateSerialNumber", HFILL }},
1182     { &hf_x509af_issuerUID,
1183       { "issuerUID", "x509af.issuerUID",
1184         FT_BYTES, BASE_NONE, NULL, 0,
1185         "UniqueIdentifier", HFILL }},
1186     { &hf_x509af_notBeforeTime,
1187       { "notBeforeTime", "x509af.notBeforeTime",
1188         FT_STRING, BASE_NONE, NULL, 0,
1189         "GeneralizedTime", HFILL }},
1190     { &hf_x509af_notAfterTime,
1191       { "notAfterTime", "x509af.notAfterTime",
1192         FT_STRING, BASE_NONE, NULL, 0,
1193         "GeneralizedTime", HFILL }},
1194     { &hf_x509af_assertion_subject,
1195       { "subject", "x509af.subject",
1196         FT_UINT32, BASE_DEC, VALS(x509af_AssertionSubject_vals), 0,
1197         "AssertionSubject", HFILL }},
1198     { &hf_x509af_assertionSubjectName,
1199       { "subjectName", "x509af.subjectName",
1200         FT_UINT32, BASE_DEC, VALS(x509af_SubjectName_vals), 0,
1201         NULL, HFILL }},
1202     { &hf_x509af_assertionIssuer,
1203       { "issuer", "x509af.issuer",
1204         FT_UINT32, BASE_DEC, VALS(x509if_Name_vals), 0,
1205         "Name", HFILL }},
1206     { &hf_x509af_attCertValidity,
1207       { "attCertValidity", "x509af.attCertValidity",
1208         FT_STRING, BASE_NONE, NULL, 0,
1209         "GeneralizedTime", HFILL }},
1210     { &hf_x509af_attType,
1211       { "attType", "x509af.attType",
1212         FT_UINT32, BASE_DEC, NULL, 0,
1213         "SET_OF_AttributeType", HFILL }},
1214     { &hf_x509af_attType_item,
1215       { "AttributeType", "x509af.AttributeType",
1216         FT_OID, BASE_NONE, NULL, 0,
1217         NULL, HFILL }},
1218     { &hf_x509af_p,
1219       { "p", "x509af.p",
1220         FT_INT32, BASE_DEC, NULL, 0,
1221         "INTEGER", HFILL }},
1222     { &hf_x509af_q,
1223       { "q", "x509af.q",
1224         FT_INT32, BASE_DEC, NULL, 0,
1225         "INTEGER", HFILL }},
1226     { &hf_x509af_g,
1227       { "g", "x509af.g",
1228         FT_INT32, BASE_DEC, NULL, 0,
1229         "INTEGER", HFILL }},
1230
1231 /*--- End of included file: packet-x509af-hfarr.c ---*/
1232 #line 99 "../../asn1/x509af/packet-x509af-template.c"
1233   };
1234
1235   /* List of subtrees */
1236   static gint *ett[] = {
1237     &ett_pkix_crl,
1238
1239 /*--- Included file: packet-x509af-ettarr.c ---*/
1240 #line 1 "../../asn1/x509af/packet-x509af-ettarr.c"
1241     &ett_x509af_Certificate,
1242     &ett_x509af_T_signedCertificate,
1243     &ett_x509af_SubjectName,
1244     &ett_x509af_AlgorithmIdentifier,
1245     &ett_x509af_Validity,
1246     &ett_x509af_SubjectPublicKeyInfo,
1247     &ett_x509af_Time,
1248     &ett_x509af_Extensions,
1249     &ett_x509af_Extension,
1250     &ett_x509af_Certificates,
1251     &ett_x509af_ForwardCertificationPath,
1252     &ett_x509af_CrossCertificates,
1253     &ett_x509af_CertificationPath,
1254     &ett_x509af_SEQUENCE_OF_CertificatePair,
1255     &ett_x509af_CertificatePair,
1256     &ett_x509af_CertificateList,
1257     &ett_x509af_T_signedCertificateList,
1258     &ett_x509af_T_revokedCertificates,
1259     &ett_x509af_T_revokedCertificates_item,
1260     &ett_x509af_AttributeCertificationPath,
1261     &ett_x509af_SEQUENCE_OF_ACPathData,
1262     &ett_x509af_ACPathData,
1263     &ett_x509af_AttributeCertificate,
1264     &ett_x509af_AttributeCertificateInfo,
1265     &ett_x509af_InfoSubject,
1266     &ett_x509af_SEQUENCE_OF_Attribute,
1267     &ett_x509af_IssuerSerial,
1268     &ett_x509af_AttCertValidityPeriod,
1269     &ett_x509af_AttributeCertificateAssertion,
1270     &ett_x509af_AssertionSubject,
1271     &ett_x509af_SET_OF_AttributeType,
1272     &ett_x509af_DSS_Params,
1273
1274 /*--- End of included file: packet-x509af-ettarr.c ---*/
1275 #line 105 "../../asn1/x509af/packet-x509af-template.c"
1276   };
1277
1278   /* Register protocol */
1279   proto_x509af = proto_register_protocol(PNAME, PSNAME, PFNAME);
1280
1281   /* Register fields and subtrees */
1282   proto_register_field_array(proto_x509af, hf, array_length(hf));
1283   proto_register_subtree_array(ett, array_length(ett));
1284
1285
1286   register_ber_syntax_dissector("Certificate", proto_x509af, dissect_x509af_Certificate_PDU); 
1287   register_ber_syntax_dissector("CertificateList", proto_x509af, dissect_CertificateList_PDU); 
1288   register_ber_syntax_dissector("CrossCertificatePair", proto_x509af, dissect_CertificatePair_PDU); 
1289
1290   register_ber_oid_syntax(".cer", NULL, "Certificate");
1291   register_ber_oid_syntax(".crt", NULL, "Certificate");
1292   register_ber_oid_syntax(".crl", NULL, "CertificateList");
1293 }
1294
1295
1296 /*--- proto_reg_handoff_x509af -------------------------------------------*/
1297 void proto_reg_handoff_x509af(void) {
1298         dissector_handle_t pkix_crl_handle;
1299
1300         pkix_crl_handle = new_create_dissector_handle(dissect_pkix_crl, proto_x509af);
1301         dissector_add_string("media_type", "application/pkix-crl", pkix_crl_handle);
1302
1303
1304 /*--- Included file: packet-x509af-dis-tab.c ---*/
1305 #line 1 "../../asn1/x509af/packet-x509af-dis-tab.c"
1306   register_ber_oid_dissector("2.5.4.36", dissect_x509af_Certificate_PDU, proto_x509af, "id-at-userCertificate");
1307   register_ber_oid_dissector("2.5.4.37", dissect_x509af_Certificate_PDU, proto_x509af, "id-at-cAcertificate");
1308   register_ber_oid_dissector("2.5.4.38", dissect_CertificateList_PDU, proto_x509af, "id-at-authorityRevocationList");
1309   register_ber_oid_dissector("2.5.4.39", dissect_CertificateList_PDU, proto_x509af, "id-at-certificateRevocationList");
1310   register_ber_oid_dissector("2.5.4.40", dissect_CertificatePair_PDU, proto_x509af, "id-at-crossCertificatePair");
1311   register_ber_oid_dissector("2.5.4.58", dissect_AttributeCertificate_PDU, proto_x509af, "id-at-attributeCertificate");
1312   register_ber_oid_dissector("2.5.4.59", dissect_CertificateList_PDU, proto_x509af, "id-at-attributeCertificateRevocationList");
1313   register_ber_oid_dissector("1.2.840.10040.4.1", dissect_DSS_Params_PDU, proto_x509af, "id-dsa");
1314
1315
1316 /*--- End of included file: packet-x509af-dis-tab.c ---*/
1317 #line 133 "../../asn1/x509af/packet-x509af-template.c"
1318
1319         /*XXX these should really go to a better place but since that
1320           I have not that ITU standard, ill put it here for the time
1321           being.
1322           Only implemented those algorithms that take no parameters 
1323           for the time being,   ronnie
1324         */
1325         /* from http://www.alvestrand.no/objectid/1.3.14.3.2.html */
1326         register_ber_oid_dissector("1.3.14.3.2.2", dissect_ber_oid_NULL_callback, proto_x509af, "md4WithRSA");
1327         register_ber_oid_dissector("1.3.14.3.2.3", dissect_ber_oid_NULL_callback, proto_x509af, "md5WithRSA");
1328         register_ber_oid_dissector("1.3.14.3.2.4", dissect_ber_oid_NULL_callback, proto_x509af, "md4WithRSAEncryption");
1329         register_ber_oid_dissector("1.3.14.3.2.6", dissect_ber_oid_NULL_callback, proto_x509af, "desECB");
1330         register_ber_oid_dissector("1.3.14.3.2.11", dissect_ber_oid_NULL_callback, proto_x509af, "rsaSignature");
1331         register_ber_oid_dissector("1.3.14.3.2.14", dissect_ber_oid_NULL_callback, proto_x509af, "mdc2WithRSASignature");
1332         register_ber_oid_dissector("1.3.14.3.2.15", dissect_ber_oid_NULL_callback, proto_x509af, "shaWithRSASignature");
1333         register_ber_oid_dissector("1.3.14.3.2.16", dissect_ber_oid_NULL_callback, proto_x509af, "dhWithCommonModulus");
1334         register_ber_oid_dissector("1.3.14.3.2.17", dissect_ber_oid_NULL_callback, proto_x509af, "desEDE");
1335         register_ber_oid_dissector("1.3.14.3.2.18", dissect_ber_oid_NULL_callback, proto_x509af, "sha");
1336         register_ber_oid_dissector("1.3.14.3.2.19", dissect_ber_oid_NULL_callback, proto_x509af, "mdc-2");
1337         register_ber_oid_dissector("1.3.14.3.2.20", dissect_ber_oid_NULL_callback, proto_x509af, "dsaCommon");
1338         register_ber_oid_dissector("1.3.14.3.2.21", dissect_ber_oid_NULL_callback, proto_x509af, "dsaCommonWithSHA");
1339         register_ber_oid_dissector("1.3.14.3.2.22", dissect_ber_oid_NULL_callback, proto_x509af, "rsaKeyTransport");
1340         register_ber_oid_dissector("1.3.14.3.2.23", dissect_ber_oid_NULL_callback, proto_x509af, "keyed-hash-seal");
1341         register_ber_oid_dissector("1.3.14.3.2.24", dissect_ber_oid_NULL_callback, proto_x509af, "md2WithRSASignature");
1342         register_ber_oid_dissector("1.3.14.3.2.25", dissect_ber_oid_NULL_callback, proto_x509af, "md5WithRSASignature");
1343         register_ber_oid_dissector("1.3.14.3.2.26", dissect_ber_oid_NULL_callback, proto_x509af, "SHA-1");
1344         register_ber_oid_dissector("1.3.14.3.2.27", dissect_ber_oid_NULL_callback, proto_x509af, "dsaWithSHA1");
1345         register_ber_oid_dissector("1.3.14.3.2.28", dissect_ber_oid_NULL_callback, proto_x509af, "dsaWithCommonSHA1");
1346         register_ber_oid_dissector("1.3.14.3.2.29", dissect_ber_oid_NULL_callback, proto_x509af, "sha-1WithRSAEncryption");
1347
1348         /* these will generally be encoded as ";binary" in LDAP */
1349
1350         register_ldap_name_dissector("cACertificate", dissect_x509af_Certificate_PDU, proto_x509af);
1351         register_ldap_name_dissector("userCertificate", dissect_x509af_Certificate_PDU, proto_x509af);
1352         
1353         register_ldap_name_dissector("certificateRevocationList", dissect_CertificateList_PDU, proto_x509af);
1354         register_ldap_name_dissector("crl", dissect_CertificateList_PDU, proto_x509af);
1355
1356         register_ldap_name_dissector("authorityRevocationList", dissect_CertificateList_PDU, proto_x509af);
1357         register_ldap_name_dissector("arl", dissect_CertificateList_PDU, proto_x509af);
1358
1359         register_ldap_name_dissector("crossCertificatePair", dissect_CertificatePair_PDU, proto_x509af);
1360 }
1361