-/* Do not modify this file. */
-/* It is created automatically by the ASN.1 to Wireshark dissector compiler */
+/* Do not modify this file. Changes will be overwritten. */
+/* Generated automatically by the ASN.1 to Wireshark dissector compiler */
/* packet-pkixtsp.c */
-/* ../../tools/asn2wrs.py -b -p pkixtsp -c ./pkixtsp.cnf -s ./packet-pkixtsp-template -D . -O ../../epan/dissectors PKIXTSP.asn */
+/* asn2wrs.py -b -p pkixtsp -c ./pkixtsp.cnf -s ./packet-pkixtsp-template -D . -O ../.. PKIXTSP.asn */
/* Input file: packet-pkixtsp-template.c */
-#line 1 "../../asn1/pkixtsp/packet-pkixtsp-template.c"
+#line 1 "./asn1/pkixtsp/packet-pkixtsp-template.c"
/* packet-pkixtsp.c
* Routines for RFC2634 Extended Security Services packet dissection
* Ronnie Sahlberg 2004
*
- * $Id$
- *
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "config.h"
-#include <glib.h>
#include <epan/packet.h>
#include <epan/asn1.h>
#define PSNAME "PKIXTSP"
#define PFNAME "pkixtsp"
+void proto_register_pkixtsp(void);
+void proto_reg_handoff_pkixtsp(void);
+
/* Initialize the protocol and registered fields */
static int proto_pkixtsp = -1;
/*--- Included file: packet-pkixtsp-hf.c ---*/
-#line 1 "../../asn1/pkixtsp/packet-pkixtsp-hf.c"
+#line 1 "./asn1/pkixtsp/packet-pkixtsp-hf.c"
static int hf_pkixtsp_TSTInfo_PDU = -1; /* TSTInfo */
+static int hf_pkixtsp_SignatureTimeStampToken_PDU = -1; /* SignatureTimeStampToken */
static int hf_pkixtsp_version = -1; /* T_version */
static int hf_pkixtsp_messageImprint = -1; /* MessageImprint */
static int hf_pkixtsp_reqPolicy = -1; /* TSAPolicyId */
static int hf_pkixtsp_PKIFailureInfo_systemFailure = -1;
/*--- End of included file: packet-pkixtsp-hf.c ---*/
-#line 47 "../../asn1/pkixtsp/packet-pkixtsp-template.c"
+#line 33 "./asn1/pkixtsp/packet-pkixtsp-template.c"
/* Initialize the subtree pointers */
static gint ett_pkixtsp = -1;
/*--- Included file: packet-pkixtsp-ett.c ---*/
-#line 1 "../../asn1/pkixtsp/packet-pkixtsp-ett.c"
+#line 1 "./asn1/pkixtsp/packet-pkixtsp-ett.c"
static gint ett_pkixtsp_TimeStampReq = -1;
static gint ett_pkixtsp_MessageImprint = -1;
static gint ett_pkixtsp_TimeStampResp = -1;
static gint ett_pkixtsp_Accuracy = -1;
/*--- End of included file: packet-pkixtsp-ett.c ---*/
-#line 51 "../../asn1/pkixtsp/packet-pkixtsp-template.c"
+#line 37 "./asn1/pkixtsp/packet-pkixtsp-template.c"
/*--- Included file: packet-pkixtsp-fn.c ---*/
-#line 1 "../../asn1/pkixtsp/packet-pkixtsp-fn.c"
+#line 1 "./asn1/pkixtsp/packet-pkixtsp-fn.c"
static const value_string pkixtsp_T_version_vals[] = {
{ 1, "v1" },
return offset;
}
+
+
+static int
+dissect_pkixtsp_SignatureTimeStampToken(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
+ offset = dissect_pkixtsp_TimeStampToken(implicit_tag, tvb, offset, actx, tree, hf_index);
+
+ return offset;
+}
+
/*--- PDUs ---*/
-static void dissect_TSTInfo_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
+static int dissect_TSTInfo_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
+ int offset = 0;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
- dissect_pkixtsp_TSTInfo(FALSE, tvb, 0, &asn1_ctx, tree, hf_pkixtsp_TSTInfo_PDU);
+ offset = dissect_pkixtsp_TSTInfo(FALSE, tvb, offset, &asn1_ctx, tree, hf_pkixtsp_TSTInfo_PDU);
+ return offset;
+}
+static int dissect_SignatureTimeStampToken_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
+ int offset = 0;
+ asn1_ctx_t asn1_ctx;
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
+ offset = dissect_pkixtsp_SignatureTimeStampToken(FALSE, tvb, offset, &asn1_ctx, tree, hf_pkixtsp_SignatureTimeStampToken_PDU);
+ return offset;
}
/*--- End of included file: packet-pkixtsp-fn.c ---*/
-#line 54 "../../asn1/pkixtsp/packet-pkixtsp-template.c"
+#line 40 "./asn1/pkixtsp/packet-pkixtsp-template.c"
static int
static hf_register_info hf[] = {
/*--- Included file: packet-pkixtsp-hfarr.c ---*/
-#line 1 "../../asn1/pkixtsp/packet-pkixtsp-hfarr.c"
+#line 1 "./asn1/pkixtsp/packet-pkixtsp-hfarr.c"
{ &hf_pkixtsp_TSTInfo_PDU,
- { "TSTInfo", "pkixtsp.TSTInfo",
+ { "TSTInfo", "pkixtsp.TSTInfo_element",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+ { &hf_pkixtsp_SignatureTimeStampToken_PDU,
+ { "SignatureTimeStampToken", "pkixtsp.SignatureTimeStampToken_element",
FT_NONE, BASE_NONE, NULL, 0,
NULL, HFILL }},
{ &hf_pkixtsp_version,
FT_INT32, BASE_DEC, VALS(pkixtsp_T_version_vals), 0,
NULL, HFILL }},
{ &hf_pkixtsp_messageImprint,
- { "messageImprint", "pkixtsp.messageImprint",
+ { "messageImprint", "pkixtsp.messageImprint_element",
FT_NONE, BASE_NONE, NULL, 0,
NULL, HFILL }},
{ &hf_pkixtsp_reqPolicy,
FT_UINT32, BASE_DEC, NULL, 0,
NULL, HFILL }},
{ &hf_pkixtsp_hashAlgorithm,
- { "hashAlgorithm", "pkixtsp.hashAlgorithm",
+ { "hashAlgorithm", "pkixtsp.hashAlgorithm_element",
FT_NONE, BASE_NONE, NULL, 0,
"AlgorithmIdentifier", HFILL }},
{ &hf_pkixtsp_hashedMessage,
FT_BYTES, BASE_NONE, NULL, 0,
"OCTET_STRING", HFILL }},
{ &hf_pkixtsp_status,
- { "status", "pkixtsp.status",
+ { "status", "pkixtsp.status_element",
FT_NONE, BASE_NONE, NULL, 0,
"PKIStatusInfo", HFILL }},
{ &hf_pkixtsp_timeStampToken,
- { "timeStampToken", "pkixtsp.timeStampToken",
+ { "timeStampToken", "pkixtsp.timeStampToken_element",
FT_NONE, BASE_NONE, NULL, 0,
NULL, HFILL }},
{ &hf_pkixtsp_pki_status,
FT_STRING, BASE_NONE, NULL, 0,
"GeneralizedTime", HFILL }},
{ &hf_pkixtsp_accuracy,
- { "accuracy", "pkixtsp.accuracy",
+ { "accuracy", "pkixtsp.accuracy_element",
FT_NONE, BASE_NONE, NULL, 0,
NULL, HFILL }},
{ &hf_pkixtsp_ordering,
NULL, HFILL }},
/*--- End of included file: packet-pkixtsp-hfarr.c ---*/
-#line 105 "../../asn1/pkixtsp/packet-pkixtsp-template.c"
+#line 91 "./asn1/pkixtsp/packet-pkixtsp-template.c"
};
/* List of subtrees */
&ett_pkixtsp,
/*--- Included file: packet-pkixtsp-ettarr.c ---*/
-#line 1 "../../asn1/pkixtsp/packet-pkixtsp-ettarr.c"
+#line 1 "./asn1/pkixtsp/packet-pkixtsp-ettarr.c"
&ett_pkixtsp_TimeStampReq,
&ett_pkixtsp_MessageImprint,
&ett_pkixtsp_TimeStampResp,
&ett_pkixtsp_Accuracy,
/*--- End of included file: packet-pkixtsp-ettarr.c ---*/
-#line 111 "../../asn1/pkixtsp/packet-pkixtsp-template.c"
+#line 97 "./asn1/pkixtsp/packet-pkixtsp-template.c"
};
/* Register protocol */
dissector_handle_t timestamp_reply_handle;
dissector_handle_t timestamp_query_handle;
- timestamp_reply_handle = new_create_dissector_handle(dissect_timestamp_reply, proto_pkixtsp);
+ timestamp_reply_handle = create_dissector_handle(dissect_timestamp_reply, proto_pkixtsp);
dissector_add_string("media_type", "application/timestamp-reply", timestamp_reply_handle);
- timestamp_query_handle = new_create_dissector_handle(dissect_timestamp_query, proto_pkixtsp);
+ timestamp_query_handle = create_dissector_handle(dissect_timestamp_query, proto_pkixtsp);
dissector_add_string("media_type", "application/timestamp-query", timestamp_query_handle);
/*--- Included file: packet-pkixtsp-dis-tab.c ---*/
-#line 1 "../../asn1/pkixtsp/packet-pkixtsp-dis-tab.c"
+#line 1 "./asn1/pkixtsp/packet-pkixtsp-dis-tab.c"
+ register_ber_oid_dissector("1.2.840.113549.1.9.16.2.14", dissect_SignatureTimeStampToken_PDU, proto_pkixtsp, "id-aa-timeStampToken");
register_ber_oid_dissector("1.2.840.113549.1.9.16.1.4", dissect_TSTInfo_PDU, proto_pkixtsp, "id-ct-TSTInfo");
/*--- End of included file: packet-pkixtsp-dis-tab.c ---*/
-#line 135 "../../asn1/pkixtsp/packet-pkixtsp-template.c"
+#line 121 "./asn1/pkixtsp/packet-pkixtsp-template.c"
}