]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/evp/evp_enc.c
Don't set ctx->cipher until after a successful fetch
[thirdparty/openssl.git] / crypto / evp / evp_enc.c
index 87c7bb099572143692eecf64cf121936d994014d..31e15a63c25ffa5c500b502d73b521c1899396c9 100644 (file)
@@ -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) {