mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 19:51:58 +01:00
manually merge #3448, part 1 (Crypto)
This commit is contained in:
@@ -22,7 +22,9 @@
|
||||
#include "Poco/Mutex.h"
|
||||
#include "Poco/AtomicCounter.h"
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||
#include <openssl/provider.h>
|
||||
#endif
|
||||
#if defined(OPENSSL_FIPS) && OPENSSL_VERSION_NUMBER < 0x010001000L
|
||||
#include <openssl/fips.h>
|
||||
#endif
|
||||
@@ -50,10 +52,10 @@ class Crypto_API OpenSSLInitializer
|
||||
public:
|
||||
OpenSSLInitializer();
|
||||
/// Automatically initialize OpenSSL on startup.
|
||||
|
||||
|
||||
~OpenSSLInitializer();
|
||||
/// Automatically shut down OpenSSL on exit.
|
||||
|
||||
|
||||
static void initialize();
|
||||
/// Initializes the OpenSSL machinery.
|
||||
|
||||
@@ -71,7 +73,7 @@ protected:
|
||||
{
|
||||
SEEDSIZE = 256
|
||||
};
|
||||
|
||||
|
||||
// OpenSSL multithreading support
|
||||
static void lock(int mode, int n, const char* file, int line);
|
||||
static unsigned long id();
|
||||
@@ -82,6 +84,10 @@ protected:
|
||||
private:
|
||||
static Poco::FastMutex* _mutexes;
|
||||
static Poco::AtomicCounter _rc;
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||
static OSSL_PROVIDER* _defaultProvider;
|
||||
static OSSL_PROVIDER* _legacyProvider;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user