Restrict HTTP/2 TLS cipher suites - #13428
Merged
Merged
Conversation
HTTP/2 can currently be negotiated with TLS 1.2 cipher suites that RFC 9113 prohibits. Clients that enforce the restriction can reject those connections instead of falling back to HTTP/1.1. This checks the pending cipher during ALPN selection and removes HTTP/2 when its IANA identifier is prohibited. This also adds AuTest coverage for permitted negotiation and HTTP/1.1 fallback. Fixes: apache#5287
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
tests/gold_tests/tls/tls_h2_cipher_suite.test.py:87
- The prohibited-cipher test runs don’t declare an explicit dependency to start the ATS process (unlike the allowed-cipher run). This makes the ordering implicit and can be fragile if the harness ever reorders runs or if the first run fails before ATS is left running.
tr = Test.AddTestRun(f"Fall back to HTTP/1.1 with a prohibited {description} cipher")
tr.Processes.Default.Command = (
"printf 'GET / HTTP/1.1\\r\\nHost: example.com\\r\\nConnection: close\\r\\n\\r\\n' | "
f"openssl s_client -ign_eof -tls1_2 -cipher {cipher} "
f"-alpn h2,http/1.1 -connect 127.0.0.1:{self._ts.Variables.ssl_port}")
masaori335
reviewed
Jul 31, 2026
|
|
||
| // RFC 9113 Appendix A lists 276 prohibited TLS 1.2 cipher suites. The IANA | ||
| // identifiers for those suites form these 24 contiguous ranges. | ||
| static constexpr CipherRange prohibited_ranges[] = { |
Contributor
There was a problem hiding this comment.
I checked with IANA registration.
https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-4
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.
HTTP/2 can currently be negotiated with TLS 1.2 cipher suites that
RFC 9113 prohibits. Clients that enforce the restriction can reject
those connections instead of falling back to HTTP/1.1.
This checks the pending cipher during ALPN selection and removes
HTTP/2 when its IANA identifier is prohibited. This also adds AuTest
coverage for permitted negotiation and HTTP/1.1 fallback.
Fixes: #5287