Skip to content

Commit

Permalink
Merge pull request #453 from arogge/dev/arogge/master/TT4200594
Browse files Browse the repository at this point in the history
Revert "cleanup: removed deprecated OpenSSL functions from build"
  • Loading branch information
arogge committed Mar 24, 2020
2 parents d3ba475 + d587813 commit 43b9adc
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions core/src/lib/crypto_openssl.cc
Expand Up @@ -1608,7 +1608,6 @@ void OpensslPostErrors(JobControlRecord* jcr, int type, const char* errstring)
* Returns: thread ID
*
*/
#if OPENSSL_VERSION_NUMBER < 0x10000000L
static unsigned long GetOpensslThreadId(void)
{
#ifdef HAVE_WIN32
Expand All @@ -1623,12 +1622,10 @@ static unsigned long GetOpensslThreadId(void)
return ((unsigned long)pthread_self());
#endif /* not HAVE_WIN32 */
}
#endif /* #if OPENSSL_VERSION_NUMBER < 0x10000000L */

/*
* Allocate a dynamic OpenSSL mutex
*/
#if OPENSSL_VERSION_NUMBER < 0x10000000L
static struct CRYPTO_dynlock_value* openssl_create_dynamic_mutex(
const char* file,
int line)
Expand Down Expand Up @@ -1674,12 +1671,10 @@ static void OpensslDestroyDynamicMutex(struct CRYPTO_dynlock_value* dynlock,

free(dynlock);
}
#endif /* OPENSSL_VERSION_NUMBER < 0x10000000L */

/*
* (Un)Lock a static OpenSSL mutex
*/
#if OPENSSL_VERSION_NUMBER < 0x10000000L
static void openssl_update_static_mutex(int mode,
int i,
const char* file,
Expand All @@ -1691,7 +1686,6 @@ static void openssl_update_static_mutex(int mode,
V(mutexes[i]);
}
}
#endif /* OPENSSL_VERSION_NUMBER < 0x10000000L */

/*
* Initialize OpenSSL thread support
Expand All @@ -1705,9 +1699,7 @@ int OpensslInitThreads(void)


/* Set thread ID callback */
#if OPENSSL_VERSION_NUMBER < 0x10000000L
CRYPTO_set_id_callback(GetOpensslThreadId);
#endif

/* Initialize static locking */
numlocks = CRYPTO_num_locks();
Expand All @@ -1721,15 +1713,13 @@ int OpensslInitThreads(void)
}
}

#if OPENSSL_VERSION_NUMBER < 0x10000000L
/* Set static locking callback */
CRYPTO_set_locking_callback(openssl_update_static_mutex);

/* Initialize dyanmic locking */
CRYPTO_set_dynlock_create_callback(openssl_create_dynamic_mutex);
CRYPTO_set_dynlock_lock_callback(OpensslUpdateDynamicMutex);
CRYPTO_set_dynlock_destroy_callback(OpensslDestroyDynamicMutex);
#endif

return 0;
}
Expand Down

0 comments on commit 43b9adc

Please sign in to comment.