Skip to content
Snippets Groups Projects
Commit 53a34759 authored by Yawning Angel's avatar Yawning Angel Committed by Nick Mathewson
Browse files

ERR_remove_state() is deprecated since OpenSSL 1.0.0.

OpenSSL 1.1.0 must be built with "enable-deprecated", and compiled with
`OPENSSL_USE_DEPRECATED` for this to work, so instead, use the newer
routine as appropriate.
parent 614d9bc9
No related branches found
No related tags found
No related merge requests found
......@@ -405,7 +405,11 @@ crypto_global_init(int useAccel, const char *accelName, const char *accelDir)
void
crypto_thread_cleanup(void)
{
#if OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,0)
ERR_remove_thread_state(NULL);
#else
ERR_remove_state(0);
#endif
}
/** used by tortls.c: wrap an RSA* in a crypto_pk_t. */
......@@ -3157,7 +3161,11 @@ int
crypto_global_cleanup(void)
{
EVP_cleanup();
#if OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,0)
ERR_remove_thread_state(NULL);
#else
ERR_remove_state(0);
#endif
ERR_free_strings();
if (dh_param_p)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment