]> git.ipfire.org Git - thirdparty/squid.git/commit
TLS library-agnostic X509 certificate interrogation functions (#1057)
authorAlex Rousskov <rousskov@measurement-factory.com>
Fri, 20 May 2022 18:33:42 +0000 (18:33 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Fri, 20 May 2022 20:00:02 +0000 (20:00 +0000)
commit907831e6daa8d86d4b2e9cfd6e7336fcfdfbd591
tree1eef10092c27840f66fc8173d6b754a6c7c5d2f1
parent70638a6a578339356acb15717ed0138a51f9bb24
TLS library-agnostic X509 certificate interrogation functions (#1057)

Use added X509_check_issued() replacements. The only case left is in
src/ssl/gadgets.cc which is used by certificate helpers that cannot be
linked with libsecurity yet.

Use added X509_NAME_oneline() replacements, where feasible. This change
speeds up ssl_verify_cb() and other functions that used to extract and
copy certificate name into a buffer even when that name was unused
because debugging levels were not elevated enough, including by default.

Also fixes memory leak when debugging section 83 at level 3+ of an
OpenSSL-using Squid (missing name cleanup in clientNegotiateSSL()).

Also fixes a (usually symptom-free) sslcrtd bug: C strings allocated by
OpenSSL were freed by xfree() instead of OPENSSL_free().

Co-authored-by: Amos Jeffries <squid3@treenet.co.nz>
16 files changed:
src/client_side.cc
src/format/Format.cc
src/security/Certificate.cc [new file with mode: 0644]
src/security/Certificate.h [new file with mode: 0644]
src/security/ErrorDetail.cc
src/security/KeyData.cc
src/security/LockingPointer.h
src/security/Makefile.am
src/security/PeerConnector.cc
src/security/cert_generators/file/certificate_db.cc
src/security/forward.h
src/ssl/gadgets.cc
src/ssl/gadgets.h
src/ssl/stub_libsslutil.cc
src/ssl/support.cc
src/tests/stub_libsecurity.cc