]> git.ipfire.org Git - thirdparty/squid.git/commit - src/security/PeerConnector.h
Fetch missing certificates.
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 22 Oct 2015 18:34:42 +0000 (12:34 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Thu, 22 Oct 2015 18:34:42 +0000 (12:34 -0600)
commit55369ae649646901d3038c63217386174d01eb7b
treeb0a30d9180f6cbc601c283a6cf30bacaef26cfff
parent8103fa6626dacffe936537354373c495e7de0696
Fetch missing certificates.

Many web servers do not have complete certificate chains. Many browsers
use certificate extensions of the server certificate and download the
missing intermediate certificates automatically from the Internet.

This patch adds a similar feature to Squid:
   - Parse Server Hello messages and extract certificates chain.
   - Check whether the issuers of each certificate exist in the chain.
   - If not, retrieve the issuer certificate URI from Authority Info
     extension of the certificate (if it is provided) and download the
     certificate.
   - Store downloaded certificates in Squid object cache, just like any
     other HTTP object.

Implementation highlights:
  - A new Downloader class allows Squid subsystems to download objects
    via HTTP. These downloads are not backed by a proxy user.
  - Add support for an internal database of intermediate pre-loaded
    certificates to be used to complete incomplete chains.
  - Ssl::HandshakeParser parses TLS records and TLS Handshake messages.
  - Ssl::PeerConnector now uses the Downloader objects to download
    missing certificates.
16 files changed:
src/Downloader.cc [new file with mode: 0644]
src/Downloader.h [new file with mode: 0644]
src/Makefile.am
src/SquidConfig.h
src/cache_cf.cc
src/cf.data.pre
src/client_side.cc
src/client_side.h
src/client_side_reply.cc
src/client_side_request.cc
src/ssl/PeerConnector.cc
src/ssl/PeerConnector.h
src/ssl/bio.cc
src/ssl/bio.h
src/ssl/support.cc
src/ssl/support.h