]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
bug fix: assertion failed: client_side.cc:3720: "alg && param"
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Tue, 17 Apr 2012 15:21:39 +0000 (18:21 +0300)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Tue, 17 Apr 2012 15:21:39 +0000 (18:21 +0300)
Someone can hit this assertion when have two "sslproxy_cert_adapt setCommonName"
configuration lines the first with parameter but the second without parameter:
  sslproxy_cert_adapt setCommonName{toThisOne} AN_IP
  sslproxy_cert_adapt setCommonName AN_IP

Inside ConnStateData::buildSslCertGenerationParams method inside the loop
  for (sslproxy_cert_adapt *ca = Config.ssl_client.cert_adapt; ....) {...}
the second time the loop entered the param is NULL and never set because
certProperties.setCommonName is already set, so we hit the assertion.

The problem solved with removing the assertion.

src/client_side.cc

index 9381f09b5cdafbeca1cd5d8bf13b247372b6e1e2..fb5c12b6435fce86b37ee4ea0adadde1baecda2a 100644 (file)
@@ -3717,9 +3717,8 @@ void ConnStateData::buildSslCertGenerationParams(Ssl::CertificateProperties &cer
                 else if(ca->alg == Ssl::algSetValidBefore && !certProperties.setValidBefore)
                     certProperties.setValidBefore = true;
 
-                assert(alg && param);
                 debugs(33, 5, HERE << "Matches certificate adaptation aglorithm: " << 
-                       alg << " param: " << param);
+                       alg << " param: " << (param ? param : "-"));
             }
         }