diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:34:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:34:10 +0000 |
commit | e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc (patch) | |
tree | 68cb5ef9081156392f1dd62a00c6ccc1451b93df /epan/dissectors/asn1/pkixproxy | |
parent | Initial commit. (diff) | |
download | wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.tar.xz wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.zip |
Adding upstream version 4.2.2.upstream/4.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/asn1/pkixproxy')
-rw-r--r-- | epan/dissectors/asn1/pkixproxy/CMakeLists.txt | 35 | ||||
-rw-r--r-- | epan/dissectors/asn1/pkixproxy/PKIXProxy.asn | 69 | ||||
-rw-r--r-- | epan/dissectors/asn1/pkixproxy/packet-pkixproxy-template.c | 68 | ||||
-rw-r--r-- | epan/dissectors/asn1/pkixproxy/packet-pkixproxy-template.h | 18 | ||||
-rw-r--r-- | epan/dissectors/asn1/pkixproxy/pkixproxy.cnf | 19 |
5 files changed, 209 insertions, 0 deletions
diff --git a/epan/dissectors/asn1/pkixproxy/CMakeLists.txt b/epan/dissectors/asn1/pkixproxy/CMakeLists.txt new file mode 100644 index 00000000..b5eb7c9f --- /dev/null +++ b/epan/dissectors/asn1/pkixproxy/CMakeLists.txt @@ -0,0 +1,35 @@ +# CMakeLists.txt +# +# Wireshark - Network traffic analyzer +# By Gerald Combs <gerald@wireshark.org> +# Copyright 1998 Gerald Combs +# +# SPDX-License-Identifier: GPL-2.0-or-later +# + +set( PROTOCOL_NAME pkixproxy ) + +set( PROTO_OPT ) + +set( EXT_ASN_FILE_LIST +) + +set( ASN_FILE_LIST + PKIXProxy.asn +) + +set( EXTRA_DIST + ${ASN_FILE_LIST} + packet-${PROTOCOL_NAME}-template.c + packet-${PROTOCOL_NAME}-template.h + ${PROTOCOL_NAME}.cnf +) + +set( SRC_FILES + ${EXTRA_DIST} + ${EXT_ASN_FILE_LIST} +) + +set( A2W_FLAGS -b ) + +ASN2WRS() diff --git a/epan/dissectors/asn1/pkixproxy/PKIXProxy.asn b/epan/dissectors/asn1/pkixproxy/PKIXProxy.asn new file mode 100644 index 00000000..c4f2956a --- /dev/null +++ b/epan/dissectors/asn1/pkixproxy/PKIXProxy.asn @@ -0,0 +1,69 @@ +-- PKIXProxy +-- This ASN.1 definition is taken from RFC3820 and modified to pass +-- through the asn2wrs compiler. +-- +-- The original copyright of the ASN.1 module follows below: +-- +-- Full Copyright Statement +-- +-- Copyright (C) The Internet Society (2004). This document is subject +-- to the rights, licenses and restrictions contained in BCP 78, and +-- except as set forth therein, the authors retain all their rights. +-- +-- This document and the information contained herein are provided on an +-- "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS +-- OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET +-- ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE +-- INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED +-- WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + + +PKIXproxy88 { iso(1) identified-organization(3) dod(6) + internet(1) security(5) mechanisms(5) pkix(7) id-mod(0) + proxy-cert-extns(25) } + +DEFINITIONS EXPLICIT TAGS ::= + +BEGIN + +-- EXPORTS ALL -- + +-- IMPORTS NONE -- + +-- PKIX specific OIDs + +--id-pkix OBJECT IDENTIFIER ::= +-- { iso(1) identified-organization(3) +-- dod(6) internet(1) security(5) mechanisms(5) pkix(7) } + +-- private certificate extensions +--id-pe OBJECT IDENTIFIER ::= { id-pkix 1 } + +-- Locally defined OIDs + +-- The proxy certificate extension +--id-pe-proxyCertInfo OBJECT IDENTIFIER ::= { id-pe 14 } + +-- Proxy certificate policy languages +--id-ppl OBJECT IDENTIFIER ::= { id-pkix 21 } + +-- Proxy certificate policies languages defined in +--id-ppl-anyLanguage OBJECT IDENTIFIER ::= { id-ppl 0 } +--id-ppl-inheritAll OBJECT IDENTIFIER ::= { id-ppl 1 } +--id-ppl-independent OBJECT IDENTIFIER ::= { id-ppl 2 } + +-- The ProxyCertInfo Extension +ProxyCertInfoExtension ::= SEQUENCE { + pCPathLenConstraint ProxyCertPathLengthConstraint + OPTIONAL, + proxyPolicy ProxyPolicy } + +ProxyCertPathLengthConstraint ::= INTEGER + +ProxyPolicy ::= SEQUENCE { + policyLanguage OBJECT IDENTIFIER, + policy OCTET STRING OPTIONAL } + +END + diff --git a/epan/dissectors/asn1/pkixproxy/packet-pkixproxy-template.c b/epan/dissectors/asn1/pkixproxy/packet-pkixproxy-template.c new file mode 100644 index 00000000..99fb419b --- /dev/null +++ b/epan/dissectors/asn1/pkixproxy/packet-pkixproxy-template.c @@ -0,0 +1,68 @@ +/* packet-pkixproxy.c + * Routines for RFC3820 PKIXProxy packet dissection + * Ronnie Sahlberg 2004 + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "config.h" + +#include <epan/packet.h> +#include <epan/oids.h> +#include <epan/asn1.h> + +#include "packet-ber.h" +#include "packet-pkixproxy.h" + +#define PNAME "PKIXProxy (RFC3820)" +#define PSNAME "PKIXPROXY" +#define PFNAME "pkixproxy" + +void proto_register_pkixproxy(void); +void proto_reg_handoff_pkixproxy(void); + +/* Initialize the protocol and registered fields */ +static int proto_pkixproxy = -1; +#include "packet-pkixproxy-hf.c" + +/* Initialize the subtree pointers */ +#include "packet-pkixproxy-ett.c" + +#include "packet-pkixproxy-fn.c" + + +/*--- proto_register_pkixproxy ----------------------------------------------*/ +void proto_register_pkixproxy(void) { + + /* List of fields */ + static hf_register_info hf[] = { +#include "packet-pkixproxy-hfarr.c" + }; + + /* List of subtrees */ + static gint *ett[] = { +#include "packet-pkixproxy-ettarr.c" + }; + + /* Register protocol */ + proto_pkixproxy = proto_register_protocol(PNAME, PSNAME, PFNAME); + + /* Register fields and subtrees */ + proto_register_field_array(proto_pkixproxy, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); + +} + + +/*--- proto_reg_handoff_pkixproxy -------------------------------------------*/ +void proto_reg_handoff_pkixproxy(void) { +#include "packet-pkixproxy-dis-tab.c" + oid_add_from_string("id-ppl-anyLanguage","1.3.6.1.5.5.7.21.0"); + oid_add_from_string("id-ppl-inheritAll","1.3.6.1.5.5.7.21.1"); + oid_add_from_string("id-ppl-independent","1.3.6.1.5.5.7.21.2"); +} + diff --git a/epan/dissectors/asn1/pkixproxy/packet-pkixproxy-template.h b/epan/dissectors/asn1/pkixproxy/packet-pkixproxy-template.h new file mode 100644 index 00000000..74e08ed7 --- /dev/null +++ b/epan/dissectors/asn1/pkixproxy/packet-pkixproxy-template.h @@ -0,0 +1,18 @@ +/* packet-pkixproxy.h + * Routines for RFC3820 PKIXProxy packet dissection + * Ronnie Sahlberg 2004 + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef PACKET_PKIXPROXY_H +#define PACKET_PKIXPROXY_H + +/*#include "packet-pkixproxy-exp.h"*/ + +#endif /* PACKET_PKIXPROXY_H */ + diff --git a/epan/dissectors/asn1/pkixproxy/pkixproxy.cnf b/epan/dissectors/asn1/pkixproxy/pkixproxy.cnf new file mode 100644 index 00000000..a80fbce5 --- /dev/null +++ b/epan/dissectors/asn1/pkixproxy/pkixproxy.cnf @@ -0,0 +1,19 @@ +# pkixproxy.cnf +# PKIXProxy conformation file + +#.MODULE_IMPORT + +#.EXPORTS + +#.PDU + +#.REGISTER +ProxyCertInfoExtension B "1.3.6.1.5.5.7.1.14" "id-pe-proxyCertInfo" + +#.NO_EMIT + +#.TYPE_RENAME + +#.FIELD_RENAME + +#.END |