aboutsummaryrefslogtreecommitdiff
path: root/src/threads
diff options
context:
space:
mode:
authorDirkjan Bussink <d.bussink@gmail.com>2020-12-22 19:45:32 +0100
committerJakub Jelen <jjelen@redhat.com>2021-01-11 10:45:22 +0100
commit816f06e172d5744b2721e1c94863fb76b4313e5e (patch)
tree01291fc7027dc34f3b0e96e25133a403f7160c6c /src/threads
parent38806e1dd87f9d6bf6e6a88634bdf342a4b6c74c (diff)
downloadlibssh-816f06e172d5744b2721e1c94863fb76b4313e5e.tar.gz
libssh-816f06e172d5744b2721e1c94863fb76b4313e5e.tar.xz
libssh-816f06e172d5744b2721e1c94863fb76b4313e5e.zip
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 <d.bussink@gmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Diffstat (limited to 'src/threads')
-rw-r--r--src/threads/libcrypto.c12
1 files changed, 0 insertions, 12 deletions
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) {