-
Notifications
You must be signed in to change notification settings - Fork 0
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
add disableverifyhostname parameter #25
Conversation
} | ||
_, err = certs[0].Verify(opts) | ||
} | ||
|
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.
It looks like tlsConn.Handshake() can return an error before we get to line 1151. We should have error handling there as well as at the end of this if
block
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.
There's no need. This block of conditional code is only executed if err is nil, plus the other conditions.
a71c92c
to
5e511e7
Compare
@@ -1145,6 +1148,27 @@ initiate_connection: | |||
passthrough := passthroughConn{c: &handshakeConn} | |||
tlsConn := tls.Client(&passthrough, &config) | |||
err = tlsConn.Handshake() | |||
|
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'd just remove this extra line and it's good to go
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.
One small thing
disableverifyhostname prevents checking the hostname on tls verification. This means that only the certificate is verified.
5e511e7
to
7eb9d7f
Compare
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.
LGTM
disableverifyhostname prevents checking the hostname on tls verification. This means that only the certificate is verified.