ASN.1 dissectors regenerated with new asn2wrs to get updated field blurb
[obnox/wireshark/wip.git] / epan / dissectors / packet-pkinit.c
1 /* Do not modify this file.                                                   */
2 /* It is created automatically by the ASN.1 to Wireshark dissector compiler   */
3 /* .\packet-pkinit.c                                                          */
4 /* ../../tools/asn2wrs.py -e -b -p pkinit -c pkinit.cnf -s packet-pkinit-template PKINIT.asn */
5
6 /* Input file: packet-pkinit-template.c */
7
8 #line 1 "packet-pkinit-template.c"
9 /* packet-pkinit.c
10  * Routines for PKINIT packet dissection
11  *  Ronnie Sahlberg 2004
12  *
13  * $Id$
14  *
15  * Wireshark - Network traffic analyzer
16  * By Gerald Combs <gerald@wireshark.org>
17  * Copyright 1998 Gerald Combs
18  *
19  * This program is free software; you can redistribute it and/or
20  * modify it under the terms of the GNU General Public License
21  * as published by the Free Software Foundation; either version 2
22  * of the License, or (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27  * GNU General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License
30  * along with this program; if not, write to the Free Software
31  * Foundation, Inc., 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-pkinit.h"
47 #include "packet-cms.h"
48 #include "packet-pkix1explicit.h"
49 #include "packet-kerberos.h"
50
51 #define PNAME  "PKINIT"
52 #define PSNAME "PKInit"
53 #define PFNAME "pkinit"
54
55 /* Initialize the protocol and registered fields */
56 static int proto_pkinit = -1;
57
58 /*--- Included file: packet-pkinit-hf.c ---*/
59 #line 1 "packet-pkinit-hf.c"
60 static int hf_pkinit_AuthPack_PDU = -1;           /* AuthPack */
61 static int hf_pkinit_KDCDHKeyInfo_PDU = -1;       /* KDCDHKeyInfo */
62 static int hf_pkinit_signedAuthPack = -1;         /* ContentInfo */
63 static int hf_pkinit_trustedCertifiers = -1;      /* SEQUENCE_OF_TrustedCA */
64 static int hf_pkinit_trustedCertifiers_item = -1;  /* TrustedCA */
65 static int hf_pkinit_kdcCert = -1;                /* IssuerAndSerialNumber */
66 static int hf_pkinit_caName = -1;                 /* Name */
67 static int hf_pkinit_issuerAndSerial = -1;        /* IssuerAndSerialNumber */
68 static int hf_pkinit_pkAuthenticator = -1;        /* PKAuthenticator */
69 static int hf_pkinit_clientPublicValue = -1;      /* SubjectPublicKeyInfo */
70 static int hf_pkinit_supportedCMSTypes = -1;      /* SEQUENCE_OF_AlgorithmIdentifier */
71 static int hf_pkinit_supportedCMSTypes_item = -1;  /* AlgorithmIdentifier */
72 static int hf_pkinit_cusec = -1;                  /* INTEGER */
73 static int hf_pkinit_ctime = -1;                  /* KerberosTime */
74 static int hf_pkinit_paNonce = -1;                /* INTEGER_0_4294967295 */
75 static int hf_pkinit_paChecksum = -1;             /* Checksum */
76 static int hf_pkinit_dhSignedData = -1;           /* ContentInfo */
77 static int hf_pkinit_encKeyPack = -1;             /* ContentInfo */
78 static int hf_pkinit_subjectPublicKey = -1;       /* BIT_STRING */
79 static int hf_pkinit_dhNonce = -1;                /* INTEGER */
80 static int hf_pkinit_dhKeyExpiration = -1;        /* KerberosTime */
81
82 /*--- End of included file: packet-pkinit-hf.c ---*/
83 #line 50 "packet-pkinit-template.c"
84
85 /* Initialize the subtree pointers */
86
87 /*--- Included file: packet-pkinit-ett.c ---*/
88 #line 1 "packet-pkinit-ett.c"
89 static gint ett_pkinit_PaPkAsReq = -1;
90 static gint ett_pkinit_SEQUENCE_OF_TrustedCA = -1;
91 static gint ett_pkinit_TrustedCA = -1;
92 static gint ett_pkinit_AuthPack = -1;
93 static gint ett_pkinit_SEQUENCE_OF_AlgorithmIdentifier = -1;
94 static gint ett_pkinit_PKAuthenticator = -1;
95 static gint ett_pkinit_PaPkAsRep = -1;
96 static gint ett_pkinit_KDCDHKeyInfo = -1;
97
98 /*--- End of included file: packet-pkinit-ett.c ---*/
99 #line 53 "packet-pkinit-template.c"
100
101 static int dissect_KerberosV5Spec2_KerberosTime(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index _U_);
102 static int dissect_KerberosV5Spec2_Checksum(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index _U_);
103
104
105 /*--- Included file: packet-pkinit-fn.c ---*/
106 #line 1 "packet-pkinit-fn.c"
107 /*--- Fields for imported types ---*/
108
109 static int dissect_signedAuthPack(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
110   return dissect_cms_ContentInfo(FALSE, tvb, offset, pinfo, tree, hf_pkinit_signedAuthPack);
111 }
112 static int dissect_kdcCert(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
113   return dissect_cms_IssuerAndSerialNumber(FALSE, tvb, offset, pinfo, tree, hf_pkinit_kdcCert);
114 }
115 static int dissect_caName(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
116   return dissect_pkix1explicit_Name(FALSE, tvb, offset, pinfo, tree, hf_pkinit_caName);
117 }
118 static int dissect_issuerAndSerial(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
119   return dissect_cms_IssuerAndSerialNumber(FALSE, tvb, offset, pinfo, tree, hf_pkinit_issuerAndSerial);
120 }
121 static int dissect_clientPublicValue(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
122   return dissect_pkix1explicit_SubjectPublicKeyInfo(FALSE, tvb, offset, pinfo, tree, hf_pkinit_clientPublicValue);
123 }
124 static int dissect_supportedCMSTypes_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
125   return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, pinfo, tree, hf_pkinit_supportedCMSTypes_item);
126 }
127 static int dissect_ctime(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
128   return dissect_KerberosV5Spec2_KerberosTime(FALSE, tvb, offset, pinfo, tree, hf_pkinit_ctime);
129 }
130 static int dissect_paChecksum(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
131   return dissect_KerberosV5Spec2_Checksum(FALSE, tvb, offset, pinfo, tree, hf_pkinit_paChecksum);
132 }
133 static int dissect_dhSignedData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
134   return dissect_cms_ContentInfo(FALSE, tvb, offset, pinfo, tree, hf_pkinit_dhSignedData);
135 }
136 static int dissect_encKeyPack(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
137   return dissect_cms_ContentInfo(FALSE, tvb, offset, pinfo, tree, hf_pkinit_encKeyPack);
138 }
139 static int dissect_dhKeyExpiration(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
140   return dissect_KerberosV5Spec2_KerberosTime(FALSE, tvb, offset, pinfo, tree, hf_pkinit_dhKeyExpiration);
141 }
142
143
144 static const value_string pkinit_TrustedCA_vals[] = {
145   {   0, "caName" },
146   {   2, "issuerAndSerial" },
147   { 0, NULL }
148 };
149
150 static const ber_choice_t TrustedCA_choice[] = {
151   {   0, BER_CLASS_CON, 0, 0, dissect_caName },
152   {   2, BER_CLASS_CON, 2, 0, dissect_issuerAndSerial },
153   { 0, 0, 0, 0, NULL }
154 };
155
156 static int
157 dissect_pkinit_TrustedCA(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
158   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
159                                  TrustedCA_choice, hf_index, ett_pkinit_TrustedCA,
160                                  NULL);
161
162   return offset;
163 }
164 static int dissect_trustedCertifiers_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
165   return dissect_pkinit_TrustedCA(FALSE, tvb, offset, pinfo, tree, hf_pkinit_trustedCertifiers_item);
166 }
167
168
169 static const ber_sequence_t SEQUENCE_OF_TrustedCA_sequence_of[1] = {
170   { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_trustedCertifiers_item },
171 };
172
173 static int
174 dissect_pkinit_SEQUENCE_OF_TrustedCA(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
175   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
176                                       SEQUENCE_OF_TrustedCA_sequence_of, hf_index, ett_pkinit_SEQUENCE_OF_TrustedCA);
177
178   return offset;
179 }
180 static int dissect_trustedCertifiers(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
181   return dissect_pkinit_SEQUENCE_OF_TrustedCA(FALSE, tvb, offset, pinfo, tree, hf_pkinit_trustedCertifiers);
182 }
183
184
185 static const ber_sequence_t PaPkAsReq_sequence[] = {
186   { BER_CLASS_CON, 0, 0, dissect_signedAuthPack },
187   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_trustedCertifiers },
188   { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_kdcCert },
189   { 0, 0, 0, NULL }
190 };
191
192 static int
193 dissect_pkinit_PaPkAsReq(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
194   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
195                                    PaPkAsReq_sequence, hf_index, ett_pkinit_PaPkAsReq);
196
197   return offset;
198 }
199
200
201
202 static int
203 dissect_pkinit_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
204   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
205                                   NULL);
206
207   return offset;
208 }
209 static int dissect_cusec(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
210   return dissect_pkinit_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_pkinit_cusec);
211 }
212 static int dissect_dhNonce(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
213   return dissect_pkinit_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_pkinit_dhNonce);
214 }
215
216
217
218 static int
219 dissect_pkinit_INTEGER_0_4294967295(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
220   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
221                                   NULL);
222
223   return offset;
224 }
225 static int dissect_paNonce(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
226   return dissect_pkinit_INTEGER_0_4294967295(FALSE, tvb, offset, pinfo, tree, hf_pkinit_paNonce);
227 }
228
229
230 static const ber_sequence_t PKAuthenticator_sequence[] = {
231   { BER_CLASS_CON, 0, 0, dissect_cusec },
232   { BER_CLASS_CON, 1, 0, dissect_ctime },
233   { BER_CLASS_CON, 2, 0, dissect_paNonce },
234   { BER_CLASS_CON, 3, 0, dissect_paChecksum },
235   { 0, 0, 0, NULL }
236 };
237
238 static int
239 dissect_pkinit_PKAuthenticator(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
240   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
241                                    PKAuthenticator_sequence, hf_index, ett_pkinit_PKAuthenticator);
242
243   return offset;
244 }
245 static int dissect_pkAuthenticator(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
246   return dissect_pkinit_PKAuthenticator(FALSE, tvb, offset, pinfo, tree, hf_pkinit_pkAuthenticator);
247 }
248
249
250 static const ber_sequence_t SEQUENCE_OF_AlgorithmIdentifier_sequence_of[1] = {
251   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_supportedCMSTypes_item },
252 };
253
254 static int
255 dissect_pkinit_SEQUENCE_OF_AlgorithmIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
256   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
257                                       SEQUENCE_OF_AlgorithmIdentifier_sequence_of, hf_index, ett_pkinit_SEQUENCE_OF_AlgorithmIdentifier);
258
259   return offset;
260 }
261 static int dissect_supportedCMSTypes(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
262   return dissect_pkinit_SEQUENCE_OF_AlgorithmIdentifier(FALSE, tvb, offset, pinfo, tree, hf_pkinit_supportedCMSTypes);
263 }
264
265
266 static const ber_sequence_t AuthPack_sequence[] = {
267   { BER_CLASS_CON, 0, 0, dissect_pkAuthenticator },
268   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_clientPublicValue },
269   { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_supportedCMSTypes },
270   { 0, 0, 0, NULL }
271 };
272
273 static int
274 dissect_pkinit_AuthPack(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
275   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
276                                    AuthPack_sequence, hf_index, ett_pkinit_AuthPack);
277
278   return offset;
279 }
280
281
282 static const value_string pkinit_PaPkAsRep_vals[] = {
283   {   0, "dhSignedData" },
284   {   1, "encKeyPack" },
285   { 0, NULL }
286 };
287
288 static const ber_choice_t PaPkAsRep_choice[] = {
289   {   0, BER_CLASS_CON, 0, 0, dissect_dhSignedData },
290   {   1, BER_CLASS_CON, 1, 0, dissect_encKeyPack },
291   { 0, 0, 0, 0, NULL }
292 };
293
294 static int
295 dissect_pkinit_PaPkAsRep(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
296   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
297                                  PaPkAsRep_choice, hf_index, ett_pkinit_PaPkAsRep,
298                                  NULL);
299
300   return offset;
301 }
302
303
304
305 static int
306 dissect_pkinit_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
307   offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
308                                     NULL, hf_index, -1,
309                                     NULL);
310
311   return offset;
312 }
313 static int dissect_subjectPublicKey(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
314   return dissect_pkinit_BIT_STRING(FALSE, tvb, offset, pinfo, tree, hf_pkinit_subjectPublicKey);
315 }
316
317
318 static const ber_sequence_t KDCDHKeyInfo_sequence[] = {
319   { BER_CLASS_CON, 0, 0, dissect_subjectPublicKey },
320   { BER_CLASS_CON, 1, 0, dissect_dhNonce },
321   { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_dhKeyExpiration },
322   { 0, 0, 0, NULL }
323 };
324
325 static int
326 dissect_pkinit_KDCDHKeyInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
327   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
328                                    KDCDHKeyInfo_sequence, hf_index, ett_pkinit_KDCDHKeyInfo);
329
330   return offset;
331 }
332
333 /*--- PDUs ---*/
334
335 static void dissect_AuthPack_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
336   dissect_pkinit_AuthPack(FALSE, tvb, 0, pinfo, tree, hf_pkinit_AuthPack_PDU);
337 }
338 static void dissect_KDCDHKeyInfo_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
339   dissect_pkinit_KDCDHKeyInfo(FALSE, tvb, 0, pinfo, tree, hf_pkinit_KDCDHKeyInfo_PDU);
340 }
341
342
343 /*--- End of included file: packet-pkinit-fn.c ---*/
344 #line 58 "packet-pkinit-template.c"
345
346 int
347 dissect_pkinit_PA_PK_AS_REQ(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
348   offset = dissect_pkinit_PaPkAsReq(FALSE, tvb, offset, pinfo, tree, -1);
349   return offset;
350 }
351
352 int
353 dissect_pkinit_PA_PK_AS_REP(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
354   offset = dissect_pkinit_PaPkAsRep(FALSE, tvb, offset, pinfo, tree, -1);
355   return offset;
356 }
357
358 static int
359 dissect_KerberosV5Spec2_KerberosTime(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index _U_) {
360   offset = dissect_krb5_ctime(pinfo, tree, tvb, offset);
361   return offset;
362 }
363
364 static int
365 dissect_KerberosV5Spec2_Checksum(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index _U_) {
366   offset = dissect_krb5_Checksum(pinfo, tree, tvb, offset);
367   return offset;
368 }
369
370
371 /*--- proto_register_pkinit ----------------------------------------------*/
372 void proto_register_pkinit(void) {
373
374   /* List of fields */
375   static hf_register_info hf[] = {
376
377 /*--- Included file: packet-pkinit-hfarr.c ---*/
378 #line 1 "packet-pkinit-hfarr.c"
379     { &hf_pkinit_AuthPack_PDU,
380       { "AuthPack", "pkinit.AuthPack",
381         FT_NONE, BASE_NONE, NULL, 0,
382         "pkinit.AuthPack", HFILL }},
383     { &hf_pkinit_KDCDHKeyInfo_PDU,
384       { "KDCDHKeyInfo", "pkinit.KDCDHKeyInfo",
385         FT_NONE, BASE_NONE, NULL, 0,
386         "pkinit.KDCDHKeyInfo", HFILL }},
387     { &hf_pkinit_signedAuthPack,
388       { "signedAuthPack", "pkinit.signedAuthPack",
389         FT_NONE, BASE_NONE, NULL, 0,
390         "cms.ContentInfo", HFILL }},
391     { &hf_pkinit_trustedCertifiers,
392       { "trustedCertifiers", "pkinit.trustedCertifiers",
393         FT_UINT32, BASE_DEC, NULL, 0,
394         "pkinit.SEQUENCE_OF_TrustedCA", HFILL }},
395     { &hf_pkinit_trustedCertifiers_item,
396       { "Item", "pkinit.trustedCertifiers_item",
397         FT_UINT32, BASE_DEC, VALS(pkinit_TrustedCA_vals), 0,
398         "pkinit.TrustedCA", HFILL }},
399     { &hf_pkinit_kdcCert,
400       { "kdcCert", "pkinit.kdcCert",
401         FT_NONE, BASE_NONE, NULL, 0,
402         "cms.IssuerAndSerialNumber", HFILL }},
403     { &hf_pkinit_caName,
404       { "caName", "pkinit.caName",
405         FT_UINT32, BASE_DEC, NULL, 0,
406         "pkix1explicit.Name", HFILL }},
407     { &hf_pkinit_issuerAndSerial,
408       { "issuerAndSerial", "pkinit.issuerAndSerial",
409         FT_NONE, BASE_NONE, NULL, 0,
410         "cms.IssuerAndSerialNumber", HFILL }},
411     { &hf_pkinit_pkAuthenticator,
412       { "pkAuthenticator", "pkinit.pkAuthenticator",
413         FT_NONE, BASE_NONE, NULL, 0,
414         "pkinit.PKAuthenticator", HFILL }},
415     { &hf_pkinit_clientPublicValue,
416       { "clientPublicValue", "pkinit.clientPublicValue",
417         FT_NONE, BASE_NONE, NULL, 0,
418         "pkix1explicit.SubjectPublicKeyInfo", HFILL }},
419     { &hf_pkinit_supportedCMSTypes,
420       { "supportedCMSTypes", "pkinit.supportedCMSTypes",
421         FT_UINT32, BASE_DEC, NULL, 0,
422         "pkinit.SEQUENCE_OF_AlgorithmIdentifier", HFILL }},
423     { &hf_pkinit_supportedCMSTypes_item,
424       { "Item", "pkinit.supportedCMSTypes_item",
425         FT_NONE, BASE_NONE, NULL, 0,
426         "pkix1explicit.AlgorithmIdentifier", HFILL }},
427     { &hf_pkinit_cusec,
428       { "cusec", "pkinit.cusec",
429         FT_INT32, BASE_DEC, NULL, 0,
430         "pkinit.INTEGER", HFILL }},
431     { &hf_pkinit_ctime,
432       { "ctime", "pkinit.ctime",
433         FT_NONE, BASE_NONE, NULL, 0,
434         "KerberosV5Spec2.KerberosTime", HFILL }},
435     { &hf_pkinit_paNonce,
436       { "nonce", "pkinit.nonce",
437         FT_UINT32, BASE_DEC, NULL, 0,
438         "pkinit.INTEGER_0_4294967295", HFILL }},
439     { &hf_pkinit_paChecksum,
440       { "paChecksum", "pkinit.paChecksum",
441         FT_NONE, BASE_NONE, NULL, 0,
442         "KerberosV5Spec2.Checksum", HFILL }},
443     { &hf_pkinit_dhSignedData,
444       { "dhSignedData", "pkinit.dhSignedData",
445         FT_NONE, BASE_NONE, NULL, 0,
446         "cms.ContentInfo", HFILL }},
447     { &hf_pkinit_encKeyPack,
448       { "encKeyPack", "pkinit.encKeyPack",
449         FT_NONE, BASE_NONE, NULL, 0,
450         "cms.ContentInfo", HFILL }},
451     { &hf_pkinit_subjectPublicKey,
452       { "subjectPublicKey", "pkinit.subjectPublicKey",
453         FT_BYTES, BASE_HEX, NULL, 0,
454         "pkinit.BIT_STRING", HFILL }},
455     { &hf_pkinit_dhNonce,
456       { "nonce", "pkinit.nonce",
457         FT_INT32, BASE_DEC, NULL, 0,
458         "pkinit.INTEGER", HFILL }},
459     { &hf_pkinit_dhKeyExpiration,
460       { "dhKeyExpiration", "pkinit.dhKeyExpiration",
461         FT_NONE, BASE_NONE, NULL, 0,
462         "KerberosV5Spec2.KerberosTime", HFILL }},
463
464 /*--- End of included file: packet-pkinit-hfarr.c ---*/
465 #line 90 "packet-pkinit-template.c"
466   };
467
468   /* List of subtrees */
469   static gint *ett[] = {
470
471 /*--- Included file: packet-pkinit-ettarr.c ---*/
472 #line 1 "packet-pkinit-ettarr.c"
473     &ett_pkinit_PaPkAsReq,
474     &ett_pkinit_SEQUENCE_OF_TrustedCA,
475     &ett_pkinit_TrustedCA,
476     &ett_pkinit_AuthPack,
477     &ett_pkinit_SEQUENCE_OF_AlgorithmIdentifier,
478     &ett_pkinit_PKAuthenticator,
479     &ett_pkinit_PaPkAsRep,
480     &ett_pkinit_KDCDHKeyInfo,
481
482 /*--- End of included file: packet-pkinit-ettarr.c ---*/
483 #line 95 "packet-pkinit-template.c"
484   };
485
486   /* Register protocol */
487   proto_pkinit = proto_register_protocol(PNAME, PSNAME, PFNAME);
488
489   /* Register fields and subtrees */
490   proto_register_field_array(proto_pkinit, hf, array_length(hf));
491   proto_register_subtree_array(ett, array_length(ett));
492
493 }
494
495
496 /*--- proto_reg_handoff_pkinit -------------------------------------------*/
497 void proto_reg_handoff_pkinit(void) {
498
499 /*--- Included file: packet-pkinit-dis-tab.c ---*/
500 #line 1 "packet-pkinit-dis-tab.c"
501   register_ber_oid_dissector("1.3.6.1.5.2.3.1", dissect_AuthPack_PDU, proto_pkinit, "id-pkauthdata");
502   register_ber_oid_dissector("1.3.6.1.5.2.3.2", dissect_KDCDHKeyInfo_PDU, proto_pkinit, "id-pkdhkeydata");
503
504
505 /*--- End of included file: packet-pkinit-dis-tab.c ---*/
506 #line 110 "packet-pkinit-template.c"
507 }
508