From 816f06e172d5744b2721e1c94863fb76b4313e5e Mon Sep 17 00:00:00 2001 From: Dirkjan Bussink Date: Tue, 22 Dec 2020 19:45:32 +0100 Subject: Remove no longer needed compatibility check CRYPTO_THREADID_set_callback is available since 1.0.1 which is the oldest supported version. This means the check and compatibility code can be removed. Signed-off-by: Dirkjan Bussink Reviewed-by: Jakub Jelen --- src/threads/libcrypto.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/threads') diff --git a/src/threads/libcrypto.c b/src/threads/libcrypto.c index 5786948b..dac840d3 100644 --- a/src/threads/libcrypto.c +++ b/src/threads/libcrypto.c @@ -57,14 +57,12 @@ void libcrypto_lock_callback(int mode, int i, const char *file, int line) } } -#ifdef HAVE_OPENSSL_CRYPTO_THREADID_SET_CALLBACK static void libcrypto_THREADID_callback(CRYPTO_THREADID *id) { unsigned long thread_id = (*user_callbacks->thread_id)(); CRYPTO_THREADID_set_numeric(id, thread_id); } -#endif /* HAVE_OPENSSL_CRYPTO_THREADID_SET_CALLBACK */ int crypto_thread_init(struct ssh_threads_callbacks_struct *cb) { @@ -96,12 +94,7 @@ int crypto_thread_init(struct ssh_threads_callbacks_struct *cb) user_callbacks->mutex_init(&libcrypto_mutexes[i]); } -#ifdef HAVE_OPENSSL_CRYPTO_THREADID_SET_CALLBACK CRYPTO_THREADID_set_callback(libcrypto_THREADID_callback); -#else - CRYPTO_set_id_callback(user_callbacks->thread_id); -#endif - CRYPTO_set_locking_callback(libcrypto_lock_callback); return SSH_OK; @@ -116,12 +109,7 @@ void crypto_thread_finalize(void) return; } -#ifdef HAVE_OPENSSL_CRYPTO_THREADID_SET_CALLBACK CRYPTO_THREADID_set_callback(NULL); -#else - CRYPTO_set_id_callback(NULL); -#endif - CRYPTO_set_locking_callback(NULL); for (i = 0; i < n; ++i) { -- cgit v1.2.3