mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-15 01:34:30 +02:00
parent
c688a94f8a
commit
6de6ea5e42
@ -32,6 +32,7 @@ namespace icinga
|
|||||||
static bool l_SSLInitialized = false;
|
static bool l_SSLInitialized = false;
|
||||||
static boost::mutex *l_Mutexes;
|
static boost::mutex *l_Mutexes;
|
||||||
|
|
||||||
|
#ifdef CRYPTO_LOCK
|
||||||
static void OpenSSLLockingCallback(int mode, int type, const char *, int)
|
static void OpenSSLLockingCallback(int mode, int type, const char *, int)
|
||||||
{
|
{
|
||||||
if (mode & CRYPTO_LOCK)
|
if (mode & CRYPTO_LOCK)
|
||||||
@ -48,6 +49,7 @@ static unsigned long OpenSSLIDCallback(void)
|
|||||||
return (unsigned long)pthread_self();
|
return (unsigned long)pthread_self();
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
}
|
}
|
||||||
|
#endif /* CRYPTO_LOCK */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the OpenSSL library.
|
* Initializes the OpenSSL library.
|
||||||
@ -62,9 +64,11 @@ void InitializeOpenSSL(void)
|
|||||||
|
|
||||||
SSL_COMP_get_compression_methods();
|
SSL_COMP_get_compression_methods();
|
||||||
|
|
||||||
|
#ifdef CRYPTO_LOCK
|
||||||
l_Mutexes = new boost::mutex[CRYPTO_num_locks()];
|
l_Mutexes = new boost::mutex[CRYPTO_num_locks()];
|
||||||
CRYPTO_set_locking_callback(&OpenSSLLockingCallback);
|
CRYPTO_set_locking_callback(&OpenSSLLockingCallback);
|
||||||
CRYPTO_set_id_callback(&OpenSSLIDCallback);
|
CRYPTO_set_id_callback(&OpenSSLIDCallback);
|
||||||
|
#endif /* CRYPTO_LOCK */
|
||||||
|
|
||||||
l_SSLInitialized = true;
|
l_SSLInitialized = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user