Skip to content

Commit 512d926

Browse files
committed
Avoid -Werror failure in no-engine build.
1 parent c348043 commit 512d926

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

modules/ssl/ssl_engine_pphrase.c

+7-9
Original file line numberDiff line numberDiff line change
@@ -979,21 +979,19 @@ apr_status_t modssl_load_engine_keypair(server_rec *s, apr_pool_t *p,
979979
const char *certid, const char *keyid,
980980
X509 **pubkey, EVP_PKEY **privkey)
981981
{
982-
#if MODSSL_HAVE_OPENSSL_STORE
982+
#if MODSSL_HAVE_ENGINE_API
983983
SSLModConfigRec *mc = myModConfig(s);
984984

985985
/* For OpenSSL 3.x, use the STORE-based API if either ENGINE
986986
* support was not present compile-time, or if it's built but
987987
* SSLCryptoDevice is not configured. */
988-
#if MODSSL_HAVE_ENGINE_API
989-
if (!mc->szCryptoDevice)
988+
if (mc->szCryptoDevice)
989+
return modssl_load_keypair_engine(s, p, vhostid, certid, keyid,
990+
pubkey, privkey);
990991
#endif
991-
return modssl_load_keypair_store(s, p, vhostid, certid, keyid,
992-
pubkey, privkey);
993-
#endif
994-
#if MODSSL_HAVE_ENGINE_API
995-
return modssl_load_keypair_engine(s, p, vhostid, certid, keyid,
996-
pubkey, privkey);
992+
#if MODSSL_HAVE_OPENSSL_STORE
993+
return modssl_load_keypair_store(s, p, vhostid, certid, keyid,
994+
pubkey, privkey);
997995
#else
998996
return APR_ENOTIMPL;
999997
#endif

0 commit comments

Comments
 (0)