]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
openssl: Fix openssl engines
authorTheodore A. Roth <troth@openavr.org>
Thu, 12 Jun 2025 17:36:02 +0000 (11:36 -0600)
committerJay Satiro <raysatiro@yahoo.com>
Sun, 15 Jun 2025 03:15:04 +0000 (23:15 -0400)
- 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

lib/vtls/openssl.c

index 69cde17c2c5ff9c8d85c62ee74ab6de7bbcb05dd..a32307c05bdfce26182df13d52245f1a94f3f62d 100644 (file)
@@ -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;
   }