-
Notifications
You must be signed in to change notification settings - Fork 230
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 InsecureSkipServerNameVerify to tls.Config #158
add InsecureSkipServerNameVerify to tls.Config #158
Conversation
handshake_client.go
Outdated
|
||
// [UTLS SECTION START] | ||
skipServerNameVerify := config.InsecureSkipVerify || config.InsecureSkipServerNameVerify | ||
if len(config.ServerName) == 0 && !skipServerNameVerify { | ||
return nil, nil, errors.New("tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config") |
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.
Could you please also update the error message to reflect your changes made to Config
u_conn.go
Outdated
@@ -377,7 +377,8 @@ func (c *UConn) clientHandshake(ctx context.Context) (err error) { | |||
// [uTLS section begins] | |||
// don't make new ClientHello, use hs.hello | |||
// preserve the checks from beginning and end of makeClientHello() | |||
if len(c.config.ServerName) == 0 && !c.config.InsecureSkipVerify { | |||
skipServerNameVerify := c.config.InsecureSkipVerify || c.config.InsecureSkipServerNameVerify | |||
if len(c.config.ServerName) == 0 && !skipServerNameVerify { | |||
return errors.New("tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config") |
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.
This line as well
Also
|
Thanks! I will now get this merged. |
Nice work! But it would be better that if we can indicate another ServerName to verify, see #161 |
No description provided.