From 9b4a65f35825688314a9ff7d84ebdef0c2213bbb Mon Sep 17 00:00:00 2001 From: =?utf8?q?=D0=97=D0=B8=D1=88=D0=B0=D0=BD=20=D0=9C=D0=B8=D1=80=D0=B7?= =?utf8?q?=D0=B0?= Date: Mon, 16 Sep 2024 23:20:58 +0200 Subject: [PATCH] Remove double engine reference in ossl_ec_key_dup() Fixes #25260 Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/25453) (cherry picked from commit ffc5a29608fdbd346e340a65a43ebadc90bd4a33) --- crypto/ec/ec_backend.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/crypto/ec/ec_backend.c b/crypto/ec/ec_backend.c index 98e2c418e41..cad576fc48a 100644 --- a/crypto/ec/ec_backend.c +++ b/crypto/ec/ec_backend.c @@ -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 */ -- 2.47.2