]> granicus.if.org Git - icinga2/commitdiff
Implement SNI support for the CLI commands
authorGunnar Beutner <gunnar.beutner@netways.de>
Thu, 21 Apr 2016 13:44:51 +0000 (15:44 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Thu, 12 May 2016 09:08:20 +0000 (11:08 +0200)
fixes #11651

lib/cli/pkiutility.cpp

index e80455b764bfd982f7ce4e347d22d219f1b19116..ea893e2aa98253da83b8b653523e152006bfd6cd 100644 (file)
@@ -137,7 +137,7 @@ boost::shared_ptr<X509> PkiUtility::FetchCert(const String& host, const String&
                return boost::shared_ptr<X509>();
        }
 
-       TlsStream::Ptr stream = new TlsStream(client, String(), RoleClient, sslContext);
+       TlsStream::Ptr stream = new TlsStream(client, host, RoleClient, sslContext);
 
        try {
                stream->Handshake();
@@ -201,7 +201,7 @@ int PkiUtility::RequestCertificate(const String& host, const String& port, const
                return 1;
        }
 
-       TlsStream::Ptr stream = new TlsStream(client, String(), RoleClient, sslContext);
+       TlsStream::Ptr stream = new TlsStream(client, host, RoleClient, sslContext);
 
        try {
                stream->Handshake();