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