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