Repository navigation
webtransport: port in :authority, any 2xx opens a session, exportKeyingMaterial - #50
Merged
Merged
Conversation
…ngMaterial Three things porth's web-platform-tests run found in a client: - The CONNECT's :authority was the host alone. It now carries the port unless that is 443, and brackets an IPv6 host. - Only a 200 opened a session. Any 2xx does (RFC 9114 section 4.4). - exportKeyingMaterial on ClientSession and Session, the exporter of draft-ietf-webtrans-http3 section 4.8, over a TLS exporter (RFC 8446 section 7.5) that Connection keeps the secret for past the handshake's release. Assisted-by: Fable 5.2
It exported for any id, so a closed or mistyped session got keying material nobody else could derive. The 2xx rule is draft-ietf-webtrans-http3 §3.2's, not RFC 9114 §4.4's, which is about a plain CONNECT. The exporter is written up in SPEC, with the caveat that no other implementation's export has been compared. Assisted-by: Claude Fable 5.2
Assisted-by: Claude Fable 5.2
…t is not sent Assisted-by: Claude Fable 5.2
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.
Three things porth's web-platform-tests run found in a WebTransport client. One commit, 187 lines added across five source files plus the changelog and a spec note.
What changes
:authoritycarries the port. The CONNECT named the host alone. It now adds the port unless that is 443, and brackets an IPv6 host (authorityOfinsrc/event_loop.zig).Clientkeeps the configured port for this.200did, so a204was reported assession_rejected(src/webtransport/session.zig).exportKeyingMaterial. New onClientSessionandSession, by draft-ietf-webtrans-http3 section 4.8: a TLS exporter labelledEXPORTER-WebTransport, its context the session id followed by the application's label and context, each behind a length byte. Beneath it:KeySchedulederivesexporter_master_secretalongside the application traffic secrets (src/quic/tls13.zig).tls13.exportKeyingMaterialis RFC 8446 section 7.5's exporter, SHA-256 only, up to 255 * 32 bytes.Connectioncopies the secret when the application keys install, so it outlives the handshake's release, and exposesConnection.exportKeyingMaterialfor any QUIC connection.Worth a reviewer's eye
SPEC/webtransport_w3c_api.mdhadexportKeyingMaterial()as "skip until a second engine wants it". This PR implements it anyway, for porth, and rewrites that row. Say if the skip should stand.authorityOffalls back to the bare host when the result would not fit its buffer (253 bytes of host plus brackets and port).computed_appis true. A path that completes the handshake without reaching that block would leaveexportKeyingMaterialreturningerror.NotReady.Tests
New unit tests:
authorityOf: port, 443, IPv6 with and without brackets.exportKeyingMaterial: the two HKDF steps against std'shkdfExpandLabel, and the length and label limits.204.Run on Windows only (zig 0.17.1):
zig build test: the new tests pass. One full run had 1 failure in 1382 and the rerun had none, so that one is intermittent; I did not catch which test it was.connect.httpsfailures and the 15export-keying-materialones pass, with no other test changing.Not run: macOS, Linux, the interop runner, and routez's e2e suite.
🤖 Generated with Claude Code