- dissect_ber_object_identifier() returns value as tvb
[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$
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 const char *object_identifier_id;
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,
153                                   NULL);
154
155   return offset;
156 }
157
158
159
160 static int
161 dissect_pkix1explicit_T_extnId(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
162   offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_pkix1explicit_object_identifier_id, &object_identifier_id);
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
172 static int
173 dissect_pkix1explicit_BOOLEAN(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
174   offset = dissect_ber_boolean(implicit_tag, pinfo, tree, tvb, offset, hf_index);
175
176   return offset;
177 }
178 static int dissect_critical(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
179   return dissect_pkix1explicit_BOOLEAN(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_critical);
180 }
181
182
183
184 static int
185 dissect_pkix1explicit_T_extnValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
186   gint8 class;
187   gboolean pc, ind;
188   gint32 tag;
189   guint32 len;
190   /* skip past the T and L  */
191   offset = dissect_ber_identifier(pinfo, tree, tvb, offset, &class, &pc, &tag);
192   offset = dissect_ber_length(pinfo, tree, tvb, offset, &len, &ind);
193   offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
194
195
196
197   return offset;
198 }
199 static int dissect_extnValue(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
200   return dissect_pkix1explicit_T_extnValue(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_extnValue);
201 }
202
203
204 static const ber_sequence_t Extension_sequence[] = {
205   { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_extnId },
206   { BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_critical },
207   { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_extnValue },
208   { 0, 0, 0, NULL }
209 };
210
211 int
212 dissect_pkix1explicit_Extension(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
213   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
214                                    Extension_sequence, hf_index, ett_pkix1explicit_Extension);
215
216   return offset;
217 }
218 static int dissect_Extensions_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
219   return dissect_pkix1explicit_Extension(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_Extensions_item);
220 }
221
222
223 static const ber_sequence_t Extensions_sequence_of[1] = {
224   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Extensions_item },
225 };
226
227 int
228 dissect_pkix1explicit_Extensions(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
229   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
230                                       Extensions_sequence_of, hf_index, ett_pkix1explicit_Extensions);
231
232   return offset;
233 }
234
235
236
237 static int
238 dissect_pkix1explicit_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
239   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
240                                   NULL);
241
242   return offset;
243 }
244 static int dissect_p(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
245   return dissect_pkix1explicit_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_p);
246 }
247 static int dissect_g(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
248   return dissect_pkix1explicit_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_g);
249 }
250 static int dissect_q(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
251   return dissect_pkix1explicit_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_q);
252 }
253 static int dissect_j(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
254   return dissect_pkix1explicit_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_j);
255 }
256 static int dissect_pgenCounter(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
257   return dissect_pkix1explicit_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_pgenCounter);
258 }
259
260
261
262 static int
263 dissect_pkix1explicit_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
264   offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
265                                     NULL, hf_index, -1,
266                                     NULL);
267
268   return offset;
269 }
270 static int dissect_seed(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
271   return dissect_pkix1explicit_BIT_STRING(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_seed);
272 }
273
274
275 static const ber_sequence_t ValidationParms_sequence[] = {
276   { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_seed },
277   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pgenCounter },
278   { 0, 0, 0, NULL }
279 };
280
281 static int
282 dissect_pkix1explicit_ValidationParms(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
283   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
284                                    ValidationParms_sequence, hf_index, ett_pkix1explicit_ValidationParms);
285
286   return offset;
287 }
288 static int dissect_validationParms(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
289   return dissect_pkix1explicit_ValidationParms(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_validationParms);
290 }
291
292
293 static const ber_sequence_t DomainParameters_sequence[] = {
294   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_p },
295   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_g },
296   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_q },
297   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_j },
298   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_validationParms },
299   { 0, 0, 0, NULL }
300 };
301
302 static int
303 dissect_pkix1explicit_DomainParameters(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
304   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
305                                    DomainParameters_sequence, hf_index, ett_pkix1explicit_DomainParameters);
306
307   return offset;
308 }
309
310
311
312 static int
313 dissect_pkix1explicit_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
314   offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
315
316   return offset;
317 }
318 static int dissect_type(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
319   return dissect_pkix1explicit_OBJECT_IDENTIFIER(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_type);
320 }
321
322
323
324 static int
325 dissect_pkix1explicit_T_value(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
326   offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
327
328
329   return offset;
330 }
331 static int dissect_value(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
332   return dissect_pkix1explicit_T_value(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_value);
333 }
334
335
336 static const ber_sequence_t AttributeTypeAndValue_sequence[] = {
337   { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_type },
338   { BER_CLASS_ANY, 0, BER_FLAGS_NOOWNTAG, dissect_value },
339   { 0, 0, 0, NULL }
340 };
341
342 int
343 dissect_pkix1explicit_AttributeTypeAndValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
344   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
345                                    AttributeTypeAndValue_sequence, hf_index, ett_pkix1explicit_AttributeTypeAndValue);
346
347   return offset;
348 }
349 static int dissect_RelativeDistinguishedName_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
350   return dissect_pkix1explicit_AttributeTypeAndValue(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_RelativeDistinguishedName_item);
351 }
352
353
354 static const ber_sequence_t RelativeDistinguishedName_set_of[1] = {
355   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_RelativeDistinguishedName_item },
356 };
357
358 int
359 dissect_pkix1explicit_RelativeDistinguishedName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
360   offset = dissect_ber_set_of(implicit_tag, pinfo, tree, tvb, offset,
361                                  RelativeDistinguishedName_set_of, hf_index, ett_pkix1explicit_RelativeDistinguishedName);
362
363   return offset;
364 }
365 static int dissect_RDNSequence_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
366   return dissect_pkix1explicit_RelativeDistinguishedName(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_RDNSequence_item);
367 }
368
369
370 static const ber_sequence_t RDNSequence_sequence_of[1] = {
371   { BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_RDNSequence_item },
372 };
373
374 int
375 dissect_pkix1explicit_RDNSequence(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
376   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
377                                       RDNSequence_sequence_of, hf_index, ett_pkix1explicit_RDNSequence);
378
379   return offset;
380 }
381
382
383
384 int
385 dissect_pkix1explicit_DirectoryString(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
386         offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
387
388
389   return offset;
390 }
391
392
393 const value_string pkix1explicit_TerminalType_vals[] = {
394   {   3, "telex" },
395   {   4, "teletex" },
396   {   5, "g3-facsimile" },
397   {   6, "g4-facsimile" },
398   {   7, "ia5-terminal" },
399   {   8, "videotex" },
400   { 0, NULL }
401 };
402
403
404 int
405 dissect_pkix1explicit_TerminalType(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
406   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
407                                   NULL);
408
409   return offset;
410 }
411
412
413
414 static int
415 dissect_pkix1explicit_TeletexString(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
416   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_TeletexString,
417                                             pinfo, tree, tvb, offset, hf_index,
418                                             NULL);
419
420   return offset;
421 }
422 static int dissect_type1(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
423   return dissect_pkix1explicit_TeletexString(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_type1);
424 }
425 static int dissect_value1(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
426   return dissect_pkix1explicit_TeletexString(FALSE, tvb, offset, pinfo, tree, hf_pkix1explicit_value1);
427 }
428
429
430 static const ber_sequence_t TeletexDomainDefinedAttribute_sequence[] = {
431   { BER_CLASS_UNI, BER_UNI_TAG_TeletexString, BER_FLAGS_NOOWNTAG, dissect_type1 },
432   { BER_CLASS_UNI, BER_UNI_TAG_TeletexString, BER_FLAGS_NOOWNTAG, dissect_value1 },
433   { 0, 0, 0, NULL }
434 };
435
436 int
437 dissect_pkix1explicit_TeletexDomainDefinedAttribute(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
438   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
439                                    TeletexDomainDefinedAttribute_sequence, hf_index, ett_pkix1explicit_TeletexDomainDefinedAttribute);
440
441   return offset;
442 }
443
444 /*--- PDUs ---*/
445
446 static void dissect_DomainParameters_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
447   dissect_pkix1explicit_DomainParameters(FALSE, tvb, 0, pinfo, tree, hf_pkix1explicit_DomainParameters_PDU);
448 }
449 static void dissect_DirectoryString_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
450   dissect_pkix1explicit_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_pkix1explicit_DirectoryString_PDU);
451 }
452
453
454 /*--- End of included file: packet-pkix1explicit-fn.c ---*/
455
456
457
458 /*--- proto_register_pkix1explicit ----------------------------------------------*/
459 void proto_register_pkix1explicit(void) {
460
461   /* List of fields */
462   static hf_register_info hf[] = {
463     { &hf_pkix1explicit_object_identifier_id, 
464       { "Id", "pkix1explicit.id", FT_STRING, BASE_NONE, NULL, 0,
465         "Object identifier Id", HFILL }},
466
467 /*--- Included file: packet-pkix1explicit-hfarr.c ---*/
468
469     { &hf_pkix1explicit_DomainParameters_PDU,
470       { "DomainParameters", "pkix1explicit.DomainParameters",
471         FT_NONE, BASE_NONE, NULL, 0,
472         "DomainParameters", HFILL }},
473     { &hf_pkix1explicit_DirectoryString_PDU,
474       { "DirectoryString", "pkix1explicit.DirectoryString",
475         FT_STRING, BASE_NONE, NULL, 0,
476         "DirectoryString", HFILL }},
477     { &hf_pkix1explicit_Extensions_item,
478       { "Item", "pkix1explicit.Extensions_item",
479         FT_NONE, BASE_NONE, NULL, 0,
480         "Extensions/_item", HFILL }},
481     { &hf_pkix1explicit_extnId,
482       { "extnId", "pkix1explicit.extnId",
483         FT_STRING, BASE_NONE, NULL, 0,
484         "Extension/extnId", HFILL }},
485     { &hf_pkix1explicit_critical,
486       { "critical", "pkix1explicit.critical",
487         FT_BOOLEAN, 8, NULL, 0,
488         "Extension/critical", HFILL }},
489     { &hf_pkix1explicit_extnValue,
490       { "extnValue", "pkix1explicit.extnValue",
491         FT_BYTES, BASE_HEX, NULL, 0,
492         "Extension/extnValue", HFILL }},
493     { &hf_pkix1explicit_p,
494       { "p", "pkix1explicit.p",
495         FT_INT32, BASE_DEC, NULL, 0,
496         "DomainParameters/p", HFILL }},
497     { &hf_pkix1explicit_g,
498       { "g", "pkix1explicit.g",
499         FT_INT32, BASE_DEC, NULL, 0,
500         "DomainParameters/g", HFILL }},
501     { &hf_pkix1explicit_q,
502       { "q", "pkix1explicit.q",
503         FT_INT32, BASE_DEC, NULL, 0,
504         "DomainParameters/q", HFILL }},
505     { &hf_pkix1explicit_j,
506       { "j", "pkix1explicit.j",
507         FT_INT32, BASE_DEC, NULL, 0,
508         "DomainParameters/j", HFILL }},
509     { &hf_pkix1explicit_validationParms,
510       { "validationParms", "pkix1explicit.validationParms",
511         FT_NONE, BASE_NONE, NULL, 0,
512         "DomainParameters/validationParms", HFILL }},
513     { &hf_pkix1explicit_seed,
514       { "seed", "pkix1explicit.seed",
515         FT_BYTES, BASE_HEX, NULL, 0,
516         "ValidationParms/seed", HFILL }},
517     { &hf_pkix1explicit_pgenCounter,
518       { "pgenCounter", "pkix1explicit.pgenCounter",
519         FT_INT32, BASE_DEC, NULL, 0,
520         "ValidationParms/pgenCounter", HFILL }},
521     { &hf_pkix1explicit_type,
522       { "type", "pkix1explicit.type",
523         FT_STRING, BASE_NONE, NULL, 0,
524         "AttributeTypeAndValue/type", HFILL }},
525     { &hf_pkix1explicit_value,
526       { "value", "pkix1explicit.value",
527         FT_NONE, BASE_NONE, NULL, 0,
528         "AttributeTypeAndValue/value", HFILL }},
529     { &hf_pkix1explicit_RDNSequence_item,
530       { "Item", "pkix1explicit.RDNSequence_item",
531         FT_UINT32, BASE_DEC, NULL, 0,
532         "RDNSequence/_item", HFILL }},
533     { &hf_pkix1explicit_RelativeDistinguishedName_item,
534       { "Item", "pkix1explicit.RelativeDistinguishedName_item",
535         FT_NONE, BASE_NONE, NULL, 0,
536         "RelativeDistinguishedName/_item", HFILL }},
537     { &hf_pkix1explicit_type1,
538       { "type", "pkix1explicit.type",
539         FT_STRING, BASE_NONE, NULL, 0,
540         "TeletexDomainDefinedAttribute/type", HFILL }},
541     { &hf_pkix1explicit_value1,
542       { "value", "pkix1explicit.value",
543         FT_STRING, BASE_NONE, NULL, 0,
544         "TeletexDomainDefinedAttribute/value", HFILL }},
545
546 /*--- End of included file: packet-pkix1explicit-hfarr.c ---*/
547
548   };
549
550   /* List of subtrees */
551   static gint *ett[] = {
552
553 /*--- Included file: packet-pkix1explicit-ettarr.c ---*/
554
555     &ett_pkix1explicit_Extensions,
556     &ett_pkix1explicit_Extension,
557     &ett_pkix1explicit_DomainParameters,
558     &ett_pkix1explicit_ValidationParms,
559     &ett_pkix1explicit_AttributeTypeAndValue,
560     &ett_pkix1explicit_RDNSequence,
561     &ett_pkix1explicit_RelativeDistinguishedName,
562     &ett_pkix1explicit_TeletexDomainDefinedAttribute,
563
564 /*--- End of included file: packet-pkix1explicit-ettarr.c ---*/
565
566   };
567
568   /* Register protocol */
569   proto_pkix1explicit = proto_register_protocol(PNAME, PSNAME, PFNAME);
570
571   /* Register fields and subtrees */
572   proto_register_field_array(proto_pkix1explicit, hf, array_length(hf));
573   proto_register_subtree_array(ett, array_length(ett));
574
575 }
576
577
578 /*--- proto_reg_handoff_pkix1explicit -------------------------------------------*/
579 void proto_reg_handoff_pkix1explicit(void) {
580
581 /*--- Included file: packet-pkix1explicit-dis-tab.c ---*/
582
583   register_ber_oid_dissector("1.3.6.1.5.5.7.2.1", dissect_DirectoryString_PDU, proto_pkix1explicit, "id-qt-cps");
584   register_ber_oid_dissector("1.2.840.10046.2.1", dissect_DomainParameters_PDU, proto_pkix1explicit, "dhpublicnumber");
585
586
587 /*--- End of included file: packet-pkix1explicit-dis-tab.c ---*/
588
589 }
590