diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/cms/cms_pwri.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/cms/cms_pwri.c b/src/lib/libcrypto/cms/cms_pwri.c index cf28dfc8dd..eb241a60fe 100644 --- a/src/lib/libcrypto/cms/cms_pwri.c +++ b/src/lib/libcrypto/cms/cms_pwri.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cms_pwri.c,v 1.26 2019/08/12 18:04:57 jsing Exp $ */ | 1 | /* $OpenBSD: cms_pwri.c,v 1.27 2022/01/19 13:47:44 inoguchi Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
4 | * project. | 4 | * project. |
@@ -126,7 +126,9 @@ CMS_add0_recipient_password(CMS_ContentInfo *cms, int iter, int wrap_nid, | |||
126 | if (encalg == NULL) { | 126 | if (encalg == NULL) { |
127 | goto merr; | 127 | goto merr; |
128 | } | 128 | } |
129 | ctx = EVP_CIPHER_CTX_new(); | 129 | |
130 | if ((ctx = EVP_CIPHER_CTX_new()) == NULL) | ||
131 | goto merr; | ||
130 | 132 | ||
131 | if (EVP_EncryptInit_ex(ctx, kekciph, NULL, NULL, NULL) <= 0) { | 133 | if (EVP_EncryptInit_ex(ctx, kekciph, NULL, NULL, NULL) <= 0) { |
132 | CMSerror(ERR_R_EVP_LIB); | 134 | CMSerror(ERR_R_EVP_LIB); |