From: Theodore A. Roth Date: Thu, 12 Jun 2025 17:36:02 +0000 (-0600) Subject: openssl: Fix openssl engines X-Git-Tag: curl-8_15_0~266 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17f2a220a99db30bacd66df4df677dfb0a18b405;p=thirdparty%2Fcurl.git openssl: Fix openssl engines - Return CURLE_OK if the engine successfully loaded. Prior to this change: When loading an openssl engine, the result code is initialized to CURLE_SSL_ENGINE_NOTFOUND, but is never set to CURLE_OK when the engine was successfully loaded. This causes curl to error out, falsely stating engine not found when it actually was. Broken since f2ce6c46 (precedes 8.14.0) which added support for using engines and providers at the same time. Fixes https://github.com/curl/curl/issues/17617 Closes https://github.com/curl/curl/pull/17618 --- diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 69cde17c2c..a32307c05b 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -1907,6 +1907,9 @@ static CURLcode ossl_set_engine(struct Curl_easy *data, const char *name) result = CURLE_SSL_ENGINE_INITFAILED; e = NULL; } + else { + result = CURLE_OK; + } data->state.engine = e; return result; }