1
0
mirror of https://git.sr.ht/~adnano/go-gemini synced 2024-11-23 16:52:06 +01:00

Remove port from host when verifying hostnames

This commit is contained in:
adnano 2020-09-27 14:25:28 -04:00
parent e08ff3c709
commit 1640891c91

@ -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