diff options
author | Shauren <shauren.trinity@gmail.com> | 2022-06-14 23:18:42 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-06-16 12:37:00 +0200 |
commit | 27259f85241cb9a8293fe716c5de439c7921fd91 (patch) | |
tree | 018bf5936b10a7da08c9fd646a9014c50653ec46 /src/server/authserver/Main.cpp | |
parent | 9fca5e9117317d6706fdf7d09fb86acaa3361129 (diff) |
Core/Crypto: Fixed loading legacy openssl provider for RC4 on windows
Diffstat (limited to 'src/server/authserver/Main.cpp')
-rw-r--r-- | src/server/authserver/Main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp index 145ec132966..33d50071140 100644 --- a/src/server/authserver/Main.cpp +++ b/src/server/authserver/Main.cpp @@ -34,12 +34,14 @@ #include "IPLocation.h" #include "GitRevision.h" #include "MySQLThreading.h" +#include "OpenSSLCrypto.h" #include "ProcessPriority.h" #include "RealmList.h" #include "SecretMgr.h" #include "SharedDefines.h" #include "Util.h" #include <boost/asio/signal_set.hpp> +#include <boost/dll/runtime_symbol_info.hpp> #include <boost/program_options.hpp> #include <boost/filesystem/operations.hpp> #include <openssl/crypto.h> @@ -129,6 +131,10 @@ int main(int argc, char** argv) for (std::string const& key : overriddenKeys) TC_LOG_INFO("server.authserver", "Configuration field '%s' was overridden with environment variable.", key.c_str()); + OpenSSLCrypto::threadsSetup(boost::dll::program_location().remove_filename()); + + std::shared_ptr<void> opensslHandle(nullptr, [](void*) { OpenSSLCrypto::threadsCleanup(); }); + // authserver PID file creation std::string pidFile = sConfigMgr->GetStringDefault("PidFile", ""); if (!pidFile.empty()) |