diff options
author | Dr. Stephen Henson <steve@openssl.org> | 1999-05-11 00:52:46 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 1999-05-11 00:52:46 +0000 |
commit | 10243d97fd9d8d3162af7ec4dc582da21703eb62 (patch) | |
tree | 0a8690f25889f01e603f6e1ffab965987ab97384 /crypto/pkcs7/pk7_lib.c | |
parent | d5a2ea4b73220d58f12b2d6bdd378dc8e0a23bf9 (diff) |
Various PKCS#7 related fixes,tidies and comments.
Diffstat (limited to 'crypto/pkcs7/pk7_lib.c')
-rw-r--r-- | crypto/pkcs7/pk7_lib.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/pkcs7/pk7_lib.c b/crypto/pkcs7/pk7_lib.c index 43d991580a..ea3a5a2c76 100644 --- a/crypto/pkcs7/pk7_lib.c +++ b/crypto/pkcs7/pk7_lib.c @@ -310,6 +310,12 @@ int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey, else p7i->digest_alg->algorithm=OBJ_nid2obj(EVP_MD_type(dgst)); + if (p7i->digest_alg->parameter != NULL) + ASN1_TYPE_free(p7i->digest_alg->parameter); + if ((p7i->digest_alg->parameter=ASN1_TYPE_new()) == NULL) + goto err; + p7i->digest_alg->parameter->type=V_ASN1_NULL; + p7i->digest_enc_alg->algorithm=OBJ_nid2obj(EVP_PKEY_type(pkey->type)); if (p7i->digest_enc_alg->parameter != NULL) |