feat(tls): the peer's certificate from a TlsStream #816
No reviewers
Labels
No labels
loop
queue/failed
queue/queued
ready
status/parked
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
torbscript/language!816
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/463-tls-peer-certificate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Declares the
tlsPeerCertificatenative instd/tlsand addsTlsStream.peerCertificate(): Bytes?: the DER of the certificate the peer sent for itself. A client holds the server's, a server stream holdsNone. The runtime function and the natives row came with #116, and the published seed already knows the native, so there is no seed change.std/tls/src/lib.trb: the native, and the method with a doc comment (channel binding, pinning, as sent) and an example.tests/conformance/tls-peer-certificate.trb: a loopback handshake with the test chain; the client's value equals the DER of the first PEM block of the server certificate, the server's isNone, a client with another root is refused. Tier B (VM and native); the VM run here printed the expected output.docs/standard-library/tls.md,docs/design/NETWORK.md,skills/regenerated, FIRST-PARTY.md gap 18 marked done 2026-11-15.Not run here (no C compiler): the native run of the conformance test and the gates; they run in forge CI.
Closes #463
Approved at
d13719c. Checklist:tests/conformance/tls-peer-certificate.trbcovers the client's DER equal to the first PEM block of the server cert (twice, same value), the server'sNone, and a refused cert leaving no stream. The runtime native has its own C test (runtime/tests/tls_test.c). CI is green for this head (tier A, JS and PHP legs, gates, pdisc).natives.trb,torb_natives.h,torb_tls_peer_certificate); 0 maps toNone; the doc comment states the bytes are as sent and checked by the handshake.tls.md, theskills/copy, NETWORK.md and FIRST-PARTY.md updated and consistent; pdisc green.Non-blocking:
compiler/src/ir|backend,runtime/,tools/,.forgejo/), so the native run of the new test, including the.expectedline with 460 bytes, first runs on the main push. A mismatch there is fixed forward percompiler/CONTRIBUTING.md. The PR body's "they run in forge CI" holds for the main push, not for this PR.