From 480d33237df3894ea8df6f2a2e2076fa30efb205 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Fri, 18 Dec 2015 15:06:30 +0100 Subject: Remove EVP_CIPHER_CTX_flags, it's only confusing EVP_CIPHER_CTX_flags was returning the flags of its associated EVP_CIPHER. However, EVP_CIPHER_CTX has flags of its own, so this function is quite confusing and therefore error prone. Reviewed-by: Rich Salz --- crypto/evp/evp_enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/evp/evp_enc.c') diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c index 4a5945c93b..3bac1091fe 100644 --- a/crypto/evp/evp_enc.c +++ b/crypto/evp/evp_enc.c @@ -212,7 +212,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, return 0; } - if (!(EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_CUSTOM_IV)) { + if (!(EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(ctx)) & EVP_CIPH_CUSTOM_IV)) { switch (EVP_CIPHER_CTX_mode(ctx)) { case EVP_CIPH_STREAM_CIPHER: -- cgit v1.2.3