From 47e6c68de8594e03a7b73ecbc759dc0451cb3966 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Thu, 17 Nov 2022 18:57:35 -0600 Subject: [PATCH] hcrypto: OpenSSL's EVP_Cipher() returns a length --- lib/hcrypto/evp-openssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hcrypto/evp-openssl.c b/lib/hcrypto/evp-openssl.c index 179b385b7..d7d71e4ff 100644 --- a/lib/hcrypto/evp-openssl.c +++ b/lib/hcrypto/evp-openssl.c @@ -158,7 +158,7 @@ cipher_do_cipher(hc_EVP_CIPHER_CTX *ctx, unsigned char *out, struct ossl_cipher_ctx *ossl_ctx = ctx->cipher_data; assert(ossl_ctx != NULL); - return EVP_Cipher(ossl_ctx->ossl_cipher_ctx, out, in, len); + return EVP_Cipher(ossl_ctx->ossl_cipher_ctx, out, in, len) == 0 ? 0 : 1; } static int