# HG changeset patch # User Sebastien Jodogne # Date 1529054300 -7200 # Node ID e0476e8cb73d2423ef572e904699ed50391395ad # Parent 0196d07a900fa171c47aba61c3ee5968d4b39ae7 fix diff -r 0196d07a900f -r e0476e8cb73d Core/Toolbox.cpp --- a/Core/Toolbox.cpp Fri Jun 15 11:16:37 2018 +0200 +++ b/Core/Toolbox.cpp Fri Jun 15 11:18:20 2018 +0200 @@ -1431,36 +1431,6 @@ } - void Toolbox::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 Toolbox::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 - } - - std::string Toolbox::ToUpperCaseWithAccents(const std::string& source) { if (globalLocale_.get() == NULL) @@ -1503,6 +1473,36 @@ #endif + void Toolbox::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 Toolbox::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 + } + + std::string Toolbox::GenerateUuid() { #ifdef WIN32