fix(ext/tls): avoid panic for mismatched client certificate and key - #36457
Merged
bartlomieju merged 1 commit intoAug 7, 2026
Merged
Conversation
Deno Individual Contributor License AgreementAll contributors have signed the CLA. Thank you! This is an automated message from CLA Assistant |
maoyouaa
force-pushed
the
mao/fix-tls-key-cert-mismatch-panic
branch
from
August 6, 2026 15:38
2cf954e to
2922cc7
Compare
maoyouaa
marked this pull request as ready for review
August 6, 2026 15:39
bartlomieju
enabled auto-merge (squash)
August 7, 2026 07:24
bartlomieju
pushed a commit
that referenced
this pull request
Aug 27, 2026
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.
Summary
rustlsvalidation error when a client certificate and private key do not match instead of panicking through.expect().create_client_config().Deno.createHttpClient()throws aTypeErrorfor mismatched credentials.The validation error is now surfaced through the existing
TlsErrorconversion path:This prevents invalid user-provided TLS credentials from terminating the Deno process.
Testing
TypeError: keys may not be consistent: KeyMismatchwithout printing the Deno panic banner.cargo check -p deno_tls --features deno_core/quickjscargo test -p deno_tls --features deno_core/quickjsâ 3 passed; 1 doctest ignored.cargo clippy -p deno_tls --features deno_core/quickjs -- -D warningscargo fmt --all -- --checktests/unit/fetch_test.tstests/unit/fetch_test.tsgit diff --checkA full default V8-based Windows build could not be completed because Windows Developer Mode is disabled, preventing
rusty_v8from creating its required symbolic links.AI assistance: OpenAI Codex was used only to review the patch and test results.
Fixes #36380