Skip to content

feat: harden TLS 1.3 client boundaries and certificate parsing - #1

Merged
takeokunn merged 45 commits into
mainfrom
takeokunn-tls13-handshake
Oct 4, 2026
Merged

takeokunn merged 45 commits into
mainfrom
takeokunn-tls13-handshake

Conversation

@takeokunn

@takeokunn takeokunn commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Harden the QUIC TLS boundary to the contract levels :initial, :handshake, and :application; accept legacy :1-rtt as an alias.
  • Use crypto-kit CSPRNG defaults for ClientHello random and session ID, and reject invalid ServerHello choices and downgrade sentinels.
  • Harden X.509 parsing and verification with strict DER/PEM validation, bounded certificate input/depth/chain size, critical Name Constraints rejection for unsupported GeneralName types, and matching TBSCertificate/outer signature algorithms.
  • Run native Nix checks and evaluate all flake systems with nix flake check --all-systems --no-build in CI.

Verification evidence

  • Local nix-check.sh -> nix flake check --all-systems: exit 0.
  • Local targeted X.509/security tests: exit 0 (basic-pass), including strict DER length/depth/high-tag, invalid PEM, chain limits, critical Name Constraints, and signature algorithm mismatch rejection.
  • New head: 6fcf680, signed; git diff --check: exit 0.
  • Ubuntu 24.04 CI pass: run 37094402348, job 111121252665; run 37094400477, job 111121246585.
  • Lisp CI pass: run 37094402160, job 111121251526; run 37094400474, job 111121246393.

The macOS jobs remain queued on GitHub; the workflow macOS matrix and QUIC public API were not changed.

@takeokunn

Copy link
Copy Markdown
Contributor Author

追加更新(commit c66ae44): tls-client-read が受信 fatal alert を tls-client-alert-error として通知し、close_notify で closed 遷移、受信 KeyUpdate を provider callback にルーティングするようになりました。nix-check.sh は exit 0、Nix log は 8 groups passed; RFC 8448 Simple 1-RTT: PASS です。残課題は provider-independent full handshake driver と OpenSSL 3 suites x 2 groups の E2E matrix です。

@takeokunn

Copy link
Copy Markdown
Contributor Author

追加更新(commit 35fd982): src/client-driver.lisp に provider の handshake callback に依存しない進行ドライバを追加しました。ClientHello/key_share、HRR、ServerHello、handshake secret、server Finished 検証、client Finished 送出を実装し、driver startup テストを追加。nix-check.sh は exit 0、Nix log は 9 groups passed; RFC 8448 Simple 1-RTT: PASS。残りは record-layer transport 統合、証明書/CertificateVerify の実 handshake 接続、OpenSSL E2E matrix です。

@takeokunn
takeokunn merged commit 101e4e7 into main Oct 4, 2026
4 checks passed
@takeokunn
takeokunn deleted the takeokunn-tls13-handshake branch October 4, 2026 05:55
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