]> git.ipfire.org Git - thirdparty/squid.git/commit - src/client_side.cc
sslproxy_cert_adapt squid.conf option
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Sat, 21 Jan 2012 10:11:43 +0000 (12:11 +0200)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Sat, 21 Jan 2012 10:11:43 +0000 (12:11 +0200)
commitfb2178bb51a9028bbb9d848e669fd02f380134d4
tree15b36c0b1df18722f88c0bc11eddc7f29bf8dd17
parente7bcc25fbd20d1a9557f004bc67829a482848fa8
sslproxy_cert_adapt squid.conf option

This patch add the sslproxy_cert_adapt option to squid.conf which gives to
squid administrators the required functionality to "fix" a known broken
certificate using acls.
Currently only the "Not After", "Not Before" and "Common Name" fields of a
certificate can be modified/fixed.

The sslproxy_cert_adapt option has the form:
   sslproxy_cert_adapt <adaptation algorithm> acl ...
where <adaptation algorithm> is one of the setValidAfter, setValidBefore and
setCommonName.

    setValidAfter: sets the "Not After" property to the signing cert's
                   "Not After" property.
    setValidBefore: sets the "Not Before" property to the signing cert's
                   "Not After" property.
    setCommonName: sets certificate Subject.CN property to the host name
                   from specified as a CN parameter (setCommonName{CN}) or,
                   if no explicit CN parameter was specified, extracted from
                   the CONNECT request

When the acl(s) match, the corresponding adaptation algorithm is applied to
the fake/generated certificate. Otherwise, the default mimicking action takes
place.
25 files changed:
src/AclRegs.cc
src/acl/FilledChecklist.cc
src/acl/FilledChecklist.h
src/acl/SslError.cc
src/acl/SslError.h
src/acl/SslErrorData.cc
src/acl/SslErrorData.h
src/cache_cf.cc
src/cf.data.depend
src/cf.data.pre
src/client_side.cc
src/client_side.h
src/forward.cc
src/globals.h
src/ssl/certificate_db.cc
src/ssl/certificate_db.h
src/ssl/crtd_message.cc
src/ssl/crtd_message.h
src/ssl/gadgets.cc
src/ssl/gadgets.h
src/ssl/ssl_crtd.cc
src/ssl/support.cc
src/ssl/support.h
src/structs.h
src/typedefs.h