Conversation
Clients without a matching SNI can reject a dual-certificate default when its last certificate has an incompatible key type. Select the existing typed star entry after name and address misses, leaving native dual-certificate selection unchanged and testing both orders with TLS 1.2 and TLS 1.3. This also honors a default tunnel action for transparent connections.
Contributor
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 2
Open (3)
A 10-second timeout can be flaky on slower/loaded CI hosts, especially since this runs multiple… · Newopenssl s_client -briefoutput commonly usesPeer signature type:(and may vary across OpenSSL… · New The test hard-codes the total case count (12), which will break if the helper’s matrix changes… · New
What changed in this PR
Adds regression coverage and a fallback certificate-context selection path to ensure BoringSSL serves an RSA or ECDSA default certificate that matches the client’s constrained signature algorithms when SNI lookup misses.
Changes:
- Add a gold test that probes default vs named certificate selection across TLS 1.2/1.3, RSA/ECDSA, and multiple SNI scenarios using
openssl s_client -sigalgs. - Add two replay definitions to exercise dual-certificate default selection with both RSA→EC and EC→RSA certificate ordering.
- Update
TLSCertSwitchSupport::selectCertificateto fall back to the stored*context for the requested key type when name and destination lookups miss.
| File | Description |
|---|---|
| tests/gold_tests/tls/tls_dual_cert_default_client.py | New helper client that validates selected cert/key type under restricted signature algorithms. |
| tests/gold_tests/tls/tls_dual_cert_default.test.py | New gold test wiring replay + helper client validation for both cert orders. |
| tests/gold_tests/tls/replay/dual_cert_default_rsa_ec.replay.yaml | Replay covering RSA-first dual-cert default configuration. |
| tests/gold_tests/tls/replay/dual_cert_default_ec_rsa.replay.yaml | Replay covering EC-first dual-cert default configuration. |
| src/iocore/net/TLSCertSwitchSupport.cc | Adds wildcard (*) fallback selection by key type when other lookups miss. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Author
|
[approve ci autest 2] |
Contributor
Author
|
[approve ci autest 2] |
bryancall
self-requested a review
September 28, 2026 22:32
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.


With BoringSSL, a default entry containing RSA and EC certificates serves only the last certificate to clients with no SNI or an unknown SNI. Clients restricted to the other key type fail with
handshake_failure, despite a compatible certificate being configured.After name and address lookups miss, select the existing
*entry for the client’s key type. This reuses the entries maintained by certificate loading and secret updates; OpenSSL’s native dual-certificate selection is unchanged. A defaultaction: tunnelentry on a transparent port also applies to these fallback clients.Add regression coverage for both certificate orders, RSA and ECDSA clients, TLS 1.2 and TLS 1.3, and absent, unknown, and matching SNI. The original callback fails the regression with alert 40; the fix passes it with BoringSSL and preserves OpenSSL behavior.