Update CertReloader.cpp

This commit is contained in:
alexey-milovidov 2021-07-07 01:20:14 +03:00 committed by GitHub
parent f3c8821919
commit 6007ea9423
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,8 +51,8 @@ void CertReloader::reload(const Poco::Util::AbstractConfiguration & config)
LOG_INFO(log, "Reloading cert({}), key({})", cert_file, key_file);
{
std::unique_lock lock(mutex);
key.reset(new Poco::Crypto::RSAKey("", key_file));
cert.reset(new Poco::Crypto::X509Certificate(cert_file));
key = std::make_unique<Poco::Crypto::RSAKey>("", key_file);
cert = std::make_unique<Poco::Crypto::X509Certificate>(cert_file);
}
LOG_INFO(log, "Reloaded cert {}", cert_file);
}