9 #include <openssl/crypto.h>
10 #include <openssl/rand.h>
17 #ifdef CVMFS_NAMESPACE_GUARD
18 namespace CVMFS_NAMESPACE_GUARD {
21 #ifndef OPENSSL_API_INTERFACE_V11
31 if (mode & CRYPTO_LOCK) {
32 retval = pthread_mutex_lock(&(gLibcryptoLocks[type]));
34 retval = pthread_mutex_unlock(&(gLibcryptoLocks[type]));
53 #ifndef OPENSSL_API_INTERFACE_V11
58 CRYPTO_num_locks() *
sizeof(pthread_mutex_t)));
59 for (
int i = 0; i < CRYPTO_num_locks(); ++i) {
71 #ifndef OPENSSL_API_INTERFACE_V11
75 CRYPTO_set_locking_callback(NULL);
76 for (
int i = 0; i < CRYPTO_num_locks(); ++i)
84 #ifdef CVMFS_NAMESPACE_GUARD
CVMFS_EXPORT void InitRng()
static void CallbackLibcryptoLock(int mode, int type, const char *, int)
CVMFS_EXPORT void CleanupLibcryptoMt()
assert((mem||(size==0))&&"Out Of Memory")
static unsigned long CallbackLibcryptoThreadId()
CVMFS_EXPORT void SetupLibcryptoMt()
pthread_mutex_t * gLibcryptoLocks