Remove port from host when verifying hostnames

This commit is contained in:
adnano 2020-09-27 14:25:28 -04:00
parent 188c3457e6
commit 0343248952

View File

@ -205,7 +205,7 @@ func (c *Client) Send(req *Request) (*Response, error) {
return err
}
// Check that the certificate is valid for the hostname
if err := cert.VerifyHostname(req.Host); err != nil {
if err := cert.VerifyHostname(hostname(req.Host)); err != nil {
return err
}
// Check that the client trusts the certificate