]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Remove double engine reference in ossl_ec_key_dup()
authorЗишан Мирза <zmirza@tutanota.de>
Mon, 16 Sep 2024 21:20:58 +0000 (23:20 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 26 Sep 2024 08:26:19 +0000 (10:26 +0200)
Fixes #25260

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25453)

crypto/ec/ec_backend.c

index 960047df1b36c1586f2b0861e85baec68fb859b6..f0191a7db3b06e2249f6a8e04b82b360f78c6e7f 100644 (file)
@@ -616,14 +616,8 @@ EC_KEY *ossl_ec_key_dup(const EC_KEY *src, int selection)
             || !EC_GROUP_copy(ret->group, src->group))
             goto err;
 
-        if (src->meth != NULL) {
-#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
-            if (src->engine != NULL && ENGINE_init(src->engine) == 0)
-                goto err;
-            ret->engine = src->engine;
-#endif
+        if (src->meth != NULL)
             ret->meth = src->meth;
-        }
     }
 
     /*  copy the public key */