diff Core/HttpClient.cpp @ 2677:0196d07a900f jobs

migrate OpenSSL initialization to Toolbox
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 15 Jun 2018 11:16:37 +0200
parents 0c57f40e2fbf
children ad2c32082653
line wrap: on
line diff
--- a/Core/HttpClient.cpp	Tue Jun 12 16:22:07 2018 +0200
+++ b/Core/HttpClient.cpp	Fri Jun 15 11:16:37 2018 +0200
@@ -46,16 +46,6 @@
 #include <boost/thread/mutex.hpp>
 
 
-#if ORTHANC_ENABLE_SSL == 1
-// For OpenSSL initialization and finalization
-#  include <openssl/conf.h>
-#  include <openssl/engine.h>
-#  include <openssl/err.h>
-#  include <openssl/evp.h>
-#  include <openssl/ssl.h>
-#endif
-
-
 #if ORTHANC_ENABLE_PKCS11 == 1
 #  include "Pkcs11.h"
 #endif
@@ -812,34 +802,4 @@
     throw OrthancException(ErrorCode_InternalError);
 #endif
   }
-
-
-  void HttpClient::InitializeOpenSsl()
-  {
-#if ORTHANC_ENABLE_SSL == 1
-    // https://wiki.openssl.org/index.php/Library_Initialization
-    SSL_library_init();
-    SSL_load_error_strings();
-    OpenSSL_add_all_algorithms();
-    ERR_load_crypto_strings();
-#endif
-  }
-
-
-  void HttpClient::FinalizeOpenSsl()
-  {
-#if ORTHANC_ENABLE_SSL == 1
-    // Finalize OpenSSL
-    // https://wiki.openssl.org/index.php/Library_Initialization#Cleanup
-#ifdef FIPS_mode_set
-    FIPS_mode_set(0);
-#endif
-    ENGINE_cleanup();
-    CONF_modules_unload(1);
-    EVP_cleanup();
-    CRYPTO_cleanup_all_ex_data();
-    ERR_remove_state(0);
-    ERR_free_strings();
-#endif
-  }
 }