aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/tls/openssl/TLSSession_OpenSSL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tls/openssl/TLSSession_OpenSSL.cpp')
-rwxr-xr-xsrc/net/tls/openssl/TLSSession_OpenSSL.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/net/tls/openssl/TLSSession_OpenSSL.cpp b/src/net/tls/openssl/TLSSession_OpenSSL.cpp
index e03c90f6..5d7e1052 100755
--- a/src/net/tls/openssl/TLSSession_OpenSSL.cpp
+++ b/src/net/tls/openssl/TLSSession_OpenSSL.cpp
@@ -47,10 +47,6 @@ namespace net {
namespace tls {
-// Thread-safe OpenSSL initialization
-static OpenSSLInitializer g_openSSLGlobal;
-
-
// static
ref <TLSSession> TLSSession::create(ref <security::cert::certificateVerifier> cv)
{
@@ -61,6 +57,9 @@ ref <TLSSession> TLSSession::create(ref <security::cert::certificateVerifier> cv
TLSSession_OpenSSL::TLSSession_OpenSSL(ref <vmime::security::cert::certificateVerifier> cv)
: m_sslctx(0), m_certVerifier(cv)
{
+ // Thread-safe OpenSSL initialization
+ static OpenSSLInitializer openSSLInitialization;
+
m_sslctx = SSL_CTX_new(SSLv23_client_method());
SSL_CTX_set_options(m_sslctx, SSL_OP_ALL | SSL_OP_NO_SSLv2);
}