From: Christos Tsantilas Date: Tue, 17 Apr 2012 15:21:39 +0000 (+0300) Subject: bug fix: assertion failed: client_side.cc:3720: "alg && param" X-Git-Tag: BumpSslServerFirst.take08~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f9720ce9dc744856f97b4afa004c73dd8dd14eb;p=thirdparty%2Fsquid.git bug fix: assertion failed: client_side.cc:3720: "alg && param" 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. --- diff --git a/src/client_side.cc b/src/client_side.cc index 9381f09b5c..fb5c12b643 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -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 : "-")); } }