Repository navigation
A handshake that never completes no longer holds a request for good, and a
private CA can be trusted alongside the default store. It is a patch release, so
a dependency written as a caret range, tinyhttps = "^0.3.1", resolves to it;
the one change in behaviour, a handshake slower than connectTimeoutMs now
failing, is the end of a hang rather than a new failure mode, and is described
below.
TLS handshake time limit
#25. The TLS handshake is
bounded by connectTimeoutMs. It had no limit: after the
TCP connection was up, a server (or an https:// proxy) that accepted it and never
sent its ServerHello held send, send_stream and download_to_file for good
unless the caller passed a stop token.
- The handshake gives up once
connectTimeoutMshas passed since it began, and
statusTextisTLS handshake timed out. This covers the handshake with the
target, with an https:// proxy, and with the target inside an https:// proxy's
tunnel. The limit is on the handshake as a whole, so a peer that sends a byte
at a time does not hold it open. - Behaviour change: a handshake slower than
connectTimeoutMs(10 s by default)
now fails where it used to complete. Each step of setting up a connection (the
TCP connect, a proxy's reply, a handshake) hasconnectTimeoutMsto itself, so
the whole can take several times that. TlsSocket::connectbounds the handshake with thetimeoutMsit already
took for the TCP connect, so a caller of it directly sees the change too.TlsSocket::connect_overtakes a trailinghandshakeTimeoutMs,-1(the
default) for no limit; a call by name compiles unchanged, a pointer to it needs
the new parameter in its type.Socketgainsset_deadline,deadline_hit
andwait_before_recv.
Extra CA certificates
#24. HttpClientConfig::extraCaFile is a path to a PEM file whose certificates are
trusted in addition to the default store, which SSL_CERT_FILE can only replace.
It is for a private CA or a proxy that re-signs TLS.
- It applies wherever a trust store is built: the target, and the connection to
anhttps://proxy. - A file that cannot be read or holds no certificate fails the connection, and
statusTextnames the file. proxy_tunneltakes the path as a trailing default argument, andTlsSocket
gainsset_extra_ca_file. Nothing changes while the field is empty.
CI
- The openkal job on Windows asks Git for Windows where its CA bundle is; 2.56
moved it frommingw64/toucrt64/, and the job failed before it ran. - The Windows job runs
test_handshake_timeoutandtest_extra_cawith the
other hermetic tests.