]> git.ipfire.org Git - thirdparty/squid.git/commit - src/client_side.cc
Ssl certificate domain mismatch errors on IP-based URLs
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Tue, 17 Apr 2012 16:08:41 +0000 (19:08 +0300)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Tue, 17 Apr 2012 16:08:41 +0000 (19:08 +0300)
commit35cd42816e3f869a37804485776489d18955336f
tree2ebe93983202b2d3ba65f2b4e6c71723ef83b5f4
parent8f9720ce9dc744856f97b4afa004c73dd8dd14eb
Ssl certificate domain mismatch errors on IP-based URLs

The ssl::certDomainMismatch acl can not be used with ip-based urls. For example
let's assume that a user enters https://74.125.65.99/, using a Google IP addressin the URL instead of www.google.com. If the sslBump used with
"sslproxy_cert_error allow all" and "sslproxy_cert_adapt setCommonName ssl::certDomainMismatch"
the browser displays a browser "Server's certificate does not match the URL"
error.

This is because for all cases we have the ip address instead of the hostname
we are detecting the cert domain mismatch errors when the first GET request
comes. At the time the sslproxy_cert_adatp access list processed the error is
not detected yet.
For intercepted connections this is the desired behaviour.

This patch fix the ssl-bump-first to check for domain-mismatch errors while
retrieving the SSL certificate from the server, hoping that CONNECT is using
a user-entered address (a host name or a user-entered IP).
src/client_side.cc
src/forward.cc