mirror of
https://github.com/boostorg/asio.git
synced 2026-02-26 14:52:09 +00:00
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]
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user