2 * Routines for PKINIT packet dissection
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
31 #include <epan/packet.h>
32 #include <epan/asn1.h>
34 #include "packet-ber.h"
35 #include "packet-pkinit.h"
36 #include "packet-cms.h"
37 #include "packet-pkix1explicit.h"
38 #include "packet-kerberos.h"
40 #define PNAME "PKINIT"
41 #define PSNAME "PKInit"
42 #define PFNAME "pkinit"
44 /* Initialize the protocol and registered fields */
45 static int proto_pkinit = -1;
46 #include "packet-pkinit-hf.c"
48 /* Initialize the subtree pointers */
49 #include "packet-pkinit-ett.c"
51 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_);
52 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_);
54 #include "packet-pkinit-fn.c"
57 dissect_pkinit_PA_PK_AS_REQ(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) {
58 offset = dissect_pkinit_PaPkAsReq(FALSE, tvb, offset, actx, tree, -1);
63 dissect_pkinit_PA_PK_AS_REP(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) {
64 offset = dissect_pkinit_PaPkAsRep(FALSE, tvb, offset, actx, tree, -1);
69 dissect_KerberosV5Spec2_KerberosTime(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) {
70 offset = dissect_krb5_ctime(tree, tvb, offset, actx);
75 dissect_KerberosV5Spec2_Checksum(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) {
76 offset = dissect_krb5_Checksum(tree, tvb, offset, actx);
81 /*--- proto_register_pkinit ----------------------------------------------*/
82 void proto_register_pkinit(void) {
85 static hf_register_info hf[] = {
86 #include "packet-pkinit-hfarr.c"
89 /* List of subtrees */
90 static gint *ett[] = {
91 #include "packet-pkinit-ettarr.c"
94 /* Register protocol */
95 proto_pkinit = proto_register_protocol(PNAME, PSNAME, PFNAME);
97 /* Register fields and subtrees */
98 proto_register_field_array(proto_pkinit, hf, array_length(hf));
99 proto_register_subtree_array(ett, array_length(ett));
104 /*--- proto_reg_handoff_pkinit -------------------------------------------*/
105 void proto_reg_handoff_pkinit(void) {
106 #include "packet-pkinit-dis-tab.c"