aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pkcs12.c
diff options
context:
space:
mode:
authorРоман Донченко <dpb@corrigendum.ru>2016-12-18 00:55:14 +0300
committerAnders Broman <a.broman58@gmail.com>2016-12-27 12:59:57 +0000
commite5a39920f9883133945b088c85c8fbf4737a6ecd (patch)
treec3fd643c22ac2df9ac8d8615ae4ce9320ec1c4f4 /epan/dissectors/packet-pkcs12.c
parent9d47bf993932c064c60ea79592a06f0ffd383fd6 (diff)
Move DigestInfo from pkcs12 to cms
This type is originally from PKCS #7, the predecessor of CMS, so it makes more sense for it to be there. Change-Id: I3a146f1d000a3bcbcd0d8f1cfe2fc27ed80cc69d Reviewed-on: https://code.wireshark.org/review/19335 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-pkcs12.c')
-rw-r--r--epan/dissectors/packet-pkcs12.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/epan/dissectors/packet-pkcs12.c b/epan/dissectors/packet-pkcs12.c
index bffb21799d..ea21bf5861 100644
--- a/epan/dissectors/packet-pkcs12.c
+++ b/epan/dissectors/packet-pkcs12.c
@@ -102,8 +102,6 @@ static int hf_pkcs12_macData = -1; /* MacData */
static int hf_pkcs12_mac = -1; /* DigestInfo */
static int hf_pkcs12_macSalt = -1; /* OCTET_STRING */
static int hf_pkcs12_iterations = -1; /* INTEGER */
-static int hf_pkcs12_digestAlgorithm = -1; /* DigestAlgorithmIdentifier */
-static int hf_pkcs12_digest = -1; /* Digest */
static int hf_pkcs12_AuthenticatedSafe_item = -1; /* ContentInfo */
static int hf_pkcs12_SafeContents_item = -1; /* SafeBag */
static int hf_pkcs12_bagId = -1; /* T_bagId */
@@ -146,7 +144,6 @@ static int hf_pkcs12_messageAuthScheme = -1; /* AlgorithmIdentifier */
#line 1 "./asn1/pkcs12/packet-pkcs12-ett.c"
static gint ett_pkcs12_PFX = -1;
static gint ett_pkcs12_MacData = -1;
-static gint ett_pkcs12_DigestInfo = -1;
static gint ett_pkcs12_AuthenticatedSafe = -1;
static gint ett_pkcs12_SafeContents = -1;
static gint ett_pkcs12_SafeBag = -1;
@@ -490,21 +487,6 @@ dissect_pkcs12_T_version(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse
}
-static const ber_sequence_t DigestInfo_sequence[] = {
- { &hf_pkcs12_digestAlgorithm, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cms_DigestAlgorithmIdentifier },
- { &hf_pkcs12_digest , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_cms_Digest },
- { NULL, 0, 0, 0, NULL }
-};
-
-static int
-dissect_pkcs12_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_) {
- offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
- DigestInfo_sequence, hf_index, ett_pkcs12_DigestInfo);
-
- return offset;
-}
-
-
static int
dissect_pkcs12_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
@@ -526,7 +508,7 @@ dissect_pkcs12_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
static const ber_sequence_t MacData_sequence[] = {
- { &hf_pkcs12_mac , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkcs12_DigestInfo },
+ { &hf_pkcs12_mac , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cms_DigestInfo },
{ &hf_pkcs12_macSalt , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_pkcs12_OCTET_STRING },
{ &hf_pkcs12_iterations , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkcs12_INTEGER },
{ NULL, 0, 0, 0, NULL }
@@ -1302,14 +1284,6 @@ void proto_register_pkcs12(void) {
{ "iterations", "pkcs12.iterations",
FT_INT32, BASE_DEC, NULL, 0,
"INTEGER", HFILL }},
- { &hf_pkcs12_digestAlgorithm,
- { "digestAlgorithm", "pkcs12.digestAlgorithm_element",
- FT_NONE, BASE_NONE, NULL, 0,
- "DigestAlgorithmIdentifier", HFILL }},
- { &hf_pkcs12_digest,
- { "digest", "pkcs12.digest",
- FT_BYTES, BASE_NONE, NULL, 0,
- NULL, HFILL }},
{ &hf_pkcs12_AuthenticatedSafe_item,
{ "ContentInfo", "pkcs12.ContentInfo_element",
FT_NONE, BASE_NONE, NULL, 0,
@@ -1451,7 +1425,6 @@ void proto_register_pkcs12(void) {
#line 1 "./asn1/pkcs12/packet-pkcs12-ettarr.c"
&ett_pkcs12_PFX,
&ett_pkcs12_MacData,
- &ett_pkcs12_DigestInfo,
&ett_pkcs12_AuthenticatedSafe,
&ett_pkcs12_SafeContents,
&ett_pkcs12_SafeBag,