mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-13 19:37:51 +00:00
temporary disable openssl mutexes
This commit is contained in:
parent
7968279bc2
commit
7a84daf3f7
12
Crypto.cpp
12
Crypto.cpp
@ -683,7 +683,7 @@ namespace crypto
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector <std::unique_ptr<std::mutex> > m_OpenSSLMutexes;
|
/* std::vector <std::unique_ptr<std::mutex> > m_OpenSSLMutexes;
|
||||||
static void OpensslLockingCallback(int mode, int type, const char * file, int line)
|
static void OpensslLockingCallback(int mode, int type, const char * file, int line)
|
||||||
{
|
{
|
||||||
if (type > 0 && (size_t)type < m_OpenSSLMutexes.size ())
|
if (type > 0 && (size_t)type < m_OpenSSLMutexes.size ())
|
||||||
@ -693,21 +693,21 @@ namespace crypto
|
|||||||
else
|
else
|
||||||
m_OpenSSLMutexes[type]->unlock ();
|
m_OpenSSLMutexes[type]->unlock ();
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
void InitCrypto ()
|
void InitCrypto ()
|
||||||
{
|
{
|
||||||
SSL_library_init ();
|
SSL_library_init ();
|
||||||
auto numLocks = CRYPTO_num_locks();
|
/* auto numLocks = CRYPTO_num_locks();
|
||||||
for (int i = 0; i < numLocks; i++)
|
for (int i = 0; i < numLocks; i++)
|
||||||
m_OpenSSLMutexes.emplace_back (new std::mutex);
|
m_OpenSSLMutexes.emplace_back (new std::mutex);
|
||||||
CRYPTO_set_locking_callback (OpensslLockingCallback);
|
CRYPTO_set_locking_callback (OpensslLockingCallback);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void TerminateCrypto ()
|
void TerminateCrypto ()
|
||||||
{
|
{
|
||||||
CRYPTO_set_locking_callback (nullptr);
|
/* CRYPTO_set_locking_callback (nullptr);
|
||||||
m_OpenSSLMutexes.clear ();
|
m_OpenSSLMutexes.clear ();*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user