2 * Routines for PKINIT packet dissection
7 * Ethereal - Network traffic analyzer
8 * By Gerald Combs <gerald@ethereal.com>
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31 #include <epan/packet.h>
32 #include <epan/conversation.h>
37 #include "packet-ber.h"
38 #include "packet-pkinit.h"
39 #include "packet-cms.h"
40 #include "packet-pkix1explicit.h"
41 #include "packet-kerberos.h"
43 #define PNAME "PKINIT"
44 #define PSNAME "PKInit"
45 #define PFNAME "pkinit"
47 /* Initialize the protocol and registered fields */
48 static int proto_pkinit = -1;
49 #include "packet-pkinit-hf.c"
51 /* Initialize the subtree pointers */
52 #include "packet-pkinit-ett.c"
54 static int dissect_KerberosV5Spec2_KerberosTime(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index _U_);
55 static int dissect_KerberosV5Spec2_Checksum(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index _U_);
57 #include "packet-pkinit-fn.c"
60 dissect_pkinit_PA_PK_AS_REQ(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
61 offset = dissect_pkinit_PaPkAsReq(FALSE, tvb, offset, pinfo, tree, -1);
66 dissect_pkinit_PA_PK_AS_REP(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
67 offset = dissect_pkinit_PaPkAsRep(FALSE, tvb, offset, pinfo, tree, -1);
72 dissect_KerberosV5Spec2_KerberosTime(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index _U_) {
73 offset = dissect_krb5_ctime(pinfo, tree, tvb, offset);
78 dissect_KerberosV5Spec2_Checksum(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index _U_) {
79 offset = dissect_krb5_Checksum(pinfo, tree, tvb, offset);
84 /*--- proto_register_pkinit ----------------------------------------------*/
85 void proto_register_pkinit(void) {
88 static hf_register_info hf[] = {
89 #include "packet-pkinit-hfarr.c"
92 /* List of subtrees */
93 static gint *ett[] = {
94 #include "packet-pkinit-ettarr.c"
97 /* Register protocol */
98 proto_pkinit = proto_register_protocol(PNAME, PSNAME, PFNAME);
100 /* Register fields and subtrees */
101 proto_register_field_array(proto_pkinit, hf, array_length(hf));
102 proto_register_subtree_array(ett, array_length(ett));
107 /*--- proto_reg_handoff_pkinit -------------------------------------------*/
108 void proto_reg_handoff_pkinit(void) {
109 #include "packet-pkinit-dis-tab.c"