]> git.ipfire.org Git - thirdparty/squid.git/commit - src/client_side.cc
sslBump: Send intermediate CA
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Thu, 27 Oct 2011 15:27:25 +0000 (18:27 +0300)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Thu, 27 Oct 2011 15:27:25 +0000 (18:27 +0300)
commita594dbfa3c8960e7fc2a3c9a9fcd848c5242dbac
tree55ee970dedecfe6c0a0c52950e2e00cfa7be138f
parent1febfec51b9da17884192e692c4c7bc7534bd0dc
sslBump: Send intermediate CA

SslBump code assumed that it is signing generated certificates with a root CA
certificate. Root certificates are usually not sent along with the server
certificates because clients must have them independently installed or
built-in. Squid was not sending the signing certificate.

In many environments, Squid signing certificate is intermediate (i.e., it
belongs to a non-root CA). If Squid does not send that intermediate signing
certificate with the generated one, the client will not be able to establish a
complete chain of trust from the generated fake to the root CA certificate,
leading to errors.

With this change, Squid may send the signing certificate (along with the
generated one) using the following rules:

   * If the configured signing certificate is self-signed,
     then just send the generated certificate alone.
     Note that root CA certificates are self-signed (by root CA).

   * Otherwise (i.e., if the configured signing certificate is an intermediate
     CA certificate), send both the intermediate CA and the generated fake
     certificate.

   * If Squid sends the intermediate CA certificate, Squid also sends
     all other certificates from the "cert=" file, Sending a chain with
     multiple intermediate CA certificates may be required when the Squid
     signing certificate was signed by another intermediate CA.

This is a Measurement Factory Project
src/ProtoPort.h
src/cache_cf.cc
src/client_side.cc
src/ssl/gadgets.cc
src/ssl/gadgets.h
src/ssl/support.cc
src/ssl/support.h