diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2016-03-09 03:17:51 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2016-03-13 21:30:24 +0000 |
commit | 54a520d4a1151c68d0b4e5f09a8d82466fa499f3 (patch) | |
tree | 7aacae160382098ce651ac862a5dfd5de4beff94 /asn1/pkinit | |
parent | c1f3c935bdd33090c87f0d2f84842ce9729b747a (diff) |
Move /asn1 to /epan/dissectors
Change-Id: I1208fe3c2ba428995526f561e8f792b8d871e9a9
Reviewed-on: https://code.wireshark.org/review/14388
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'asn1/pkinit')
-rw-r--r-- | asn1/pkinit/CMakeLists.txt | 52 | ||||
-rw-r--r-- | asn1/pkinit/Makefile.am | 23 | ||||
-rw-r--r-- | asn1/pkinit/Makefile.common | 47 | ||||
-rw-r--r-- | asn1/pkinit/Makefile.nmake | 26 | ||||
-rw-r--r-- | asn1/pkinit/PKINIT.asn | 150 | ||||
-rw-r--r-- | asn1/pkinit/packet-pkinit-template.c | 120 | ||||
-rw-r--r-- | asn1/pkinit/packet-pkinit-template.h | 33 | ||||
-rw-r--r-- | asn1/pkinit/pkinit.cnf | 28 |
8 files changed, 0 insertions, 479 deletions
diff --git a/asn1/pkinit/CMakeLists.txt b/asn1/pkinit/CMakeLists.txt deleted file mode 100644 index 4b9e0657e2..0000000000 --- a/asn1/pkinit/CMakeLists.txt +++ /dev/null @@ -1,52 +0,0 @@ -# CMakeLists.txt -# -# 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. -# - -set( PROTOCOL_NAME pkinit ) - -set( PROTO_OPT ) - -set( EXT_ASN_FILE_LIST -) - -set( ASN_FILE_LIST - PKINIT.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 ) - -set( EXTRA_CNF - "${CMAKE_CURRENT_BINARY_DIR}/../cms/cms-exp.cnf" -) - -ASN2WRS() - diff --git a/asn1/pkinit/Makefile.am b/asn1/pkinit/Makefile.am deleted file mode 100644 index 72d28e600b..0000000000 --- a/asn1/pkinit/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -# 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. - - -include ../Makefile.preinc -include Makefile.common -include ../Makefile.inc - diff --git a/asn1/pkinit/Makefile.common b/asn1/pkinit/Makefile.common deleted file mode 100644 index aefd7def24..0000000000 --- a/asn1/pkinit/Makefile.common +++ /dev/null @@ -1,47 +0,0 @@ -# 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. - - -PROTOCOL_NAME=pkinit - -EXT_ASN_FILE_LIST = - -ASN_FILE_LIST = \ - PKINIT.asn - -# The packet-$(PROTOCOL_NAME)-template.h and $(PROTOCOL_NAME).asn -# files do not exist for all protocols: Please add/remove as required. -EXTRA_DIST = \ - $(EXTRA_DIST_COMMON) \ - $(ASN_FILE_LIST) \ - packet-$(PROTOCOL_NAME)-template.c \ - packet-$(PROTOCOL_NAME)-template.h \ - $(PROTOCOL_NAME).cnf - -SRC_FILES = \ - $(EXTRA_DIST) \ - $(EXT_ASN_FILE_LIST) - -A2W_FLAGS= -b - -EXTRA_CNF= \ - $(builddir)/../cms/cms-exp.cnf - -$(builddir)/../cms/cms-exp.cnf: - (cd $(builddir)/../cms && $(MAKE_CNF_EXPORT)) - diff --git a/asn1/pkinit/Makefile.nmake b/asn1/pkinit/Makefile.nmake deleted file mode 100644 index fc70f2382f..0000000000 --- a/asn1/pkinit/Makefile.nmake +++ /dev/null @@ -1,26 +0,0 @@ -## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake -# -# 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. - - -include ../../config.nmake -include ../Makefile.preinc.nmake -include Makefile.common -include ../Makefile.inc.nmake - diff --git a/asn1/pkinit/PKINIT.asn b/asn1/pkinit/PKINIT.asn deleted file mode 100644 index 2af0321a84..0000000000 --- a/asn1/pkinit/PKINIT.asn +++ /dev/null @@ -1,150 +0,0 @@ ---NOTE: we have to accomodate BOTH existing users of early drafts, such as ---packetcable as well as new users once the protocol is standardized. --- ---This asn1 file is based on draft-ietf-cat-kerberos-pk-init-20.txt ---but has been modified to acocmodate the Wireshark asn2wrs compiler ---and our environment --- ---new structures are uncommented and added on demand as they are required --- ---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. --- - -KerberosV5-PK-INIT-SPEC { - iso(1) identified-organization(3) dod(6) internet(1) - security(5) kerberosV5(2) modules(4) pkinit(5) } -DEFINITIONS EXPLICIT TAGS ::= -BEGIN - - - IMPORTS - SubjectPublicKeyInfo, AlgorithmIdentifier, Name - FROM PKIX1Explicit88 { iso (1) identified-organization (3) - dod (6) internet (1) security (5) mechanisms (5) - pkix (7) id-mod (0) id-pkix1-explicit (18) } - - - ContentInfo, IssuerAndSerialNumber - FROM CryptographicMessageSyntax { iso(1) member-body(2) - us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) - modules(0) cms(1) } - - - KerberosTime, Checksum, TYPED-DATA, PrincipalName, Realm, EncryptionKey - FROM KerberosV5Spec2 { iso(1) identified-organization(3) - dod(6) internet(1) security(5) kerberosV5(2) modules(4) - krb5spec2(2) } ; - - --- id-pkinit OBJECT IDENTIFIER ::= --- { iso (1) org (3) dod (6) internet (1) security (5) --- kerberosv5 (2) pkinit (3) } --- --- --- id-pkauthdata OBJECT IDENTIFIER ::= { id-pkinit 1 } --- id-pkdhkeydata OBJECT IDENTIFIER ::= { id-pkinit 2 } --- id-pkrkeydata OBJECT IDENTIFIER ::= { id-pkinit 3 } --- id-pkekuoid OBJECT IDENTIFIER ::= { id-pkinit 4 } --- id-pkkdcekuoid OBJECT IDENTIFIER ::= { id-pkinit 5 } --- --- --- pa-pk-as-req INTEGER ::= TBD --- pa-pk-as-rep INTEGER ::= TBD --- pa-pk-ocsp-req INTEGER ::= TBD --- pa-pk-ocsp-rep INTEGER ::= TBD --- --- --- ad-initial-verified-cas INTEGER ::= TBD --- --- --- td-dh-parameters INTEGER ::= TBD --- td-trusted-certifiers INTEGER ::= 104 --- td-certificate-index INTEGER ::= 105 - - -PaPkAsReq ::= SEQUENCE { - signedAuthPack [0] ContentInfo, - trustedCertifiers [1] SEQUENCE OF TrustedCA OPTIONAL, - kdcCert [2] IssuerAndSerialNumber OPTIONAL, - ... -} - - -TrustedCA ::= CHOICE { - caName [0] Name, - issuerAndSerial [2] IssuerAndSerialNumber, - ... -} - - -AuthPack ::= SEQUENCE { - pkAuthenticator [0] PKAuthenticator, - clientPublicValue [1] SubjectPublicKeyInfo OPTIONAL, - supportedCMSTypes [2] SEQUENCE OF AlgorithmIdentifier - OPTIONAL, - ... -} - - -PKAuthenticator ::= SEQUENCE { - cusec [0] INTEGER, - ctime [1] KerberosTime, - nonce [2] INTEGER (0..4294967295), - paChecksum [3] Checksum, - ... -} - --- --- TrustedCertifiers ::= SEQUENCE OF Name --- --- --- CertificateIndex ::= IssuerAndSerialNumber --- --- -KRB5PrincipalName ::= SEQUENCE { - realm [0] Realm, - principalName [1] PrincipalName -} --- --- --- InitialVerifiedCAs ::= SEQUENCE OF SEQUENCE { --- ca [0] Name, --- validated [1] BOOLEAN, --- ... --- } --- - -PaPkAsRep ::= CHOICE { - dhSignedData [0] ContentInfo, - encKeyPack [1] ContentInfo, - ... -} - - -KDCDHKeyInfo ::= SEQUENCE { - subjectPublicKey [0] BIT STRING, - nonce [1] INTEGER, - dhKeyExpiration [2] KerberosTime OPTIONAL, - ... -} - --- --- ReplyKeyPack ::= SEQUENCE { --- replyKey [0] EncryptionKey, --- nonce [1] INTEGER (0..4294967295), --- ... --- } - -END - diff --git a/asn1/pkinit/packet-pkinit-template.c b/asn1/pkinit/packet-pkinit-template.c deleted file mode 100644 index 42b4d95f46..0000000000 --- a/asn1/pkinit/packet-pkinit-template.c +++ /dev/null @@ -1,120 +0,0 @@ -/* packet-pkinit.c - * Routines for PKINIT packet dissection - * Ronnie Sahlberg 2004 - * - * 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. - */ - -#include "config.h" - -#include <epan/packet.h> -#include <epan/asn1.h> - -#include "packet-ber.h" -#include "packet-pkinit.h" -#include "packet-cms.h" -#include "packet-pkix1explicit.h" -#include "packet-kerberos.h" - -#define PNAME "PKINIT" -#define PSNAME "PKInit" -#define PFNAME "pkinit" - -void proto_register_pkinit(void); -void proto_reg_handoff_pkinit(void); - -/* Initialize the protocol and registered fields */ -static int proto_pkinit = -1; -#include "packet-pkinit-hf.c" - -/* Initialize the subtree pointers */ -#include "packet-pkinit-ett.c" - -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_); -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_); -static int dissect_KerberosV5Spec2_Realm(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_); -static int dissect_KerberosV5Spec2_PrincipalName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_); - -#include "packet-pkinit-fn.c" - -int -dissect_pkinit_PA_PK_AS_REQ(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) { - offset = dissect_pkinit_PaPkAsReq(FALSE, tvb, offset, actx, tree, -1); - return offset; -} - -int -dissect_pkinit_PA_PK_AS_REP(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) { - offset = dissect_pkinit_PaPkAsRep(FALSE, tvb, offset, actx, tree, -1); - return offset; -} - -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_) { - offset = dissect_krb5_ctime(tree, tvb, offset, actx); - return offset; -} - -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_) { - offset = dissect_krb5_Checksum(tree, tvb, offset, actx); - return offset; -} - -static int -dissect_KerberosV5Spec2_Realm(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) { - offset = dissect_krb5_realm(tree, tvb, offset, actx); - return offset; -} - -static int -dissect_KerberosV5Spec2_PrincipalName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) { - offset = dissect_krb5_cname(tree, tvb, offset, actx); - return offset; -} - - -/*--- proto_register_pkinit ----------------------------------------------*/ -void proto_register_pkinit(void) { - - /* List of fields */ - static hf_register_info hf[] = { -#include "packet-pkinit-hfarr.c" - }; - - /* List of subtrees */ - static gint *ett[] = { -#include "packet-pkinit-ettarr.c" - }; - - /* Register protocol */ - proto_pkinit = proto_register_protocol(PNAME, PSNAME, PFNAME); - - /* Register fields and subtrees */ - proto_register_field_array(proto_pkinit, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); - -} - - -/*--- proto_reg_handoff_pkinit -------------------------------------------*/ -void proto_reg_handoff_pkinit(void) { -#include "packet-pkinit-dis-tab.c" -} - diff --git a/asn1/pkinit/packet-pkinit-template.h b/asn1/pkinit/packet-pkinit-template.h deleted file mode 100644 index 023a57fce7..0000000000 --- a/asn1/pkinit/packet-pkinit-template.h +++ /dev/null @@ -1,33 +0,0 @@ -/* packet-pkinit.h - * Routines for PKINIT packet dissection - * Ronnie Sahlberg 2004 - * - * 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. - */ - -#ifndef PACKET_PKINIT_H -#define PACKET_PKINIT_H - -int dissect_pkinit_PA_PK_AS_REQ(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_); -int dissect_pkinit_PA_PK_AS_REP(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_); - -#include "packet-pkinit-exp.h" - -#endif /* PACKET_PKINIT_H */ - diff --git a/asn1/pkinit/pkinit.cnf b/asn1/pkinit/pkinit.cnf deleted file mode 100644 index a62ff8412f..0000000000 --- a/asn1/pkinit/pkinit.cnf +++ /dev/null @@ -1,28 +0,0 @@ -# pkinit.cnf -# pkinit conformation file - -#.MODULE_IMPORT -PKIX1Explicit88 pkix1explicit - -#.INCLUDE ../pkix1explicit/pkix1explicit_exp.cnf -#.IMPORT ../cms/cms-exp.cnf - -#.EXPORTS -PaPkAsReq -PaPkAsRep - -#.REGISTER -AuthPack B "1.3.6.1.5.2.3.1" "id-pkauthdata" -KDCDHKeyInfo B "1.3.6.1.5.2.3.2" "id-pkdhkeydata" -KRB5PrincipalName B "1.3.6.1.5.2.2" "id-pkinit-san" - -#.NO_EMIT - -#.TYPE_RENAME - -#.FIELD_RENAME -KDCDHKeyInfo/nonce dhNonce -PKAuthenticator/nonce paNonce - -#.END - |