From: Alex Rousskov Date: Thu, 7 Jun 2012 17:46:16 +0000 (-0600) Subject: Start ssl_crtd even if only https_port(s) are configured to bump SSL. X-Git-Tag: BumpSslServerFirst.take09~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=24e6c8f188b81680e71fe1daaeb314cd69d044df;p=thirdparty%2Fsquid.git Start ssl_crtd even if only https_port(s) are configured to bump SSL. The right code was deleted during a recent trunk merge. --- diff --git a/src/ssl/helper.cc b/src/ssl/helper.cc index 0e25854d8e..18414d2439 100644 --- a/src/ssl/helper.cc +++ b/src/ssl/helper.cc @@ -28,15 +28,13 @@ void Ssl::Helper::Init() { assert(ssl_crtd == NULL); - bool useSslBump = false; - for (AnyP::PortCfg *s = ::Config.Sockaddr.http; s; s = s->next) { - if (s->sslBump) { - useSslBump = true; - break; - } - } - - if (!useSslBump) + // we need to start ssl_crtd only if some port(s) need to bump SSL + bool found = false; + for (AnyP::PortCfg *s = ::Config.Sockaddr.http; !found && s; s = s->next) + found = s->sslBump; + for (AnyP::PortCfg *s = ::Config.Sockaddr.https; !found && s; s = s->next) + found = s->sslBump; + if (!found) return; ssl_crtd = new helper("ssl_crtd");