From 851d074dd68067a455e4be8e75d4a4bd82a2d7e2 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Thu, 9 Nov 2006 03:04:05 +0000 Subject: [PATCH] The openssl_locking_func() callback can be invoked through OpenSSL_add_ssl_algorithms(), which causes instance() to be called recursively before the static shared_ptr was initialized. [SVN r35942] --- include/boost/asio/ssl/detail/openssl_init.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/boost/asio/ssl/detail/openssl_init.hpp b/include/boost/asio/ssl/detail/openssl_init.hpp index 4e07277c..d8011934 100644 --- a/include/boost/asio/ssl/detail/openssl_init.hpp +++ b/include/boost/asio/ssl/detail/openssl_init.hpp @@ -46,13 +46,12 @@ private: { ::SSL_library_init(); ::SSL_load_error_strings(); + ::OpenSSL_add_ssl_algorithms(); mutexes_.resize(::CRYPTO_num_locks()); for (size_t i = 0; i < mutexes_.size(); ++i) mutexes_[i].reset(new boost::asio::detail::mutex); ::CRYPTO_set_locking_callback(&do_init::openssl_locking_func); - - ::OpenSSL_add_ssl_algorithms(); } }