From 0278e15fa358bc1d09bfed8132fb347bb3986a5c Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Thu, 5 Jun 2008 15:13:03 +0000 Subject: [PATCH] If auto load ENGINE lookup fails retry adding builtin ENGINEs. --- ssl/ssl_lib.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index c834eada16..5c6ca2e666 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1525,6 +1525,12 @@ SSL_CTX *SSL_CTX_new(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(); } -- 2.25.1