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.5.0-alpha1~1080 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ffc5a29608fdbd346e340a65a43ebadc90bd4a33;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) --- diff --git a/crypto/ec/ec_backend.c b/crypto/ec/ec_backend.c index 960047df1b3..f0191a7db3b 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 */