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/ns_cert_exts | |
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/ns_cert_exts')
4 files changed, 155 insertions, 0 deletions
diff --git a/epan/dissectors/asn1/ns_cert_exts/CMakeLists.txt b/epan/dissectors/asn1/ns_cert_exts/CMakeLists.txt new file mode 100644 index 00000000..3bd34112 --- /dev/null +++ b/epan/dissectors/asn1/ns_cert_exts/CMakeLists.txt @@ -0,0 +1,34 @@ +# 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 ns_cert_exts ) + +set( PROTO_OPT ) + +set( EXT_ASN_FILE_LIST +) + +set( ASN_FILE_LIST + NETSCAPE-CERT-EXTS.asn +) + +set( EXTRA_DIST + ${ASN_FILE_LIST} + packet-${PROTOCOL_NAME}-template.c + ${PROTOCOL_NAME}.cnf +) + +set( SRC_FILES + ${EXTRA_DIST} + ${EXT_ASN_FILE_LIST} +) + +set( A2W_FLAGS -b ) + +ASN2WRS() diff --git a/epan/dissectors/asn1/ns_cert_exts/NETSCAPE-CERT-EXTS.asn b/epan/dissectors/asn1/ns_cert_exts/NETSCAPE-CERT-EXTS.asn new file mode 100644 index 00000000..e3d10ede --- /dev/null +++ b/epan/dissectors/asn1/ns_cert_exts/NETSCAPE-CERT-EXTS.asn @@ -0,0 +1,33 @@ +-- NetScape Certificate Extensions +-- based on information from http://wp.netscape.com/eng/security/cert-exts.html + +NS-CERT-EXTS { 2 16 840 1 113730 1 } DEFINITIONS EXPLICIT TAGS ::= +BEGIN + +BaseUrl ::= IA5String + +RevocationUrl ::= IA5String + +CaRevocationUrl ::= IA5String + +CaPolicyUrl ::= IA5String + +Comment ::= IA5String + +SslServerName ::= IA5String + +CertRenewalUrl ::= IA5String + +CertType ::= BIT STRING { + ssl-client(0), + ssl-server(1), + smime(2), + object-signing(3), + reserved-for-future-use(4), + ssl-ca(5), + smime-ca(6), + object-signing-ca(7) +} + +END -- of NS-CERT-EXTS + diff --git a/epan/dissectors/asn1/ns_cert_exts/ns_cert_exts.cnf b/epan/dissectors/asn1/ns_cert_exts/ns_cert_exts.cnf new file mode 100644 index 00000000..c8d8998b --- /dev/null +++ b/epan/dissectors/asn1/ns_cert_exts/ns_cert_exts.cnf @@ -0,0 +1,26 @@ +# NS-CERT-EXT.cnf +# NetScape Certificate Extensions conformation file + +#.MODULE_IMPORT + +#.EXPORTS + +#.REGISTER +CertType B "2.16.840.1.113730.1.1" "ns_cert_exts.cert_type" +BaseUrl B "2.16.840.1.113730.1.2" "ns_cert_exts.base_url" +RevocationUrl B "2.16.840.1.113730.1.3" "ns_cert_exts.revocation-url" +CaRevocationUrl B "2.16.840.1.113730.1.4" "ns_cert_exts.ca-revocation-url" +CertRenewalUrl B "2.16.840.1.113730.1.7" "ns_cert_exts.cert-renewal-url" +CaPolicyUrl B "2.16.840.1.113730.1.8" "ns_cert_exts.ca-policy-url" +SslServerName B "2.16.840.1.113730.1.12" "ns_cert_exts.ssl-server-name" +Comment B "2.16.840.1.113730.1.13" "ns_cert_exts.comment" + +#.NO_EMIT + +#.TYPE_RENAME + +#.FIELD_RENAME + +#.END + + diff --git a/epan/dissectors/asn1/ns_cert_exts/packet-ns_cert_exts-template.c b/epan/dissectors/asn1/ns_cert_exts/packet-ns_cert_exts-template.c new file mode 100644 index 00000000..14013c83 --- /dev/null +++ b/epan/dissectors/asn1/ns_cert_exts/packet-ns_cert_exts-template.c @@ -0,0 +1,62 @@ +/* packet-ns_cert_exts.c + * Routines for NetScape Certificate Extensions 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 "packet-ber.h" + +#define PNAME "NetScape Certificate Extensions" +#define PSNAME "NS_CERT_EXTS" +#define PFNAME "ns_cert_exts" + +void proto_register_ns_cert_exts(void); +void proto_reg_handoff_ns_cert_exts(void); + +/* Initialize the protocol and registered fields */ +static int proto_ns_cert_exts = -1; +#include "packet-ns_cert_exts-hf.c" + +/* Initialize the subtree pointers */ +#include "packet-ns_cert_exts-ett.c" + +#include "packet-ns_cert_exts-fn.c" + + +/*--- proto_register_ns_cert_exts -------------------------------------------*/ +void proto_register_ns_cert_exts(void) { + + /* List of fields */ + static hf_register_info hf[] = { +#include "packet-ns_cert_exts-hfarr.c" + }; + + /* List of subtrees */ + static gint *ett[] = { +#include "packet-ns_cert_exts-ettarr.c" + }; + + /* Register protocol */ + proto_ns_cert_exts = proto_register_protocol(PNAME, PSNAME, PFNAME); + + /* Register fields and subtrees */ + proto_register_field_array(proto_ns_cert_exts, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); + +} + + +/*--- proto_reg_handoff_ns_cert_exts ---------------------------------------*/ +void proto_reg_handoff_ns_cert_exts(void) { +#include "packet-ns_cert_exts-dis-tab.c" +} + |