]> git.ipfire.org Git - thirdparty/squid.git/commit
Use the right certificate when detailing SSL certificate validation errors.
authorMathias Fischer <maf@open.ch>
Thu, 24 Nov 2011 06:12:49 +0000 (23:12 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 24 Nov 2011 06:12:49 +0000 (23:12 -0700)
commitdfe83d9ff3809facacdcc8e974906b381b44b602
treeb6b4c4634daf0d3cee9835b685daaad7be07cf2b
parente041d00417187368df7f8cf788db2084dd0a619c
Use the right certificate when detailing SSL certificate validation errors.

When an _intermediate_ SSL server certificate fails validation, we should
report errors using information in that certificate and not in the top-level
"peer" certificate. Otherwise, our details may make no sense. For example, we
may say that the validation failed due to the expired certificate and then show
an expiration date in the future (because the top-level certificate did not
expire but the intermediate certificate did).

OpenSSL X509_STORE_CTX_get_current_cert() returns the certificate that was
being tested when our certificate validation callback was called.
src/ssl/support.cc