Allow client TLS to verify server with system root CAs#235
Merged
Conversation
GetClientTLSConfig previously required RemoteCAPath whenever SkipCAVerification was false, forcing every client to ship a CA bundle even when the server cert chains to a public CA (e.g. Let's Encrypt). Now only CAServerName is required; if RemoteCAPath is empty, RootCAs stays nil and Go's TLS stack falls back to x509.SystemCertPool. Also update IsEnabled to recognize CAServerName-only configs as enabled. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
liam-lowe
approved these changes
Jun 4, 2026
liam-lowe
left a comment
Contributor
There was a problem hiding this comment.
Changes seem fine.
nit: existing test coverage doesn't seem comprehensive. I don't think there are tests for Server (only Test_ClientTLSConfig) - and the actual test doesn't actually validate anything useful.
I think there will be some failure modes existing (or introduced) due to this lack of coverage.
| func (s *tlsTestSuite) AfterTest(suiteName, testName string) { | ||
| } | ||
|
|
||
| func (s *tlsTestSuite) Test_ClientTLSConfig() { |
Contributor
There was a problem hiding this comment.
do we need server tests as well - I imagine this impacts both sides?
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.
GetClientTLSConfig previously required RemoteCAPath whenever
SkipCAVerification was false, forcing every client to ship a CA bundle
even when the server cert chains to a public CA (e.g. Let's Encrypt).
Now only CAServerName is required; if RemoteCAPath is empty, RootCAs
stays nil and Go's TLS stack falls back to x509.SystemCertPool. Also
update IsEnabled to recognize CAServerName-only configs as enabled.
Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com
What was changed
Why?
Checklist
Closes
How was this tested:
Test agains eu-central-1-internal.a2dd6.tmprl.cloud:8233
client tls config with skipCAVerification = false (enable server verfication)
TLS connection pass when caServerName is set to
TLS connection failed when caServerName is set to