From: Joe Orton Date: Wed, 13 Dec 2023 09:44:19 +0000 (+0000) Subject: * modules/ssl/ssl_engine_pphrase.c (modssl_load_engine_keypair): Fix X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5bf0869c7cfd6723f53115c8483737fce53fd2a;p=thirdparty%2Fapache%2Fhttpd.git * modules/ssl/ssl_engine_pphrase.c (modssl_load_engine_keypair): Fix 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 --- diff --git a/modules/ssl/ssl_engine_pphrase.c b/modules/ssl/ssl_engine_pphrase.c index dfccf1170a5..689da3066dc 100644 --- a/modules/ssl/ssl_engine_pphrase.c +++ b/modules/ssl/ssl_engine_pphrase.c @@ -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