diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c index 87c7bb0995..31e15a63c2 100644 --- a/crypto/evp/evp_enc.c +++ b/crypto/evp/evp_enc.c @@ -197,9 +197,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ctx->flags = flags; } - if (cipher != NULL) - ctx->cipher = cipher; - else + if (cipher == NULL) cipher = ctx->cipher; if (cipher->prov == NULL) {