hcrypto: OpenSSL's EVP_Cipher() returns a length

This commit is contained in:
Nicolas Williams
2022-11-17 18:57:35 -06:00
committed by Jeffrey Altman
parent 83cd1255f6
commit 47e6c68de8

View File

@@ -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