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.1.8~115 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80e57e9f0b12334aea6d3eb128d5b76f32339e13;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 e159ba0c618..c242c32a4d7 100644 --- a/crypto/ec/ec_backend.c +++ b/crypto/ec/ec_backend.c @@ -617,14 +617,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 */