mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 11:31:53 +01:00
Crypto: complete merge to 1.4.2
This commit is contained in:
@@ -50,35 +50,25 @@ namespace Poco {
|
||||
namespace Crypto {
|
||||
|
||||
|
||||
int CipherFactory::_instanceCount = 0;
|
||||
|
||||
|
||||
CipherFactory::CipherFactory()
|
||||
{
|
||||
if (_instanceCount == 0)
|
||||
{
|
||||
OpenSSL_add_all_algorithms();
|
||||
ERR_load_crypto_strings();
|
||||
}
|
||||
++_instanceCount;
|
||||
}
|
||||
|
||||
|
||||
CipherFactory::~CipherFactory()
|
||||
{
|
||||
--_instanceCount;
|
||||
if (_instanceCount == 0)
|
||||
{
|
||||
ERR_free_strings();
|
||||
EVP_cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
static Poco::SingletonHolder<CipherFactory> holder;
|
||||
}
|
||||
|
||||
|
||||
CipherFactory& CipherFactory::defaultFactory()
|
||||
{
|
||||
static Poco::SingletonHolder<CipherFactory> holder;
|
||||
return *holder.get();
|
||||
return *holder.get();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user