fix: Clone *tls.Config returned by TLSConfigManager.TLSConfig#27150
Merged
gwossum merged 2 commits intomaster-1.xfrom Jan 28, 2026
Merged
fix: Clone *tls.Config returned by TLSConfigManager.TLSConfig#27150gwossum merged 2 commits intomaster-1.xfrom
gwossum merged 2 commits intomaster-1.xfrom
Conversation
TLSConfigManager.TLSConfig() will now always returned a cloned *tls.Config. This eliminates the need to manually cloning the returned *tls.Config before using it to Dial or Listen. It will also eliminate any bugs in current code which used the returned config without cloning it.
gwossum
added a commit
that referenced
this pull request
Feb 12, 2026
* fix: Clone *tls.Config returned by TLSConfigManager.TLSConfig TLSConfigManager.TLSConfig() will now always returned a cloned *tls.Config. This eliminates the need to manually cloning the returned *tls.Config before using it to Dial or Listen. It will also eliminate any bugs in current code which used the returned config without cloning it. * chore: fix issue in test code (cherry picked from commit f8351ea)
gwossum
added a commit
that referenced
this pull request
Feb 12, 2026
Add `tlsconfig.TLSConfigManager` for managing TLS configurations, handling certificate reloads, logging certificate expiration warnings, etc. This is backport of the following master-1.x PRs to the 1.12 branch: - #27100: feat: add TLSConfigManager for managing TLS configuration (clean cherry-pick) - #27103: feat: add TLSConfigManager.DialWithDialer method (clean cherry-pick) - #27106: feat: add NewClientTLSConfigManager and NewDisabledTLSConfigManager (clean cherry-pick) - #27120: feat: add TLSConfigManager.UseTLS (clean cherry-pick) - #27150: fix: Clone *tls.Config returned by TLSConfigManager.TLSConfig (clean cherry-pick) - #27162: feat: multiple TLS configuration improvements (almost clean cherry-pick)
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.
TLSConfigManager.TLSConfig() will now always returned a cloned *tls.Config. This eliminates the need to manually cloning the returned *tls.Config before using it to Dial or Listen. It will also eliminate any bugs in current code which used the returned config without cloning it.