You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.5 KiB

  1. diff --git a/src/ssl/Ssl.c b/src/ssl/Ssl.c
  2. index 6501f25..9c24ad5 100644
  3. --- a/src/ssl/Ssl.c
  4. +++ b/src/ssl/Ssl.c
  5. @@ -302,8 +302,8 @@ static boolean_t _retry(int socket, int *timeout, int (*callback)(int socket, ti
  6. #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
  7. -static unsigned long _threadID() {
  8. - return (unsigned long)Thread_self();
  9. +static void _threadID(CRYPTO_THREADID *id) {
  10. + CRYPTO_THREADID_set_numeric(id, (unsigned long)Thread_self());
  11. }
  12. @@ -482,7 +482,7 @@ void Ssl_start() {
  13. instanceMutexTable = CALLOC(locks, sizeof(Mutex_T));
  14. for (int i = 0; i < locks; i++)
  15. Mutex_init(instanceMutexTable[i]);
  16. - CRYPTO_set_id_callback(_threadID);
  17. + CRYPTO_THREADID_set_callback(_threadID);
  18. CRYPTO_set_locking_callback(_mutexLock);
  19. #endif
  20. if (File_exist(URANDOM_DEVICE))
  21. @@ -496,7 +496,7 @@ void Ssl_start() {
  22. void Ssl_stop() {
  23. #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
  24. - CRYPTO_set_id_callback(NULL);
  25. + CRYPTO_THREADID_set_callback(NULL);
  26. CRYPTO_set_locking_callback(NULL);
  27. for (int i = 0; i < CRYPTO_num_locks(); i++)
  28. Mutex_destroy(instanceMutexTable[i]);
  29. @@ -510,7 +510,7 @@ void Ssl_stop() {
  30. void Ssl_threadCleanup() {
  31. #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
  32. - ERR_remove_state(0);
  33. + ERR_remove_thread_state(NULL);
  34. #endif
  35. }