diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2005-08-04 22:15:22 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2005-08-04 22:15:22 +0000 |
commit | 8f2e4fdf860705a0d6868daba187e055781f7755 (patch) | |
tree | 06480b418e5bcdebb679dc169642099232bcd0b8 /crypto/pkcs7/pk7_smime.c | |
parent | 11de71b04c750e6be6f5e8ac875655a2a67efaf7 (diff) |
Allow PKCS7_decrypt() to work if no cert supplied.
Diffstat (limited to 'crypto/pkcs7/pk7_smime.c')
-rw-r--r-- | crypto/pkcs7/pk7_smime.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/pkcs7/pk7_smime.c b/crypto/pkcs7/pk7_smime.c index b6146d75c4..1f4a0a1795 100644 --- a/crypto/pkcs7/pk7_smime.c +++ b/crypto/pkcs7/pk7_smime.c @@ -441,7 +441,7 @@ int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags) return 0; } - if(!X509_check_private_key(cert, pkey)) { + if(cert && !X509_check_private_key(cert, pkey)) { PKCS7err(PKCS7_F_PKCS7_DECRYPT, PKCS7_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE); return 0; |