Move 3 ASN1 dissectors to 'clean' group; move 1 PIDL dissector to 'dirty' group.
[metze/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 -b -p pkinit -c ./pkinit.cnf -s ./packet-pkinit-template -D . -O ../../epan/dissectors PKINIT.asn */
5
6 /* Input file: packet-pkinit-template.c */
7
8 #line 1 "../../asn1/pkinit/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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
32  */
33
34 #include "config.h"
35
36 #include <glib.h>
37 #include <epan/packet.h>
38 #include <epan/asn1.h>
39
40 #include "packet-ber.h"
41 #include "packet-pkinit.h"
42 #include "packet-cms.h"
43 #include "packet-pkix1explicit.h"
44 #include "packet-kerberos.h"
45
46 #define PNAME  "PKINIT"
47 #define PSNAME "PKInit"
48 #define PFNAME "pkinit"
49
50 /* Initialize the protocol and registered fields */
51 static int proto_pkinit = -1;
52
53 /*--- Included file: packet-pkinit-hf.c ---*/
54 #line 1 "../../asn1/pkinit/packet-pkinit-hf.c"
55 static int hf_pkinit_AuthPack_PDU = -1;           /* AuthPack */
56 static int hf_pkinit_KRB5PrincipalName_PDU = -1;  /* KRB5PrincipalName */
57 static int hf_pkinit_KDCDHKeyInfo_PDU = -1;       /* KDCDHKeyInfo */
58 static int hf_pkinit_signedAuthPack = -1;         /* ContentInfo */
59 static int hf_pkinit_trustedCertifiers = -1;      /* SEQUENCE_OF_TrustedCA */
60 static int hf_pkinit_trustedCertifiers_item = -1;  /* TrustedCA */
61 static int hf_pkinit_kdcCert = -1;                /* IssuerAndSerialNumber */
62 static int hf_pkinit_caName = -1;                 /* Name */
63 static int hf_pkinit_issuerAndSerial = -1;        /* IssuerAndSerialNumber */
64 static int hf_pkinit_pkAuthenticator = -1;        /* PKAuthenticator */
65 static int hf_pkinit_clientPublicValue = -1;      /* SubjectPublicKeyInfo */
66 static int hf_pkinit_supportedCMSTypes = -1;      /* SEQUENCE_OF_AlgorithmIdentifier */
67 static int hf_pkinit_supportedCMSTypes_item = -1;  /* AlgorithmIdentifier */
68 static int hf_pkinit_cusec = -1;                  /* INTEGER */
69 static int hf_pkinit_ctime = -1;                  /* KerberosTime */
70 static int hf_pkinit_paNonce = -1;                /* INTEGER_0_4294967295 */
71 static int hf_pkinit_paChecksum = -1;             /* Checksum */
72 static int hf_pkinit_realm = -1;                  /* Realm */
73 static int hf_pkinit_principalName = -1;          /* PrincipalName */
74 static int hf_pkinit_dhSignedData = -1;           /* ContentInfo */
75 static int hf_pkinit_encKeyPack = -1;             /* ContentInfo */
76 static int hf_pkinit_subjectPublicKey = -1;       /* BIT_STRING */
77 static int hf_pkinit_dhNonce = -1;                /* INTEGER */
78 static int hf_pkinit_dhKeyExpiration = -1;        /* KerberosTime */
79
80 /*--- End of included file: packet-pkinit-hf.c ---*/
81 #line 45 "../../asn1/pkinit/packet-pkinit-template.c"
82
83 /* Initialize the subtree pointers */
84
85 /*--- Included file: packet-pkinit-ett.c ---*/
86 #line 1 "../../asn1/pkinit/packet-pkinit-ett.c"
87 static gint ett_pkinit_PaPkAsReq = -1;
88 static gint ett_pkinit_SEQUENCE_OF_TrustedCA = -1;
89 static gint ett_pkinit_TrustedCA = -1;
90 static gint ett_pkinit_AuthPack = -1;
91 static gint ett_pkinit_SEQUENCE_OF_AlgorithmIdentifier = -1;
92 static gint ett_pkinit_PKAuthenticator = -1;
93 static gint ett_pkinit_KRB5PrincipalName = -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 #line 48 "../../asn1/pkinit/packet-pkinit-template.c"
99
100 static int dissect_KerberosV5Spec2_KerberosTime(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,  asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_);
101 static int dissect_KerberosV5Spec2_Checksum(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,  asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_);
102 static int dissect_KerberosV5Spec2_Realm(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,  asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_);
103 static int dissect_KerberosV5Spec2_PrincipalName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,  asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_);
104
105
106 /*--- Included file: packet-pkinit-fn.c ---*/
107 #line 1 "../../asn1/pkinit/packet-pkinit-fn.c"
108
109 static const value_string pkinit_TrustedCA_vals[] = {
110   {   0, "caName" },
111   {   2, "issuerAndSerial" },
112   { 0, NULL }
113 };
114
115 static const ber_choice_t TrustedCA_choice[] = {
116   {   0, &hf_pkinit_caName       , BER_CLASS_CON, 0, 0, dissect_pkix1explicit_Name },
117   {   2, &hf_pkinit_issuerAndSerial, BER_CLASS_CON, 2, 0, dissect_cms_IssuerAndSerialNumber },
118   { 0, NULL, 0, 0, 0, NULL }
119 };
120
121 static int
122 dissect_pkinit_TrustedCA(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
123   offset = dissect_ber_choice(actx, tree, tvb, offset,
124                                  TrustedCA_choice, hf_index, ett_pkinit_TrustedCA,
125                                  NULL);
126
127   return offset;
128 }
129
130
131 static const ber_sequence_t SEQUENCE_OF_TrustedCA_sequence_of[1] = {
132   { &hf_pkinit_trustedCertifiers_item, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_pkinit_TrustedCA },
133 };
134
135 static int
136 dissect_pkinit_SEQUENCE_OF_TrustedCA(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
137   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
138                                       SEQUENCE_OF_TrustedCA_sequence_of, hf_index, ett_pkinit_SEQUENCE_OF_TrustedCA);
139
140   return offset;
141 }
142
143
144 static const ber_sequence_t PaPkAsReq_sequence[] = {
145   { &hf_pkinit_signedAuthPack, BER_CLASS_CON, 0, 0, dissect_cms_ContentInfo },
146   { &hf_pkinit_trustedCertifiers, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_pkinit_SEQUENCE_OF_TrustedCA },
147   { &hf_pkinit_kdcCert      , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_cms_IssuerAndSerialNumber },
148   { NULL, 0, 0, 0, NULL }
149 };
150
151 int
152 dissect_pkinit_PaPkAsReq(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
153   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
154                                    PaPkAsReq_sequence, hf_index, ett_pkinit_PaPkAsReq);
155
156   return offset;
157 }
158
159
160
161 static int
162 dissect_pkinit_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
163   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
164                                                 NULL);
165
166   return offset;
167 }
168
169
170
171 static int
172 dissect_pkinit_INTEGER_0_4294967295(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
173   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
174                                                 NULL);
175
176   return offset;
177 }
178
179
180 static const ber_sequence_t PKAuthenticator_sequence[] = {
181   { &hf_pkinit_cusec        , BER_CLASS_CON, 0, 0, dissect_pkinit_INTEGER },
182   { &hf_pkinit_ctime        , BER_CLASS_CON, 1, 0, dissect_KerberosV5Spec2_KerberosTime },
183   { &hf_pkinit_paNonce      , BER_CLASS_CON, 2, 0, dissect_pkinit_INTEGER_0_4294967295 },
184   { &hf_pkinit_paChecksum   , BER_CLASS_CON, 3, 0, dissect_KerberosV5Spec2_Checksum },
185   { NULL, 0, 0, 0, NULL }
186 };
187
188 static int
189 dissect_pkinit_PKAuthenticator(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
190   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
191                                    PKAuthenticator_sequence, hf_index, ett_pkinit_PKAuthenticator);
192
193   return offset;
194 }
195
196
197 static const ber_sequence_t SEQUENCE_OF_AlgorithmIdentifier_sequence_of[1] = {
198   { &hf_pkinit_supportedCMSTypes_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
199 };
200
201 static int
202 dissect_pkinit_SEQUENCE_OF_AlgorithmIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
203   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
204                                       SEQUENCE_OF_AlgorithmIdentifier_sequence_of, hf_index, ett_pkinit_SEQUENCE_OF_AlgorithmIdentifier);
205
206   return offset;
207 }
208
209
210 static const ber_sequence_t AuthPack_sequence[] = {
211   { &hf_pkinit_pkAuthenticator, BER_CLASS_CON, 0, 0, dissect_pkinit_PKAuthenticator },
212   { &hf_pkinit_clientPublicValue, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_pkix1explicit_SubjectPublicKeyInfo },
213   { &hf_pkinit_supportedCMSTypes, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_pkinit_SEQUENCE_OF_AlgorithmIdentifier },
214   { NULL, 0, 0, 0, NULL }
215 };
216
217 static int
218 dissect_pkinit_AuthPack(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
219   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
220                                    AuthPack_sequence, hf_index, ett_pkinit_AuthPack);
221
222   return offset;
223 }
224
225
226 static const ber_sequence_t KRB5PrincipalName_sequence[] = {
227   { &hf_pkinit_realm        , BER_CLASS_CON, 0, 0, dissect_KerberosV5Spec2_Realm },
228   { &hf_pkinit_principalName, BER_CLASS_CON, 1, 0, dissect_KerberosV5Spec2_PrincipalName },
229   { NULL, 0, 0, 0, NULL }
230 };
231
232 static int
233 dissect_pkinit_KRB5PrincipalName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
234   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
235                                    KRB5PrincipalName_sequence, hf_index, ett_pkinit_KRB5PrincipalName);
236
237   return offset;
238 }
239
240
241 const value_string pkinit_PaPkAsRep_vals[] = {
242   {   0, "dhSignedData" },
243   {   1, "encKeyPack" },
244   { 0, NULL }
245 };
246
247 static const ber_choice_t PaPkAsRep_choice[] = {
248   {   0, &hf_pkinit_dhSignedData , BER_CLASS_CON, 0, 0, dissect_cms_ContentInfo },
249   {   1, &hf_pkinit_encKeyPack   , BER_CLASS_CON, 1, 0, dissect_cms_ContentInfo },
250   { 0, NULL, 0, 0, 0, NULL }
251 };
252
253 int
254 dissect_pkinit_PaPkAsRep(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
255   offset = dissect_ber_choice(actx, tree, tvb, offset,
256                                  PaPkAsRep_choice, hf_index, ett_pkinit_PaPkAsRep,
257                                  NULL);
258
259   return offset;
260 }
261
262
263
264 static int
265 dissect_pkinit_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
266   offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
267                                     NULL, hf_index, -1,
268                                     NULL);
269
270   return offset;
271 }
272
273
274 static const ber_sequence_t KDCDHKeyInfo_sequence[] = {
275   { &hf_pkinit_subjectPublicKey, BER_CLASS_CON, 0, 0, dissect_pkinit_BIT_STRING },
276   { &hf_pkinit_dhNonce      , BER_CLASS_CON, 1, 0, dissect_pkinit_INTEGER },
277   { &hf_pkinit_dhKeyExpiration, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_KerberosV5Spec2_KerberosTime },
278   { NULL, 0, 0, 0, NULL }
279 };
280
281 static int
282 dissect_pkinit_KDCDHKeyInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
283   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
284                                    KDCDHKeyInfo_sequence, hf_index, ett_pkinit_KDCDHKeyInfo);
285
286   return offset;
287 }
288
289 /*--- PDUs ---*/
290
291 static void dissect_AuthPack_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
292   asn1_ctx_t asn1_ctx;
293   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
294   dissect_pkinit_AuthPack(FALSE, tvb, 0, &asn1_ctx, tree, hf_pkinit_AuthPack_PDU);
295 }
296 static void dissect_KRB5PrincipalName_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
297   asn1_ctx_t asn1_ctx;
298   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
299   dissect_pkinit_KRB5PrincipalName(FALSE, tvb, 0, &asn1_ctx, tree, hf_pkinit_KRB5PrincipalName_PDU);
300 }
301 static void dissect_KDCDHKeyInfo_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
302   asn1_ctx_t asn1_ctx;
303   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
304   dissect_pkinit_KDCDHKeyInfo(FALSE, tvb, 0, &asn1_ctx, tree, hf_pkinit_KDCDHKeyInfo_PDU);
305 }
306
307
308 /*--- End of included file: packet-pkinit-fn.c ---*/
309 #line 55 "../../asn1/pkinit/packet-pkinit-template.c"
310
311 int
312 dissect_pkinit_PA_PK_AS_REQ(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) {
313   offset = dissect_pkinit_PaPkAsReq(FALSE, tvb, offset, actx, tree, -1);
314   return offset;
315 }
316
317 int
318 dissect_pkinit_PA_PK_AS_REP(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) {
319   offset = dissect_pkinit_PaPkAsRep(FALSE, tvb, offset, actx, tree, -1);
320   return offset;
321 }
322
323 static int
324 dissect_KerberosV5Spec2_KerberosTime(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) {
325   offset = dissect_krb5_ctime(tree, tvb, offset, actx);
326   return offset;
327 }
328
329 static int
330 dissect_KerberosV5Spec2_Checksum(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) {
331   offset = dissect_krb5_Checksum(tree, tvb, offset, actx);
332   return offset;
333 }
334
335 static int
336 dissect_KerberosV5Spec2_Realm(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) {
337   offset = dissect_krb5_realm(tree, tvb, offset, actx);
338   return offset;
339 }
340
341 static int
342 dissect_KerberosV5Spec2_PrincipalName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) {
343   offset = dissect_krb5_cname(tree, tvb, offset, actx);
344   return offset;
345 }
346
347
348 /*--- proto_register_pkinit ----------------------------------------------*/
349 void proto_register_pkinit(void) {
350
351   /* List of fields */
352   static hf_register_info hf[] = {
353
354 /*--- Included file: packet-pkinit-hfarr.c ---*/
355 #line 1 "../../asn1/pkinit/packet-pkinit-hfarr.c"
356     { &hf_pkinit_AuthPack_PDU,
357       { "AuthPack", "pkinit.AuthPack",
358         FT_NONE, BASE_NONE, NULL, 0,
359         NULL, HFILL }},
360     { &hf_pkinit_KRB5PrincipalName_PDU,
361       { "KRB5PrincipalName", "pkinit.KRB5PrincipalName",
362         FT_NONE, BASE_NONE, NULL, 0,
363         NULL, HFILL }},
364     { &hf_pkinit_KDCDHKeyInfo_PDU,
365       { "KDCDHKeyInfo", "pkinit.KDCDHKeyInfo",
366         FT_NONE, BASE_NONE, NULL, 0,
367         NULL, HFILL }},
368     { &hf_pkinit_signedAuthPack,
369       { "signedAuthPack", "pkinit.signedAuthPack",
370         FT_NONE, BASE_NONE, NULL, 0,
371         "ContentInfo", HFILL }},
372     { &hf_pkinit_trustedCertifiers,
373       { "trustedCertifiers", "pkinit.trustedCertifiers",
374         FT_UINT32, BASE_DEC, NULL, 0,
375         "SEQUENCE_OF_TrustedCA", HFILL }},
376     { &hf_pkinit_trustedCertifiers_item,
377       { "TrustedCA", "pkinit.TrustedCA",
378         FT_UINT32, BASE_DEC, VALS(pkinit_TrustedCA_vals), 0,
379         NULL, HFILL }},
380     { &hf_pkinit_kdcCert,
381       { "kdcCert", "pkinit.kdcCert",
382         FT_NONE, BASE_NONE, NULL, 0,
383         "IssuerAndSerialNumber", HFILL }},
384     { &hf_pkinit_caName,
385       { "caName", "pkinit.caName",
386         FT_UINT32, BASE_DEC, NULL, 0,
387         "Name", HFILL }},
388     { &hf_pkinit_issuerAndSerial,
389       { "issuerAndSerial", "pkinit.issuerAndSerial",
390         FT_NONE, BASE_NONE, NULL, 0,
391         "IssuerAndSerialNumber", HFILL }},
392     { &hf_pkinit_pkAuthenticator,
393       { "pkAuthenticator", "pkinit.pkAuthenticator",
394         FT_NONE, BASE_NONE, NULL, 0,
395         NULL, HFILL }},
396     { &hf_pkinit_clientPublicValue,
397       { "clientPublicValue", "pkinit.clientPublicValue",
398         FT_NONE, BASE_NONE, NULL, 0,
399         "SubjectPublicKeyInfo", HFILL }},
400     { &hf_pkinit_supportedCMSTypes,
401       { "supportedCMSTypes", "pkinit.supportedCMSTypes",
402         FT_UINT32, BASE_DEC, NULL, 0,
403         "SEQUENCE_OF_AlgorithmIdentifier", HFILL }},
404     { &hf_pkinit_supportedCMSTypes_item,
405       { "AlgorithmIdentifier", "pkinit.AlgorithmIdentifier",
406         FT_NONE, BASE_NONE, NULL, 0,
407         NULL, HFILL }},
408     { &hf_pkinit_cusec,
409       { "cusec", "pkinit.cusec",
410         FT_INT32, BASE_DEC, NULL, 0,
411         "INTEGER", HFILL }},
412     { &hf_pkinit_ctime,
413       { "ctime", "pkinit.ctime",
414         FT_NONE, BASE_NONE, NULL, 0,
415         "KerberosTime", HFILL }},
416     { &hf_pkinit_paNonce,
417       { "nonce", "pkinit.nonce",
418         FT_UINT32, BASE_DEC, NULL, 0,
419         "INTEGER_0_4294967295", HFILL }},
420     { &hf_pkinit_paChecksum,
421       { "paChecksum", "pkinit.paChecksum",
422         FT_NONE, BASE_NONE, NULL, 0,
423         "Checksum", HFILL }},
424     { &hf_pkinit_realm,
425       { "realm", "pkinit.realm",
426         FT_NONE, BASE_NONE, NULL, 0,
427         NULL, HFILL }},
428     { &hf_pkinit_principalName,
429       { "principalName", "pkinit.principalName",
430         FT_NONE, BASE_NONE, NULL, 0,
431         NULL, HFILL }},
432     { &hf_pkinit_dhSignedData,
433       { "dhSignedData", "pkinit.dhSignedData",
434         FT_NONE, BASE_NONE, NULL, 0,
435         "ContentInfo", HFILL }},
436     { &hf_pkinit_encKeyPack,
437       { "encKeyPack", "pkinit.encKeyPack",
438         FT_NONE, BASE_NONE, NULL, 0,
439         "ContentInfo", HFILL }},
440     { &hf_pkinit_subjectPublicKey,
441       { "subjectPublicKey", "pkinit.subjectPublicKey",
442         FT_BYTES, BASE_NONE, NULL, 0,
443         "BIT_STRING", HFILL }},
444     { &hf_pkinit_dhNonce,
445       { "nonce", "pkinit.nonce",
446         FT_INT32, BASE_DEC, NULL, 0,
447         "INTEGER", HFILL }},
448     { &hf_pkinit_dhKeyExpiration,
449       { "dhKeyExpiration", "pkinit.dhKeyExpiration",
450         FT_NONE, BASE_NONE, NULL, 0,
451         "KerberosTime", HFILL }},
452
453 /*--- End of included file: packet-pkinit-hfarr.c ---*/
454 #line 99 "../../asn1/pkinit/packet-pkinit-template.c"
455   };
456
457   /* List of subtrees */
458   static gint *ett[] = {
459
460 /*--- Included file: packet-pkinit-ettarr.c ---*/
461 #line 1 "../../asn1/pkinit/packet-pkinit-ettarr.c"
462     &ett_pkinit_PaPkAsReq,
463     &ett_pkinit_SEQUENCE_OF_TrustedCA,
464     &ett_pkinit_TrustedCA,
465     &ett_pkinit_AuthPack,
466     &ett_pkinit_SEQUENCE_OF_AlgorithmIdentifier,
467     &ett_pkinit_PKAuthenticator,
468     &ett_pkinit_KRB5PrincipalName,
469     &ett_pkinit_PaPkAsRep,
470     &ett_pkinit_KDCDHKeyInfo,
471
472 /*--- End of included file: packet-pkinit-ettarr.c ---*/
473 #line 104 "../../asn1/pkinit/packet-pkinit-template.c"
474   };
475
476   /* Register protocol */
477   proto_pkinit = proto_register_protocol(PNAME, PSNAME, PFNAME);
478
479   /* Register fields and subtrees */
480   proto_register_field_array(proto_pkinit, hf, array_length(hf));
481   proto_register_subtree_array(ett, array_length(ett));
482
483 }
484
485
486 /*--- proto_reg_handoff_pkinit -------------------------------------------*/
487 void proto_reg_handoff_pkinit(void) {
488
489 /*--- Included file: packet-pkinit-dis-tab.c ---*/
490 #line 1 "../../asn1/pkinit/packet-pkinit-dis-tab.c"
491   register_ber_oid_dissector("1.3.6.1.5.2.3.1", dissect_AuthPack_PDU, proto_pkinit, "id-pkauthdata");
492   register_ber_oid_dissector("1.3.6.1.5.2.3.2", dissect_KDCDHKeyInfo_PDU, proto_pkinit, "id-pkdhkeydata");
493   register_ber_oid_dissector("1.3.6.1.5.2.2", dissect_KRB5PrincipalName_PDU, proto_pkinit, "id-pkinit-san");
494
495
496 /*--- End of included file: packet-pkinit-dis-tab.c ---*/
497 #line 119 "../../asn1/pkinit/packet-pkinit-template.c"
498 }
499