]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Add ERROR messages when TLS context initialize fails
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 30 Jun 2015 15:19:58 +0000 (08:19 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 30 Jun 2015 15:19:58 +0000 (08:19 -0700)
src/cache_cf.cc

index cba6db9ec0148d5664e63e48aa34c7e9df5650d9..c68356f0afaa4bf0380e2869998a0143dea00643 100644 (file)
@@ -868,6 +868,10 @@ configDoConfigure(void)
     if (Security::ProxyOutgoingConfig.encryptTransport) {
         debugs(3, DBG_IMPORTANT, "Initializing https:// proxy context");
         Config.ssl_client.sslContext = Security::ProxyOutgoingConfig.createClientContext(false);
+        if (!Config.ssl_client.sslContext) {
+            debugs(3, DBG_CRITICAL, "ERROR: Could not initialize https:// proxy context");
+            self_destruct();
+        }
     }
 
     for (CachePeer *p = Config.peers; p != NULL; p = p->next) {
@@ -877,8 +881,12 @@ configDoConfigure(void)
             p->secure.sslDomain = p->host;
 
         if (p->secure.encryptTransport) {
-            debugs(3, DBG_IMPORTANT, "Initializing cache_peer " << p->name << " SSL context");
+            debugs(3, DBG_IMPORTANT, "Initializing cache_peer " << p->name << " TLS context");
             p->sslContext = p->secure.createClientContext(true);
+            if (!p->sslContext) {
+                debugs(3, DBG_CRITICAL, "ERROR: Could not initialize cache_peer " << p->name << " TLS context");
+                self_destruct();
+            }
         }
     }