Skip to content

Adapt native TLS extensions to Boring 5.4.0 - #5

Merged
yiguodev merged 2 commits into
releasefrom
chore/boring-5.4.0
Nov 2, 2026
Merged

yiguodev merged 2 commits into
releasefrom
chore/boring-5.4.0

Conversation

@yiguodev

@yiguodev yiguodev commented Nov 2, 2026 •

Copy link
Copy Markdown

Summary

The upstream 5.4.0 sync is already in release, but its BoringSSL update makes the existing opt-in native patches fail to apply. This change restores the fork extensions on the new baseline.

upstream v5.4.0 (original commits preserved)
└── release: f3f2ef58
    └── native extension adaptation and regression coverage

Adapt native handles to SSLImpl/FromOpaque while retaining the public C ABI and existing authentication and cleanup behavior. Configure fixed TLS 1.3 cipher preferences through the new native API. Keep fixed-profile signature vectors and conditional padding, while leaving the unconfigured upstream path unchanged. Add a Chrome120 ticket-resumption regression for padding and the real PSK binder.

The PR contains only the fork adaptation and can be squash merged; the upstream sync is already part of its base.

Evidence

  • Before: the old fixed-profile patch fails to apply against BoringSSL 0.20261020.0; the initial migration also exposed the new native signature-algorithm GREASE value in fixed-profile wire assertions.
    After: the updated patches apply, compile and retain the existing wire assertions. Fixed-profile behavior and the unconfigured upstream behavior remain separate.
  • Executed on macOS ARM64 with memory-only peers:
    • Boring full-extension protocol/profile/HKDF tests: 49 passed.
    • Tokio full-extension memory-handshake tests: 25 passed. The Chrome120 PSK test captures actual ClientHello writes, asserts zero-filled padding to 512 bytes with PSK last, and completes both resumed and rejected-ticket handshakes against real tickets.
    • Native SSLTest.JlsCredentials*: 5 passed.
    • Default AEAD/HKDF: 18/9 passed.
    • Extension isolation without fingerprints: 18 passed; fingerprint-only: 14 passed.
    • Default Tokio/Hyper checks, library and selected-fingerprint test Clippy with -D warnings, rustfmt and diff checks passed.
    • A local-path Vole consumer: 14 focused memory regressions passed, covering 112 ClientHello samples, REALITY configuration and shares, warm/expired tickets, quiche WebPKI/pins/mTLS/ECH and ALPS.

No container interoperability, pressure, full downstream ABI/TUN, independent Git-source build, cross-target or device validation is claimed.

Merge Danger

Door: two-way

The adaptation is isolated from the upstream-sync commit. Reverting it restores the known extension-build failure on that baseline.

Blast Radius: TLS

Named profiles, REALITY, ShadowTLS v3 and JLS share native handshake state. Keep downstream integration and platform validation separate from these memory-only checks.

Copilot AI balanced review requested due to automatic review settings November 2, 2026 15:37
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T15:59:43.222861Z f73406e New commits
🔒 Security Review ✅ Completed 2026-11-02T16:01:17.304150Z f73406e New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI 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.

🟡 Changes recommended

The regression test verifies session reuse but never checks ClientHello padding presence or length, so incorrect or omitted padding on resumed connections would go undetected.

1 open issue
What changed in this PR

Adapts the fork’s opt-in native TLS extensions to the Boring 5.4.0 baseline while preserving the public C ABI and separating fixed-profile behavior from upstream defaults.

Changes:

  • Updates native patches for SSLImpl/FromOpaque and the TLS 1.3 cipher configuration API.
  • Retains fixed-profile signature lists and conditional padding.
  • Adds Chrome120 ticket-resumption coverage and updates baseline documentation.
File Description
tokio-boring/​tests/​selected_fingerprint.rs Shares ticket-resumption checks across Chrome133 and Chrome120.
docs/​reality-client.md Updates the documented fork baseline.
docs/​client-fingerprint.md Documents the Boring and BoringSSL baselines.
boring-sys/​patches/​shadow-tls-v3.patch Adapts ShadowTLS v3 to native handle changes.
boring-sys/​patches/​reality-client.patch Rebases REALITY hooks onto updated native internals.
boring-sys/​patches/​jls-client.patch Adapts JLS hooks and credential tests.
boring-sys/​patches/​client-fingerprint.patch Updates cipher configuration, signature GREASE handling, and padding.
.gitattributes Disables whitespace checks for native patch files.

Review effort: Balanced

@yiguodev
yiguodev merged commit c717137 into release Nov 2, 2026
1 check passed
@yiguodev
yiguodev deleted the chore/boring-5.4.0 branch November 2, 2026 16:18
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.

2 participants