http-pqc-j21: Replace httpclient5 test dependency with RestAssured - #559
Merged
jamesnetherton merged 2 commits intoAug 7, 2026
Conversation
…ured The httpclient5 dependency was only used in tests to select a specific JSSE provider and set TLS named groups. Both can be achieved with RestAssured's SSLConfig.sslSocketFactory() backed by a provider-specific SSLContext, since the named groups are already controlled by the jdk.tls.namedGroups system property set by the test profiles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
JiriOndrusek
reviewed
Aug 7, 2026
JiriOndrusek
left a comment
Contributor
There was a problem hiding this comment.
Minor security observation — not blocking.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
| } else { | ||
| assertTrue(responseStatus == 200, "Expected response status is 200"); | ||
| } | ||
| SSLSocketFactory sslSocketFactory = new SSLSocketFactory(sslContext); |
Contributor
There was a problem hiding this comment.
new SSLSocketFactory(sslContext) has two issues:
- Defaults to
BROWSER_COMPATIBLE_HOSTNAME_VERIFIER(lenient) instead of strict - Does not constrain the socket to TLS 1.3 — client could negotiate TLS 1.2, bypassing PQC
Suggested change
| SSLSocketFactory sslSocketFactory = new SSLSocketFactory(sslContext); | |
| SSLSocketFactory sslSocketFactory = new SSLSocketFactory( | |
| sslContext, | |
| new String[] { "TLSv1.3" }, | |
| null, | |
| SSLSocketFactory.STRICT_HOSTNAME_VERIFIER); |
Contributor
Author
There was a problem hiding this comment.
Good catch on both points. Fixed in 7fd7a01 — now using the 4-arg constructor with STRICT_HOSTNAME_VERIFIER and TLSv1.3 protocol constraint.
…S 1.3 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
JiriOndrusek
approved these changes
Aug 7, 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
httpclient5test-scoped dependency from the http-pqc-j21 exampleSSLConfig.sslSocketFactory()backed by a provider-specificSSLContext, instead of httpclient5'sSSLConnectionSocketFactorysetNamedGroups()call was unnecessary since both BCJSSE and SunJSSE already read named groups from thejdk.tls.namedGroupssystem property set by the test profilesTest plan
mvn verifypasses — all 6 tests green (3 in PqcWithFallbackTest, 3 in PqcOnlyTest)-Dnative🤖 Generated with Claude Code