summaryrefslogtreecommitdiffstats
path: root/crypto/cms
diff options
context:
space:
mode:
authorDavid von Oheimb <David.von.Oheimb@siemens.com>2018-05-10 21:14:12 +0200
committerMatt Caswell <matt@openssl.org>2018-06-18 10:45:35 +0100
commit49c9c1b3d05782fe76bef2eef8c5224baf843240 (patch)
treeb46b18ca01a027ae1960e6986c408134394538aa /crypto/cms
parentf2950a46a6217110a7f77b5acfe558a6fb4dfeeb (diff)
add 'unsupported cipher mode' diagnostics to evp_lib.c and genpkey.c
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6217)
Diffstat (limited to 'crypto/cms')
-rw-r--r--crypto/cms/cms_pwri.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/cms/cms_pwri.c b/crypto/cms/cms_pwri.c
index a7e63c7f2c..eac9c2fc86 100644
--- a/crypto/cms/cms_pwri.c
+++ b/crypto/cms/cms_pwri.c
@@ -326,7 +326,7 @@ int cms_RecipientInfo_pwri_crypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri,
if (!EVP_CipherInit_ex(kekctx, kekcipher, NULL, NULL, NULL, en_de))
goto err;
EVP_CIPHER_CTX_set_padding(kekctx, 0);
- if (EVP_CIPHER_asn1_to_param(kekctx, kekalg->parameter) < 0) {
+ if (EVP_CIPHER_asn1_to_param(kekctx, kekalg->parameter) <= 0) {
CMSerr(CMS_F_CMS_RECIPIENTINFO_PWRI_CRYPT,
CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR);
goto err;