mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
parent
70ae037324
commit
17003d0157
@ -183,7 +183,7 @@ int PkiUtility::RequestCertificate(const String& host, const String& port, const
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
shared_ptr<SSL_CTX> sslContext = make_shared<SSL_CTX>();
|
shared_ptr<SSL_CTX> sslContext;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
sslContext = MakeSSLContext(certfile, keyfile);
|
sslContext = MakeSSLContext(certfile, keyfile);
|
||||||
@ -204,7 +204,7 @@ int PkiUtility::RequestCertificate(const String& host, const String& port, const
|
|||||||
|
|
||||||
shared_ptr<X509> peerCert = stream->GetPeerCertificate();
|
shared_ptr<X509> peerCert = stream->GetPeerCertificate();
|
||||||
|
|
||||||
shared_ptr<X509> trustedCert = make_shared<X509>();
|
shared_ptr<X509> trustedCert;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
trustedCert = GetX509Certificate(trustedfile);
|
trustedCert = GetX509Certificate(trustedfile);
|
||||||
|
@ -42,7 +42,7 @@ REGISTER_STATSFUNCTION(ApiListenerStats, &ApiListener::StatsFunc);
|
|||||||
void ApiListener::OnConfigLoaded(void)
|
void ApiListener::OnConfigLoaded(void)
|
||||||
{
|
{
|
||||||
/* set up SSL context */
|
/* set up SSL context */
|
||||||
shared_ptr<X509> cert = make_shared<X509>();
|
shared_ptr<X509> cert;
|
||||||
try {
|
try {
|
||||||
cert = GetX509Certificate(GetCertPath());
|
cert = GetX509Certificate(GetCertPath());
|
||||||
} catch (const std::exception&) {
|
} catch (const std::exception&) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user