|
@@ -78,11 +78,7 @@ int init_openssl() {
|
|
|
/* good place to init ssl stuff */
|
|
/* good place to init ssl stuff */
|
|
|
OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS |
|
|
OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS |
|
|
|
OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
|
|
OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
|
|
|
-#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
|
|
|
- ssl_ctx = SSL_CTX_new(SSLv23_client_method());
|
|
|
|
|
-#else
|
|
|
|
|
ssl_ctx = SSL_CTX_new(TLS_client_method());
|
|
ssl_ctx = SSL_CTX_new(TLS_client_method());
|
|
|
-#endif
|
|
|
|
|
if (!ssl_ctx) {
|
|
if (!ssl_ctx) {
|
|
|
sdprintf("SSL_CTX_new() failed");
|
|
sdprintf("SSL_CTX_new() failed");
|
|
|
return 1;
|
|
return 1;
|
|
@@ -125,12 +121,6 @@ int uninit_openssl () {
|
|
|
RAND_write_file(tls_rand_file);
|
|
RAND_write_file(tls_rand_file);
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
-#if defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
|
|
|
- ERR_free_strings();
|
|
|
|
|
- EVP_cleanup();
|
|
|
|
|
- CRYPTO_cleanup_all_ex_data();
|
|
|
|
|
-#endif
|
|
|
|
|
-
|
|
|
|
|
unload_libssl();
|
|
unload_libssl();
|
|
|
unload_libcrypto();
|
|
unload_libcrypto();
|
|
|
return 0;
|
|
return 0;
|