]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix undefined symbols in rev.12766
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 24 Apr 2013 15:14:26 +0000 (09:14 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 24 Apr 2013 15:14:26 +0000 (09:14 -0600)
The code changes to prevent several useless allocations on missing
sslproxy_cert_error directive left a few lines out of place.
Shuffle cert.sslErrors setup back to the original code sequence and
define allowDomainMismatch early as false for the default handling.

src/client_side.cc

index 34f330b7aced26c90f2938fdd0c3221ad634a2bd..1c1bb940247cf303d2d48d397c7095820c29dab8 100644 (file)
@@ -2619,13 +2619,14 @@ bool ConnStateData::serveDelayedError(ClientSocketContext *context)
             debugs(33, 2, "SQUID_X509_V_ERR_DOMAIN_MISMATCH: Certificate " <<
                    "does not match domainname " << request->GetHost());
 
+            bool allowDomainMismatch = false;
             if (Config.ssl_client.cert_error) {
                 ACLFilledChecklist check(Config.ssl_client.cert_error, request, dash_str);
-                const bool allowDomainMismatch = (check.fastCheck() == ACCESS_ALLOWED);
+                check.sslErrors = new Ssl::Errors(SQUID_X509_V_ERR_DOMAIN_MISMATCH);
+                allowDomainMismatch = (check.fastCheck() == ACCESS_ALLOWED);
                 delete check.sslErrors;
                 check.sslErrors = NULL;
             }
-            check.sslErrors = new Ssl::Errors(SQUID_X509_V_ERR_DOMAIN_MISMATCH);
 
             if (!allowDomainMismatch) {
                 quitAfterError(request);