diff options
author | Peiwei Hu <jlu.hpw@foxmail.com> | 2022-05-24 22:57:53 +0800 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-05-27 07:58:45 +0200 |
commit | acd6338ff0afa31730a0cff62d993a8ebc63db5c (patch) | |
tree | 3e3a9bae859a2359121da6cf75f448d4238c6cdf /apps | |
parent | d3c5aff6cbf1ed6c855fb450b2caefbda8b9ce0f (diff) |
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)
(cherry picked from commit 8d9fec1781751d2106d899c6076eeb3da6930bfe)
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 dbeb371194..f16c78baab 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -691,7 +691,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; |