diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index fc41a3bf17969a156471c5d9ea2c02a789edb165..736423fd154106c16d1e5a12fffce0c7c6900e87 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1608,6 +1608,12 @@ SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth) { ENGINE *eng; eng = ENGINE_by_id(eng_str(OPENSSL_SSL_CLIENT_ENGINE_AUTO)); + if (!eng) + { + ERR_clear_error(); + ENGINE_load_builtin_engines(); + eng = ENGINE_by_id(eng_str(OPENSSL_SSL_CLIENT_ENGINE_AUTO)); + } if (!eng || !SSL_CTX_set_client_cert_engine(ret, eng)) ERR_clear_error(); }