AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
OpenSSLCrypto Namespace Reference

Functions

AC_COMMON_API void threadsSetup ()
 Needs to be called before threads using openssl are spawned. More...
 
AC_COMMON_API void threadsCleanup ()
 Needs to be called after threads using openssl are despawned. More...
 

Detailed Description

A group of functions which setup openssl crypto module to work properly in multithreaded enviroment If not setup properly - it will crash

Function Documentation

◆ threadsCleanup()

void OpenSSLCrypto::threadsCleanup ( )

Needs to be called after threads using openssl are despawned.

51{
52 OSSL_PROVIDER_unload(LegacyProvider);
53 OSSL_PROVIDER_unload(DefaultProvider);
54 OSSL_PROVIDER_set_default_search_path(nullptr, nullptr);
55}
OSSL_PROVIDER * LegacyProvider
Definition: OpenSSLCrypto.cpp:22
OSSL_PROVIDER * DefaultProvider
Definition: OpenSSLCrypto.cpp:23

References DefaultProvider, and LegacyProvider.

Referenced by main().

◆ threadsSetup()

void OpenSSLCrypto::threadsSetup ( )

Needs to be called before threads using openssl are spawned.

42{
43#if AC_PLATFORM == AC_PLATFORM_WINDOWS
45#endif
46 LegacyProvider = OSSL_PROVIDER_load(nullptr, "legacy");
47 DefaultProvider = OSSL_PROVIDER_load(nullptr, "default");
48}
void SetupLibrariesForWindows()
Definition: OpenSSLCrypto.cpp:29

References DefaultProvider, LegacyProvider, and SetupLibrariesForWindows().

Referenced by main().