Skip to content

Add typed TLS 1.3 cipher list APIs - #588

Open
nox wants to merge 2 commits into
cloudflare:masterfrom
nox:nox/tls13-cipher-list
Open

nox wants to merge 2 commits into
cloudflare:masterfrom
nox:nox/tls13-cipher-list

Conversation

@nox

@nox nox commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Tls13CipherList represents ordered TLS 1.3 cipher preference groups and converts them into BoringSSL’s parallel cipher ID and flag arrays.

Safe context and per-connection setters expose direct TLS 1.3 cipher configuration while leaving identifier validation to BoringSSL.

SslCipherId debug output now uses recognized cipher names and preserves unknown values as typed hexadecimal identifiers.

This allows callers to omit ChaCha20 without applying a broad compliance policy, addressing #500.

nox added 2 commits December 4, 2026 14:44
`Tls13CipherList` converts preference groups into the parallel cipher ID
and flag arrays expected by BoringSSL. Context and per-connection
setters apply the list while leaving cipher ID validation to BoringSSL.
Debug output reconstructs preference groups instead of exposing storage.

@clanky-the-clanker clanky-the-clanker Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approved — No issues found: the new FFI calls pass arrays of equal length and are sound for empty lists, and the tests cover the new behaviour.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

🔒 Security: ✅ LGTM

No security issues found.


📖 AGENTS.md: ✅ LGTM

This pull request does not change any agent instruction files.


📋 Code Quality: ✅ LGTM

Tls13CipherList::new builds the ids and flags arrays to the same length. The Debug impl rebuilds the same groups from the flags. Both setters are sound for empty lists, cast the pointer correctly through repr(transparent), and return failures as an ErrorStack through cvt. The tests cover the Debug output, a handshake, rejection of invalid ids, and the empty list.


📝 Documentation: ✅ LGTM

The doc comments on the new APIs are accurate.


Reviewed commit: 6a0c7c6e

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant