-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow using null
peer host for TLS and disabling host and port inference and SNI altogether.
#1561
Changes from all commits
8355727
c2c8e1a
a725289
5369566
90553c4
db0f010
b060984
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -256,7 +256,7 @@ public ClientSslConfig asSslConfig() { | |
} | ||
|
||
if (hostnameVerificationAlgorithm == null) { | ||
builder.disableHostnameVerification(); | ||
builder.hostnameVerificationAlgorithm(""); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please add at the end of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
} else { | ||
builder.hostnameVerificationAlgorithm(hostnameVerificationAlgorithm); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We previously discussed in #1561 (comment), but doesn't look like we come to a conclusion. Does it make sense to join peer host and port together on
ClientSslConfig
API into a single methodHostAndPort peerHostAndPort()
? If yes, we can have a single method here:inferPeerHostAndPort(boolean)
instead of two.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Scottmitch wdyt about single
ClientSslConfig#peerHostAndPort()
and inferPeerHostAndPort(boolean)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To my understanding the peer port is not used when peer host is not inferred (and also is
null
). I think it's reasonable to provide an API where both are affected. And yes, the breaking API change would need to go toClientSslConfig
. Perhaps we could do it in a separate PR and for now add this feature with no breakage?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that if we merge host and port into one method, we can provide only one "infer" method and won't need to change client API later.
Let's make the final decision tomorrow morning. Everything else looks good in the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed with @Scottmitch offline. He suggested to keep host and port independent because sometimes users don't know what is the port number (SRV resolutions or use of Unix Domain Sockets).