diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2008-03-15 00:02:23 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2008-03-15 00:02:23 +0000 |
commit | fd47c36136c7ac9b86f14c69b23a7d2df4fce132 (patch) | |
tree | 6f9ef61c5a2ed4e418dc427ce48cd506ba316c71 /crypto/cms/cms_smime.c | |
parent | d9f5f07e286bfc7a2a81756199a3e94444e0f6ce (diff) |
Return error if no cipher set for encrypted data type.
Update CHANGES.
Diffstat (limited to 'crypto/cms/cms_smime.c')
-rw-r--r-- | crypto/cms/cms_smime.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/cms/cms_smime.c b/crypto/cms/cms_smime.c index 458efbece8..da0fac0a24 100644 --- a/crypto/cms/cms_smime.c +++ b/crypto/cms/cms_smime.c @@ -227,6 +227,11 @@ CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher, unsigned int flags) { CMS_ContentInfo *cms; + if (!cipher) + { + CMSerr(CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT, CMS_R_NO_CIPHER); + return NULL; + } cms = CMS_ContentInfo_new(); if (!cms) return NULL; |