pkcs1: remove unused RSAPrivateKey definition

RSA private keys are typically not found in network captures, so let's
just remove it. This removal avoids overloading the pkcs1.modulus
field with the same meaning from two different contexts (RSAPrivateKey
and RSAPublicKey).

Change-Id: I65239718e6fc801fc53fa46c467dc86620aa3b29
Reviewed-on: https://code.wireshark.org/review/10546
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: ronnie sahlberg <ronniesahlberg@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Peter Wu 2015-09-16 12:34:46 +02:00 committed by Anders Broman
parent 7e17b58d46
commit 69d2d585aa
4 changed files with 0 additions and 85 deletions

View File

@ -111,20 +111,6 @@ PKIXAlgs-2009 { iso(1) identified-organization(3) dod(6)
-- Wireshark additions to ensure compatibility with the original PKCS1.asn
RSAPrivateKey ::= SEQUENCE {
version Version,
modulus INTEGER, -- n
publicExponent INTEGER, -- e
privateExponent INTEGER, -- d
prime1 INTEGER, -- p
prime2 INTEGER, -- q
exponent1 INTEGER, -- d mod (p-1)
exponent2 INTEGER, -- d mod (q-1)
coefficient INTEGER -- (inverse of q) mod p
}
Version ::= INTEGER
DigestInfo ::= SEQUENCE {
digestAlgorithm DigestAlgorithmIdentifier,
digest Digest

View File

@ -5,7 +5,6 @@
#.EXPORTS
RSAPrivateKey
RSAPublicKey
DigestInfo

View File

@ -59,13 +59,6 @@ static int hf_pkcs1_RSASSA_PSS_params_PDU = -1; /* RSASSA_PSS_params */
static int hf_pkcs1_ECParameters_PDU = -1; /* ECParameters */
static int hf_pkcs1_modulus = -1; /* INTEGER */
static int hf_pkcs1_publicExponent = -1; /* INTEGER */
static int hf_pkcs1_version = -1; /* Version */
static int hf_pkcs1_privateExponent = -1; /* INTEGER */
static int hf_pkcs1_prime1 = -1; /* INTEGER */
static int hf_pkcs1_prime2 = -1; /* INTEGER */
static int hf_pkcs1_exponent1 = -1; /* INTEGER */
static int hf_pkcs1_exponent2 = -1; /* INTEGER */
static int hf_pkcs1_coefficient = -1; /* INTEGER */
static int hf_pkcs1_digestAlgorithm = -1; /* DigestAlgorithmIdentifier */
static int hf_pkcs1_digest = -1; /* Digest */
static int hf_pkcs1_p = -1; /* INTEGER */
@ -91,7 +84,6 @@ static int hf_pkcs1_s = -1; /* INTEGER */
/*--- Included file: packet-pkcs1-ett.c ---*/
#line 1 "../../asn1/pkcs1/packet-pkcs1-ett.c"
static gint ett_pkcs1_RSAPublicKey = -1;
static gint ett_pkcs1_RSAPrivateKey = -1;
static gint ett_pkcs1_DigestInfo = -1;
static gint ett_pkcs1_DSA_Params = -1;
static gint ett_pkcs1_DomainParameters = -1;
@ -134,38 +126,6 @@ dissect_pkcs1_RSAPublicKey(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off
static int
dissect_pkcs1_Version(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_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
NULL);
return offset;
}
static const ber_sequence_t RSAPrivateKey_sequence[] = {
{ &hf_pkcs1_version , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkcs1_Version },
{ &hf_pkcs1_modulus , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkcs1_INTEGER },
{ &hf_pkcs1_publicExponent, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkcs1_INTEGER },
{ &hf_pkcs1_privateExponent, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkcs1_INTEGER },
{ &hf_pkcs1_prime1 , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkcs1_INTEGER },
{ &hf_pkcs1_prime2 , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkcs1_INTEGER },
{ &hf_pkcs1_exponent1 , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkcs1_INTEGER },
{ &hf_pkcs1_exponent2 , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkcs1_INTEGER },
{ &hf_pkcs1_coefficient , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkcs1_INTEGER },
{ NULL, 0, 0, 0, NULL }
};
int
dissect_pkcs1_RSAPrivateKey(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_ber_sequence(implicit_tag, actx, tree, tvb, offset,
RSAPrivateKey_sequence, hf_index, ett_pkcs1_RSAPrivateKey);
return offset;
}
static int
dissect_pkcs1_DigestAlgorithmIdentifier(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_x509af_AlgorithmIdentifier(implicit_tag, tvb, offset, actx, tree, hf_index);
@ -426,34 +386,6 @@ void proto_register_pkcs1(void) {
{ "publicExponent", "pkcs1.publicExponent",
FT_INT32, BASE_DEC, NULL, 0,
"INTEGER", HFILL }},
{ &hf_pkcs1_version,
{ "version", "pkcs1.version",
FT_INT32, BASE_DEC, NULL, 0,
NULL, HFILL }},
{ &hf_pkcs1_privateExponent,
{ "privateExponent", "pkcs1.privateExponent",
FT_INT32, BASE_DEC, NULL, 0,
"INTEGER", HFILL }},
{ &hf_pkcs1_prime1,
{ "prime1", "pkcs1.prime1",
FT_INT32, BASE_DEC, NULL, 0,
"INTEGER", HFILL }},
{ &hf_pkcs1_prime2,
{ "prime2", "pkcs1.prime2",
FT_INT32, BASE_DEC, NULL, 0,
"INTEGER", HFILL }},
{ &hf_pkcs1_exponent1,
{ "exponent1", "pkcs1.exponent1",
FT_INT32, BASE_DEC, NULL, 0,
"INTEGER", HFILL }},
{ &hf_pkcs1_exponent2,
{ "exponent2", "pkcs1.exponent2",
FT_INT32, BASE_DEC, NULL, 0,
"INTEGER", HFILL }},
{ &hf_pkcs1_coefficient,
{ "coefficient", "pkcs1.coefficient",
FT_INT32, BASE_DEC, NULL, 0,
"INTEGER", HFILL }},
{ &hf_pkcs1_digestAlgorithm,
{ "digestAlgorithm", "pkcs1.digestAlgorithm_element",
FT_NONE, BASE_NONE, NULL, 0,
@ -529,7 +461,6 @@ void proto_register_pkcs1(void) {
/*--- Included file: packet-pkcs1-ettarr.c ---*/
#line 1 "../../asn1/pkcs1/packet-pkcs1-ettarr.c"
&ett_pkcs1_RSAPublicKey,
&ett_pkcs1_RSAPrivateKey,
&ett_pkcs1_DigestInfo,
&ett_pkcs1_DSA_Params,
&ett_pkcs1_DomainParameters,

View File

@ -36,7 +36,6 @@
/*--- Included file: packet-pkcs1-exp.h ---*/
#line 1 "../../asn1/pkcs1/packet-pkcs1-exp.h"
int dissect_pkcs1_RSAPublicKey(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
int dissect_pkcs1_RSAPrivateKey(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
int dissect_pkcs1_DigestInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
/*--- End of included file: packet-pkcs1-exp.h ---*/