refactor(Core): remove ace_autoptr, cleanup (#3276)

This commit is contained in:
Viste
2020-08-25 13:52:22 +03:00
committed by GitHub
parent 208c257b99
commit a9b90c9a07
7 changed files with 46 additions and 42 deletions

View File

@@ -7,16 +7,26 @@
#ifndef OPENSSL_CRYPTO_H
#define OPENSSL_CRYPTO_H
#include "Define.h"
#include <openssl/opensslv.h>
/**
* A group of functions which setup openssl crypto module to work properly in multithreaded enviroment
* If not setup properly - it will crash
*/
namespace OpenSSLCrypto
{
#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x1010000fL
/// Needs to be called before threads using openssl are spawned
void threadsSetup();
/// Needs to be called after threads using openssl are despawned
void threadsCleanup();
#else
void threadsSetup() { };
void threadsCleanup() { };
#endif
}
#endif
#endif