Skip to content

Commit

Permalink
main: remove usage of crypto_set_id_callback() (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredh authored May 4, 2022
1 parent ad5fea4 commit 4aa6fce
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/main/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,10 @@ static inline unsigned long threadid(void)
}


#if OPENSSL_VERSION_NUMBER >= 0x10000000
static void threadid_handler(CRYPTO_THREADID *id)
{
CRYPTO_THREADID_set_numeric(id, threadid());
}
#else
static unsigned long threadid_handler(void)
{
return threadid();
}
#endif


static void locking_handler(int mode, int type, const char *file, int line)
Expand Down Expand Up @@ -131,11 +124,7 @@ int openssl_init(void)
}
}

#if OPENSSL_VERSION_NUMBER >= 0x10000000
CRYPTO_THREADID_set_callback(threadid_handler);
#else
CRYPTO_set_id_callback(threadid_handler);
#endif

CRYPTO_set_locking_callback(locking_handler);
#endif
Expand Down

0 comments on commit 4aa6fce

Please sign in to comment.