]> git.ipfire.org Git - thirdparty/squid.git/commit - src/adaptation/icap/ModXact.cc
Detail client closures of CONNECT tunnels during TLS handshake (#691)
authorChristos Tsantilas <christos@chtsanti.net>
Thu, 10 Dec 2020 20:12:45 +0000 (20:12 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 23 Dec 2020 16:34:46 +0000 (16:34 +0000)
commit83b053a081c0669e510ebf41295d4b4f5ea7cc97
tree537dd1200efa1a7edcb88da76c11fc0ec845b24f
parent38da9c24e3b058566a3fd9f6f5f8e8710e13d211
Detail client closures of CONNECT tunnels during TLS handshake (#691)

... and improve detailing of other errors.

Many admins cannot triage TLS client failures, and even Squid developers
often cannot diagnose TLS problems without requiring detailed debugging
logs of failing transactions. The problem is especially bad for busy
proxies where debugging individual transactions is often impractical.

We enhance existing error detailing code so that more information is
logged via the existing %err_code/%err_detail logformat codes.
Propagating low-level error details required significant enhancements
and refactoring. We also built initial scaffolding for better error
detailing by GnuTLS-driven code and documented several key
error-handling APIs, exposing a few out-of-scope problems.

Also checkLogging() once, after consuming unparsed input attributed to a
transaction: Due to fake CONNECT requests, from-client read errors, and
possibly other complications, we may have a transaction that did not
consume every input byte available to it. That transaction is still
responsible for reporting those unparsed bytes (e.g., by logging the
number of bytes read on a connection and the number of parsed bytes).

Also fixed passing wrong (errno vs. size) or stale (requested vs. read)
I/O size to connFinishedWithConn(); now shouldCloseOnEof(). The bad
value was "correct" (i.e. zero) in many cases, obscuring the bug.

This is a Measurement Factory project
88 files changed:
configure.ac
doc/debug-sections.txt
errors/templates/error-details.txt
scripts/calc-must-ids.sh
scripts/source-maintenance.sh
src/AccessLogEntry.cc
src/AccessLogEntry.h
src/FwdState.cc
src/FwdState.h
src/HttpRequest.cc
src/HttpRequest.h
src/LogTags.cc
src/LogTags.h
src/Makefile.am
src/Pipeline.cc
src/Pipeline.h
src/acl/AclDenyInfoList.h
src/acl/FilledChecklist.h
src/acl/Gadgets.h
src/acl/SquidError.cc
src/acl/SquidError.h
src/acl/SquidErrorData.cc
src/acl/SquidErrorData.h
src/adaptation/icap/ModXact.cc
src/adaptation/icap/ModXact.h
src/adaptation/icap/Xaction.cc
src/adaptation/icap/Xaction.h
src/base/TextException.cc
src/base/TextException.h
src/client_side.cc
src/client_side.h
src/client_side_request.cc
src/client_side_request.h
src/clients/Client.cc
src/clients/FtpClient.cc
src/clients/FtpClient.h
src/clients/FtpGateway.cc
src/clients/FtpRelay.cc
src/comm/Read.cc
src/err_detail_type.h [deleted file]
src/error/Detail.cc [new file with mode: 0644]
src/error/Detail.h [new file with mode: 0644]
src/error/Error.cc [new file with mode: 0644]
src/error/Error.h [new file with mode: 0644]
src/error/ExceptionErrorDetail.h [new file with mode: 0644]
src/error/Makefile.am [new file with mode: 0644]
src/error/SysErrorDetail.h [new file with mode: 0644]
src/error/forward.h [moved from src/err_type.h with 84% similarity]
src/errorpage.cc
src/errorpage.h
src/esi/Context.h
src/format/Format.cc
src/http.cc
src/http/Stream.cc
src/http/Stream.h
src/log/access_log.cc
src/log/forward.h
src/mk-string-arrays.awk
src/security/ErrorDetail.cc [new file with mode: 0644]
src/security/ErrorDetail.h [new file with mode: 0644]
src/security/Io.cc [new file with mode: 0644]
src/security/Io.h [new file with mode: 0644]
src/security/KeyData.cc
src/security/LockingPointer.h
src/security/Makefile.am
src/security/PeerConnector.cc
src/security/PeerConnector.h
src/security/PeerOptions.cc
src/security/ServerOptions.cc
src/security/Session.cc
src/security/forward.h
src/servers/FtpServer.cc
src/servers/Server.cc
src/servers/Server.h
src/ssl/ErrorDetail.cc
src/ssl/ErrorDetail.h
src/ssl/ErrorDetailManager.h
src/ssl/PeekingPeerConnector.cc
src/ssl/PeekingPeerConnector.h
src/ssl/cert_validate_message.cc
src/ssl/cert_validate_message.h
src/ssl/support.cc
src/ssl/support.h
src/tests/stub_HttpRequest.cc
src/tests/stub_liberror.cc [new file with mode: 0644]
src/tests/stub_libhttp.cc
src/tests/stub_libsecurity.cc
src/tests/stub_libsslsquid.cc