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