Repository navigation
fix: use correct ServerName for StartTLS - #195
Merged
Merged
Conversation
taran-p
requested changes
Nov 15, 2025
taran-p
left a comment
Contributor
There was a problem hiding this comment.
Please update branch and fix shadowing issue, otherwise looks good
When doing StartTLS, the ServerName in the TLS config must match the actual host name to which we are connecting. The pre-configured l.TLS has the correct ServerName in the non-SRV case, but when connecting to servers whose names we found via an SRV lookup, we need to verify against the name from the SRV record, not the original name under which we found the SRV. Fixes minio/minio#21202
ianroberts
force-pushed
the
fix/starttls-servername
branch
from
November 15, 2025 09:23
5622f87 to
612fa56
Compare
taran-p
approved these changes
Nov 15, 2025
harshavardhana
approved these changes
Nov 15, 2025
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.
When doing StartTLS for an LDAP server, the
ServerNamein the TLS config must match the actual host name to which we are connecting. The pre-configuredl.TLShas the correctServerNamein the non-SRV case (where the configured host name is the LDAP server), but when using SRV lookups the configured name is the domain where we look for the SRV record, not the actual host to which we end up connecting.To fix this, we need to adjust the TLS configuration to verify the certificate against the hostname we took from the SRV record, not the original name under which we found the SRV.
Fixes minio/minio#21202