update asn2eth and all generated dissectors to new dissect_ber_boolean that takes...
[obnox/wireshark/wip.git] / epan / dissectors / packet-pkix1explicit.c
1 /* Do not modify this file.                                                   */
2 /* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
3 /* ./packet-pkix1explicit.c                                                   */
4 /* ../../tools/asn2eth.py -e -X -b -p pkix1explicit -c pkix1explicit.cnf -s packet-pkix1explicit-template PKIX1EXPLICIT93.asn */
5
6 /* Input file: packet-pkix1explicit-template.c */
7
8 #define BER_UNI_TAG_TeletexString           20  /* workaround bug in asn2eth */
9
10 /* packet-pkix1explicit.c
11  * Routines for PKIX1Explitic packet dissection
12  *
13  * $Id: packet-pkix1explicit-template.c 12826 2004-12-24 12:16:27Z sahlberg $
14  *
15  * Ethereal - Network traffic analyzer
16  * By Gerald Combs <gerald@ethereal.com>
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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
32  */
33
34 #ifdef HAVE_CONFIG_H
35 # include "config.h"
36 #endif
37
38 #include <glib.h>
39 #include <epan/packet.h>
40 #include <epan/conversation.h>
41
42 #include <stdio.h>
43 #include <string.h>
44
45 #include "packet-ber.h"
46 #include "packet-pkix1explicit.h"
47 #include "packet-x509af.h"
48 #include "packet-x509if.h"
49 #include "packet-x509ce.h"
50
51 #define PNAME  "PKIX1Explitit"
52 #define PSNAME "PKIX1EXPLICIT"
53 #define PFNAME "pkix1explicit"
54
55 /* Initialize the protocol and registered fields */
56 static int proto_pkix1explicit = -1;
57 static int hf_pkix1explicit_object_identifier_id = -1;
58
59 /*--- Included file: packet-pkix1explicit-hf.c ---*/
60
61 static int hf_pkix1explicit_DomainParameters_PDU = -1;  /* DomainParameters */
62 static int hf_pkix1explicit_DirectoryString_PDU = -1;  /* DirectoryString */
63 static int hf_pkix1explicit_Extensions_item = -1;  /* Extension */
64 static int hf_pkix1explicit_extnId = -1;          /* T_extnId */
65 static int hf_pkix1explicit_critical = -1;        /* BOOLEAN */
66 static int hf_pkix1explicit_extnValue = -1;       /* T_extnValue */
67 static int hf_pkix1explicit_p = -1;               /* INTEGER */
68 static int hf_pkix1explicit_g = -1;               /* INTEGER */
69 static int hf_pkix1explicit_q = -1;               /* INTEGER */
70 static int hf_pkix1explicit_j = -1;               /* INTEGER */
71 static int hf_pkix1explicit_validationParms = -1;  /* ValidationParms */
72 static int hf_pkix1explicit_seed = -1;            /* BIT_STRING */
73 static int hf_pkix1explicit_pgenCounter = -1;     /* INTEGER */
74 static int hf_pkix1explicit_type = -1;            /* OBJECT_IDENTIFIER */
75 static int hf_pkix1explicit_value = -1;           /* T_value */
76 static int hf_pkix1explicit_RDNSequence_item = -1;  /* RelativeDistinguishedName */
77 static int hf_pkix1explicit_RelativeDistinguishedName_item = -1;  /* AttributeTypeAndValue */
78 static int hf_pkix1explicit_type1 = -1;           /* TeletexString */
79 static int hf_pkix1explicit_value1 = -1;          /* TeletexString */
80
81 /*--- End of included file: packet-pkix1explicit-hf.c ---*/
82
83
84 /* Initialize the subtree pointers */
85
86 /*--- Included file: packet-pkix1explicit-ett.c ---*/
87
88 static gint ett_pkix1explicit_Extensions = -1;
89 static gint ett_pkix1explicit_Extension = -1;
90 static gint ett_pkix1explicit_DomainParameters = -1;
91 static gint ett_pkix1explicit_ValidationParms = -1;
92 static gint ett_pkix1explicit_AttributeTypeAndValue = -1;
93 static gint ett_pkix1explicit_RDNSequence = -1;
94 static gint ett_pkix1explicit_RelativeDistinguishedName = -1;
95 static gint ett_pkix1explicit_TeletexDomainDefinedAttribute = -1;
96
97 /*--- End of included file: packet-pkix1explicit-ett.c ---*/
98
99
100
101 static char object_identifier_id[64]; /*64 chars should be long enough? */
102
103 int
104 dissect_pkix1explicit_Certificate(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
105   offset = dissect_x509af_Certificate(implicit_tag, tvb, offset, pinfo, tree, hf_index);
106
107   return offset;
108 }
109 int
110 dissect_pkix1explicit_CertificateList(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
111   offset = dissect_x509af_CertificateList(implicit_tag, tvb, offset, pinfo, tree, hf_index);
112
113   return offset;
114 }
115 int
116 dissect_pkix1explicit_GeneralName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
117   offset = dissect_x509ce_GeneralName(implicit_tag, tvb, offset, pinfo, tree, hf_index);
118
119   return offset;
120 }
121 int
122 dissect_pkix1explicit_Name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
123   offset = dissect_x509if_Name(implicit_tag, tvb, offset, pinfo, tree, hf_index);
124
125   return offset;
126 }
127 int
128 dissect_pkix1explicit_AlgorithmIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
129   offset = dissect_x509af_AlgorithmIdentifier(implicit_tag, tvb, offset, pinfo, tree, hf_index);
130
131   return offset;
132 }
133
134 int
135 dissect_pkix1explicit_SubjectPublicKeyInfo(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index) {
136   offset = dissect_x509af_SubjectPublicKeyInfo(implicit_tag, tvb, offset, pinfo, tree, hf_index);
137
138   return offset;
139 }
140
141
142
143 /*--- Included file: packet-pkix1explicit-fn.c ---*/
144
145 /*--- Fields for imported types ---*/
146
147
148
149
150 int
151 dissect_pkix1explicit_CertificateSerialNumber(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
152   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
153
154   return offset;
155 }
156
157
158 static int
159 dissect_pkix1explicit_T_extnId(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
160   offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
161                                  hf_pkix1explicit_object_identifier_id, object_identifier_id);
162
163
164   return offset;
165 }
166 static int dissect_extnId(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
167   return dissect_pkix1explicit_T_extnId(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_extnId);
168 }
169
170
171 static int
172 dissect_pkix1explicit_BOOLEAN(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
173   offset = dissect_ber_boolean(implicit_tag, pinfo, tree, tvb, offset, hf_index);
174
175   return offset;
176 }
177 static int dissect_critical(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
178   return dissect_pkix1explicit_BOOLEAN(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_critical);
179 }
180
181
182 static int
183 dissect_pkix1explicit_T_extnValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
184   guint8 class;
185   gboolean pc, ind;
186   guint32 tag;
187   guint32 len;
188   /* skip past the T and L  */
189   offset = dissect_ber_identifier(pinfo, tree, tvb, offset, &class, &pc, &tag);
190   offset = dissect_ber_length(pinfo, tree, tvb, offset, &len, &ind);
191   offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
192
193
194
195   return offset;
196 }
197 static int dissect_extnValue(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
198   return dissect_pkix1explicit_T_extnValue(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_extnValue);
199 }
200
201 static const ber_sequence_t Extension_sequence[] = {
202   { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_extnId },
203   { BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_critical },
204   { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_extnValue },
205   { 0, 0, 0, NULL }
206 };
207
208 int
209 dissect_pkix1explicit_Extension(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
210   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
211                                 Extension_sequence, hf_index, ett_pkix1explicit_Extension);
212
213   return offset;
214 }
215 static int dissect_Extensions_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
216   return dissect_pkix1explicit_Extension(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_Extensions_item);
217 }
218
219 static const ber_sequence_t Extensions_sequence_of[1] = {
220   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Extensions_item },
221 };
222
223 int
224 dissect_pkix1explicit_Extensions(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
225   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
226                                    Extensions_sequence_of, hf_index, ett_pkix1explicit_Extensions);
227
228   return offset;
229 }
230
231
232
233 static int
234 dissect_pkix1explicit_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
235   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
236
237   return offset;
238 }
239 static int dissect_p(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
240   return dissect_pkix1explicit_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_p);
241 }
242 static int dissect_g(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
243   return dissect_pkix1explicit_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_g);
244 }
245 static int dissect_q(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
246   return dissect_pkix1explicit_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_q);
247 }
248 static int dissect_j(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
249   return dissect_pkix1explicit_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_j);
250 }
251 static int dissect_pgenCounter(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
252   return dissect_pkix1explicit_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_pgenCounter);
253 }
254
255
256 static int
257 dissect_pkix1explicit_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
258   offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
259                                  NULL, hf_index, -1,
260                                  NULL);
261
262   return offset;
263 }
264 static int dissect_seed(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
265   return dissect_pkix1explicit_BIT_STRING(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_seed);
266 }
267
268 static const ber_sequence_t ValidationParms_sequence[] = {
269   { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_seed },
270   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pgenCounter },
271   { 0, 0, 0, NULL }
272 };
273
274 static int
275 dissect_pkix1explicit_ValidationParms(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
276   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
277                                 ValidationParms_sequence, hf_index, ett_pkix1explicit_ValidationParms);
278
279   return offset;
280 }
281 static int dissect_validationParms(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
282   return dissect_pkix1explicit_ValidationParms(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_validationParms);
283 }
284
285 static const ber_sequence_t DomainParameters_sequence[] = {
286   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_p },
287   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_g },
288   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_q },
289   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_j },
290   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_validationParms },
291   { 0, 0, 0, NULL }
292 };
293
294 static int
295 dissect_pkix1explicit_DomainParameters(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
296   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
297                                 DomainParameters_sequence, hf_index, ett_pkix1explicit_DomainParameters);
298
299   return offset;
300 }
301
302
303 static int
304 dissect_pkix1explicit_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
305   offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset,
306                                          hf_index, NULL);
307
308   return offset;
309 }
310 static int dissect_type(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
311   return dissect_pkix1explicit_OBJECT_IDENTIFIER(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_type);
312 }
313
314
315
316 static int
317 dissect_pkix1explicit_T_value(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
318   offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
319                                          hf_pkix1explicit_object_identifier_id, object_identifier_id);
320
321   offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
322
323
324   return offset;
325 }
326 static int dissect_value(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
327   return dissect_pkix1explicit_T_value(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_value);
328 }
329
330 static const ber_sequence_t AttributeTypeAndValue_sequence[] = {
331   { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_type },
332   { BER_CLASS_ANY, 0, BER_FLAGS_NOOWNTAG, dissect_value },
333   { 0, 0, 0, NULL }
334 };
335
336 int
337 dissect_pkix1explicit_AttributeTypeAndValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
338   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
339                                 AttributeTypeAndValue_sequence, hf_index, ett_pkix1explicit_AttributeTypeAndValue);
340
341   return offset;
342 }
343 static int dissect_RelativeDistinguishedName_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
344   return dissect_pkix1explicit_AttributeTypeAndValue(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_RelativeDistinguishedName_item);
345 }
346
347 static const ber_sequence_t RelativeDistinguishedName_set_of[1] = {
348   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_RelativeDistinguishedName_item },
349 };
350
351 int
352 dissect_pkix1explicit_RelativeDistinguishedName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
353   offset = dissect_ber_set_of(implicit_tag, pinfo, tree, tvb, offset,
354                               RelativeDistinguishedName_set_of, hf_index, ett_pkix1explicit_RelativeDistinguishedName);
355
356   return offset;
357 }
358 static int dissect_RDNSequence_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
359   return dissect_pkix1explicit_RelativeDistinguishedName(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_RDNSequence_item);
360 }
361
362 static const ber_sequence_t RDNSequence_sequence_of[1] = {
363   { BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_RDNSequence_item },
364 };
365
366 int
367 dissect_pkix1explicit_RDNSequence(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
368   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
369                                    RDNSequence_sequence_of, hf_index, ett_pkix1explicit_RDNSequence);
370
371   return offset;
372 }
373
374
375 int
376 dissect_pkix1explicit_DirectoryString(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
377         offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
378
379
380   return offset;
381 }
382
383
384 const value_string pkix1explicit_TerminalType_vals[] = {
385   {   3, "telex" },
386   {   4, "teletex" },
387   {   5, "g3-facsimile" },
388   {   6, "g4-facsimile" },
389   {   7, "ia5-terminal" },
390   {   8, "videotex" },
391   { 0, NULL }
392 };
393
394
395 int
396 dissect_pkix1explicit_TerminalType(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
397   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
398
399   return offset;
400 }
401
402
403 static int
404 dissect_pkix1explicit_TeletexString(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
405   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_TeletexString,
406                                          pinfo, tree, tvb, offset, hf_index,
407                                          NULL);
408
409   return offset;
410 }
411 static int dissect_type1(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
412   return dissect_pkix1explicit_TeletexString(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_type1);
413 }
414 static int dissect_value1(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
415   return dissect_pkix1explicit_TeletexString(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_value1);
416 }
417
418 static const ber_sequence_t TeletexDomainDefinedAttribute_sequence[] = {
419   { BER_CLASS_UNI, BER_UNI_TAG_TeletexString, BER_FLAGS_NOOWNTAG, dissect_type1 },
420   { BER_CLASS_UNI, BER_UNI_TAG_TeletexString, BER_FLAGS_NOOWNTAG, dissect_value1 },
421   { 0, 0, 0, NULL }
422 };
423
424 int
425 dissect_pkix1explicit_TeletexDomainDefinedAttribute(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
426   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
427                                 TeletexDomainDefinedAttribute_sequence, hf_index, ett_pkix1explicit_TeletexDomainDefinedAttribute);
428
429   return offset;
430 }
431
432 /*--- PDUs ---*/
433
434 static void dissect_DomainParameters_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
435   dissect_pkix1explicit_DomainParameters(FALSE, tvb, 0, pinfo, tree, hf_pkix1explicit_DomainParameters_PDU);
436 }
437 static void dissect_DirectoryString_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
438   dissect_pkix1explicit_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_pkix1explicit_DirectoryString_PDU);
439 }
440
441
442 /*--- End of included file: packet-pkix1explicit-fn.c ---*/
443
444
445
446 /*--- proto_register_pkix1explicit ----------------------------------------------*/
447 void proto_register_pkix1explicit(void) {
448
449   /* List of fields */
450   static hf_register_info hf[] = {
451     { &hf_pkix1explicit_object_identifier_id, 
452       { "Id", "pkix1explicit.id", FT_STRING, BASE_NONE, NULL, 0,
453         "Object identifier Id", HFILL }},
454
455 /*--- Included file: packet-pkix1explicit-hfarr.c ---*/
456
457     { &hf_pkix1explicit_DomainParameters_PDU,
458       { "DomainParameters", "pkix1explicit.DomainParameters",
459         FT_NONE, BASE_NONE, NULL, 0,
460         "DomainParameters", HFILL }},
461     { &hf_pkix1explicit_DirectoryString_PDU,
462       { "DirectoryString", "pkix1explicit.DirectoryString",
463         FT_STRING, BASE_NONE, NULL, 0,
464         "DirectoryString", HFILL }},
465     { &hf_pkix1explicit_Extensions_item,
466       { "Item", "pkix1explicit.Extensions_item",
467         FT_NONE, BASE_NONE, NULL, 0,
468         "Extensions/_item", HFILL }},
469     { &hf_pkix1explicit_extnId,
470       { "extnId", "pkix1explicit.extnId",
471         FT_STRING, BASE_NONE, NULL, 0,
472         "Extension/extnId", HFILL }},
473     { &hf_pkix1explicit_critical,
474       { "critical", "pkix1explicit.critical",
475         FT_BOOLEAN, 8, NULL, 0,
476         "Extension/critical", HFILL }},
477     { &hf_pkix1explicit_extnValue,
478       { "extnValue", "pkix1explicit.extnValue",
479         FT_BYTES, BASE_HEX, NULL, 0,
480         "Extension/extnValue", HFILL }},
481     { &hf_pkix1explicit_p,
482       { "p", "pkix1explicit.p",
483         FT_INT32, BASE_DEC, NULL, 0,
484         "DomainParameters/p", HFILL }},
485     { &hf_pkix1explicit_g,
486       { "g", "pkix1explicit.g",
487         FT_INT32, BASE_DEC, NULL, 0,
488         "DomainParameters/g", HFILL }},
489     { &hf_pkix1explicit_q,
490       { "q", "pkix1explicit.q",
491         FT_INT32, BASE_DEC, NULL, 0,
492         "DomainParameters/q", HFILL }},
493     { &hf_pkix1explicit_j,
494       { "j", "pkix1explicit.j",
495         FT_INT32, BASE_DEC, NULL, 0,
496         "DomainParameters/j", HFILL }},
497     { &hf_pkix1explicit_validationParms,
498       { "validationParms", "pkix1explicit.validationParms",
499         FT_NONE, BASE_NONE, NULL, 0,
500         "DomainParameters/validationParms", HFILL }},
501     { &hf_pkix1explicit_seed,
502       { "seed", "pkix1explicit.seed",
503         FT_BYTES, BASE_HEX, NULL, 0,
504         "ValidationParms/seed", HFILL }},
505     { &hf_pkix1explicit_pgenCounter,
506       { "pgenCounter", "pkix1explicit.pgenCounter",
507         FT_INT32, BASE_DEC, NULL, 0,
508         "ValidationParms/pgenCounter", HFILL }},
509     { &hf_pkix1explicit_type,
510       { "type", "pkix1explicit.type",
511         FT_STRING, BASE_NONE, NULL, 0,
512         "AttributeTypeAndValue/type", HFILL }},
513     { &hf_pkix1explicit_value,
514       { "value", "pkix1explicit.value",
515         FT_NONE, BASE_NONE, NULL, 0,
516         "AttributeTypeAndValue/value", HFILL }},
517     { &hf_pkix1explicit_RDNSequence_item,
518       { "Item", "pkix1explicit.RDNSequence_item",
519         FT_NONE, BASE_NONE, NULL, 0,
520         "RDNSequence/_item", HFILL }},
521     { &hf_pkix1explicit_RelativeDistinguishedName_item,
522       { "Item", "pkix1explicit.RelativeDistinguishedName_item",
523         FT_NONE, BASE_NONE, NULL, 0,
524         "RelativeDistinguishedName/_item", HFILL }},
525     { &hf_pkix1explicit_type1,
526       { "type", "pkix1explicit.type",
527         FT_STRING, BASE_NONE, NULL, 0,
528         "TeletexDomainDefinedAttribute/type", HFILL }},
529     { &hf_pkix1explicit_value1,
530       { "value", "pkix1explicit.value",
531         FT_STRING, BASE_NONE, NULL, 0,
532         "TeletexDomainDefinedAttribute/value", HFILL }},
533
534 /*--- End of included file: packet-pkix1explicit-hfarr.c ---*/
535
536   };
537
538   /* List of subtrees */
539   static gint *ett[] = {
540
541 /*--- Included file: packet-pkix1explicit-ettarr.c ---*/
542
543     &ett_pkix1explicit_Extensions,
544     &ett_pkix1explicit_Extension,
545     &ett_pkix1explicit_DomainParameters,
546     &ett_pkix1explicit_ValidationParms,
547     &ett_pkix1explicit_AttributeTypeAndValue,
548     &ett_pkix1explicit_RDNSequence,
549     &ett_pkix1explicit_RelativeDistinguishedName,
550     &ett_pkix1explicit_TeletexDomainDefinedAttribute,
551
552 /*--- End of included file: packet-pkix1explicit-ettarr.c ---*/
553
554   };
555
556   /* Register protocol */
557   proto_pkix1explicit = proto_register_protocol(PNAME, PSNAME, PFNAME);
558
559   /* Register fields and subtrees */
560   proto_register_field_array(proto_pkix1explicit, hf, array_length(hf));
561   proto_register_subtree_array(ett, array_length(ett));
562
563 }
564
565
566 /*--- proto_reg_handoff_pkix1explicit -------------------------------------------*/
567 void proto_reg_handoff_pkix1explicit(void) {
568
569 /*--- Included file: packet-pkix1explicit-dis-tab.c ---*/
570
571  register_ber_oid_dissector("1.3.6.1.5.5.7.2.1", dissect_DirectoryString_PDU, proto_pkix1explicit, "id-qt-cps");
572  register_ber_oid_dissector("1.2.840.10046.2.1", dissect_DomainParameters_PDU, proto_pkix1explicit, "dhpublicnumber");
573
574
575 /*--- End of included file: packet-pkix1explicit-dis-tab.c ---*/
576
577 }
578