From: Зишан Мирза Date: Mon, 16 Sep 2024 21:20:58 +0000 (+0200) Subject: Remove double engine reference in ossl_ec_key_dup() X-Git-Tag: openssl-3.0.16~111 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b4a65f35825688314a9ff7d84ebdef0c2213bbb;p=thirdparty%2Fopenssl.git 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) --- 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 */