Resolve tls mode multi-thread issue.

This commit is contained in:
Nick Peng
2019-02-11 02:36:05 +08:00
parent 452438a0af
commit 87d8739ecd
4 changed files with 71 additions and 2 deletions

View File

@@ -200,12 +200,14 @@ int smartdns_init_ssl(void)
SSL_load_error_strings();
SSL_library_init();
OpenSSL_add_all_algorithms();
SSL_CRYPTO_thread_setup();
return 0;
}
int smartdns_destroy_ssl(void)
{
SSL_CRYPTO_thread_cleanup();
ERR_free_strings();
EVP_cleanup();