]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* modules/ssl/ssl_engine_pphrase.c (modssl_load_engine_keypair): Fix
authorJoe Orton <jorton@apache.org>
Wed, 13 Dec 2023 09:44:19 +0000 (09:44 +0000)
committerJoe Orton <jorton@apache.org>
Wed, 13 Dec 2023 09:44:19 +0000 (09:44 +0000)
  build (hopefully) for OpenSSL 3.x with OPENSSL_NO_ENGINE defined.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1914622 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_engine_pphrase.c

index dfccf1170a59a9460f68bc6cff23fb8d9382bd36..689da3066dcda021af18339636b78d02f555ba4f 100644 (file)
@@ -982,7 +982,12 @@ apr_status_t modssl_load_engine_keypair(server_rec *s, apr_pool_t *p,
 #if MODSSL_HAVE_OPENSSL_STORE
     SSLModConfigRec *mc = myModConfig(s);
 
-    if (!mc->szCryptoDevice)
+    /* For OpenSSL 3.x, use the STORE-based API if either ENGINE
+     * support was not present compile-time, or if it's built but
+     * SSLCryptoDevice is not configured. */
+#if MODSSL_HAVE_ENGINE_API 
+    if (!mc->szCryptoDevice) 
+#endif
         return modssl_load_keypair_store(s, p, vhostid, certid, keyid,
                                          pubkey, privkey);
 #endif