Repository navigation
Hold the resolver's budget, keep composed stores alive, and bound idle reads in the adapters - #225
Merged
Merged
Conversation
…e reads in the adapters - A composed trust store now keeps the stores it was built from. The config memo signs a custom store by address, and the union dropped it, so after a reload the allocator could hand a new store the old address and the memo would return the config frozen with the old roots. - The verdict deadline the host sets (VerdictDeadlineMs) was stored and never read. It now reaches the resolver in the verdict context, and the live revocation checker works within the tighter of that and its own budget. - The builder capped the ALPN list at 65533 bytes, which the ClientHello's extensions block cannot always carry, so some accepted lists failed every handshake. The cap is 16384 bytes, with a test that the largest list encodes. - Indy checked ReadTimeout only before a read, so bytes that yield no application data (the server's session tickets, a key update) kept a timed read going forever. The read is now bounded by the same timeout and reports EIdReadTimeout. The loopback example covers it. - mORMot: a receive that wakes with nothing to read no longer outlives the handshake deadline, CipherList is refused instead of silently dropped, and DisableTls13 now offers TLS 1.2 alone. - Synapse: UseSystemTrust is documented as a client-role source only, which is what the build does.
…esolver the park budget - An idle Indy read that gave up on ReadTimeout raised EIdReadTimeout from the receive, which broke callers that expect Indy's own timeout to be quiet (ReadLn returns an empty line with ReadLnTimedOut set). The receive now fails with the timeout code Indy maps to its own, so each caller raises or swallows it as it would for a timeout it detected itself. The loopback example checks ReadLnTimedOut and waits on readiness rather than sleeping. - The OS live revocation resolver takes the tighter of its own budget and the one the host set for the park, as the portable checker does. - Release the transport and clock in the new cap test, and reword the ALPN cap message and the Synapse system-trust note.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
API and adapter fixes from the closing audit.
VerdictDeadlineMs) was stored and never read. It now travels to the resolver in the verdict context; the live revocation checker and the OS live resolver both work within the tighter of it and their own budget.ReadTimeoutonly before a read, so bytes that yield no application data (the server's session tickets, a key update) kept a timed read going forever, which is a cheap way to pin a worker thread. The read is now bounded by the same timeout and reports it as Indy's own timeout, soReadLnreturns an empty line withReadLnTimedOutset. The loopback example covers it and hangs without the fix. An explicit timeout passed per call is not seen by the adapter, which reads the IOHandler'sReadTimeout.CipherListis refused instead of silently dropped, andDisableTls13now offers TLS 1.2 alone (a newTls12Onlyoption shared by the adapters' option record).UseSystemTrustis documented as a client-role source only, which is what the build does.Tests: FPC x86_64 and i386 1464, Delphi Win32 1464, BoGo portable clean. The FclNet, Indy, mORMot and Synapse loopback examples build and pass under FPC. The Delphi builds of the Indy, mORMot and Synapse adapters were not run.