summaryrefslogtreecommitdiffstats
path: root/crypto/pkcs7
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2003-10-10 23:31:53 +0000
committerDr. Stephen Henson <steve@openssl.org>2003-10-10 23:31:53 +0000
commit0602abf5bda0d78b01f5987bbe068af515a93bef (patch)
treef44460165c019c71b6dd1f7ad28915f5eea72e91 /crypto/pkcs7
parentcaf044cb3e42ed44703e3394509deb1fa988c303 (diff)
Initialize digested data type in PKCS7_set_type().
Diffstat (limited to 'crypto/pkcs7')
-rw-r--r--crypto/pkcs7/pk7_lib.c5
1 files changed, 5 insertions, 0 deletions
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;