From: Amos Jeffries Date: Tue, 30 Jun 2015 15:19:58 +0000 (-0700) Subject: Add ERROR messages when TLS context initialize fails X-Git-Tag: merge-candidate-3-v1~38^2~21^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=91667ff4e60726186e59d1fcee22e40c70878395;p=thirdparty%2Fsquid.git Add ERROR messages when TLS context initialize fails --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index cba6db9ec0..c68356f0af 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -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(); + } } }