]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Prevent unused ssl_crtd helpers being run
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 18 May 2015 12:50:03 +0000 (05:50 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 18 May 2015 12:50:03 +0000 (05:50 -0700)
The conditions for when to start ssl_crtd helpers was ignoring the
generate-host-certificates=off option. Meaning most ssl-bump installs
were running them needlessly.

src/ssl/helper.cc

index 511643239f07e6ca18824d23b1f74d1c52ff9f6d..1331f70b56f3cde41b1fcb00bf1b341acf3e7d5f 100644 (file)
@@ -41,12 +41,13 @@ void Ssl::Helper::Init()
 {
     assert(ssl_crtd == NULL);
 
-    // we need to start ssl_crtd only if some port(s) need to bump SSL
+    // we need to start ssl_crtd only if some port(s) need to bump SSL *and* generate certificates
+    // TODO: generate host certificates for SNI enabled accel ports
     bool found = false;
     for (AnyP::PortCfgPointer s = HttpPortList; !found && s != NULL; s = s->next)
-        found = s->flags.tunnelSslBumping;
+        found = s->flags.tunnelSslBumping && s->generateHostCertificates;
     for (AnyP::PortCfgPointer s = HttpsPortList; !found && s != NULL; s = s->next)
-        found = s->flags.tunnelSslBumping;
+        found = s->flags.tunnelSslBumping && s->generateHostCertificates;
     if (!found)
         return;