]> granicus.if.org Git - icinga2/commitdiff
Fix return value in PkiUtility
authorJean Flach <jean-marcel.flach@netways.de>
Thu, 26 Nov 2015 10:10:55 +0000 (11:10 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Thu, 26 Nov 2015 10:19:33 +0000 (11:19 +0100)
refs #10632

lib/cli/pkiutility.cpp

index b1003665df32c7afd886727a8bf0f0e0f68f2480..2080dede7c24e72b42781c9ed092b504ab21db1c 100644 (file)
@@ -122,7 +122,7 @@ boost::shared_ptr<X509> PkiUtility::FetchCert(const String& host, const String&
                    << "Cannot connect to host '" << host << "' on port '" << port << "'";
                Log(LogDebug, "pki")
                    << "Cannot connect to host '" << host << "' on port '" << port << "':\n" << DiagnosticInformation(ex);
-               return NULL;
+               return boost::shared_ptr<X509>();
        }
 
        boost::shared_ptr<SSL_CTX> sslContext;
@@ -134,7 +134,7 @@ boost::shared_ptr<X509> PkiUtility::FetchCert(const String& host, const String&
                    << "Cannot make SSL context.";
                Log(LogDebug, "pki")
                    << "Cannot make SSL context:\n"  << DiagnosticInformation(ex);
-               return NULL;
+               return boost::shared_ptr<X509>();
        }
 
        TlsStream::Ptr stream = new TlsStream(client, String(), RoleClient, sslContext);