From: Dr. Stephen Henson Date: Fri, 10 Oct 2003 23:31:53 +0000 (+0000) Subject: Initialize digested data type in PKCS7_set_type(). X-Git-Tag: BEN_FIPS_TEST_4^2~11^2~75 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0602abf5bda0d78b01f5987bbe068af515a93bef;p=openssl Initialize digested data type in PKCS7_set_type(). --- diff --git a/crypto/pkcs7/pk7_lib.c b/crypto/pkcs7/pk7_lib.c index 9b647b2121..3812710618 100644 --- a/crypto/pkcs7/pk7_lib.c +++ b/crypto/pkcs7/pk7_lib.c @@ -197,6 +197,11 @@ int PKCS7_set_type(PKCS7 *p7, int type) break; case NID_pkcs7_digest: + p7->type=obj; + if ((p7->d.digest=PKCS7_DIGEST_new()) + == NULL) goto err; + ASN1_INTEGER_set(p7->d.digest->version,0); + break; default: PKCS7err(PKCS7_F_PKCS7_SET_TYPE,PKCS7_R_UNSUPPORTED_CONTENT_TYPE); goto err;