diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2003-10-10 23:31:53 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2003-10-10 23:31:53 +0000 |
commit | 0602abf5bda0d78b01f5987bbe068af515a93bef (patch) | |
tree | f44460165c019c71b6dd1f7ad28915f5eea72e91 /crypto/pkcs7 | |
parent | caf044cb3e42ed44703e3394509deb1fa988c303 (diff) |
Initialize digested data type in PKCS7_set_type().
Diffstat (limited to 'crypto/pkcs7')
-rw-r--r-- | crypto/pkcs7/pk7_lib.c | 5 |
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; |