@@ -979,21 +979,19 @@ apr_status_t modssl_load_engine_keypair(server_rec *s, apr_pool_t *p,
979
979
const char * certid , const char * keyid ,
980
980
X509 * * pubkey , EVP_PKEY * * privkey )
981
981
{
982
- #if MODSSL_HAVE_OPENSSL_STORE
982
+ #if MODSSL_HAVE_ENGINE_API
983
983
SSLModConfigRec * mc = myModConfig (s );
984
984
985
985
/* For OpenSSL 3.x, use the STORE-based API if either ENGINE
986
986
* support was not present compile-time, or if it's built but
987
987
* 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 );
990
991
#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 );
997
995
#else
998
996
return APR_ENOTIMPL ;
999
997
#endif
0 commit comments