diff options
author | Peiwei Hu <jlu.hpw@foxmail.com> | 2022-05-24 16:57:53 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-05-27 07:57:43 +0200 |
commit | 8d9fec1781751d2106d899c6076eeb3da6930bfe (patch) | |
tree | deec4da4593daac6aecf5cf605efaf1fd936a73b /apps | |
parent | Fix the defective check of EVP_PKEY_get_params (diff) | |
download | openssl-8d9fec1781751d2106d899c6076eeb3da6930bfe.tar.xz openssl-8d9fec1781751d2106d899c6076eeb3da6930bfe.zip |
Fix the incorrect checks of EVP_CIPHER_CTX_set_key_length
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18397)
Diffstat (limited to 'apps')
-rw-r--r-- | apps/speed.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/speed.c b/apps/speed.c index 3ecc0e9366..936107c5ef 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -695,7 +695,7 @@ static EVP_CIPHER_CTX *init_evp_cipher_ctx(const char *ciphername, goto end; } - if (!EVP_CIPHER_CTX_set_key_length(ctx, keylen)) { + if (EVP_CIPHER_CTX_set_key_length(ctx, keylen) <= 0) { EVP_CIPHER_CTX_free(ctx); ctx = NULL; goto end; |