Verify hostname on certificates
1 files changed, 4 insertions(+), 0 deletions(-) M gemini/gemini.go
M gemini/gemini.go => gemini/gemini.go +4 -0
@@ 90,6 90,10 @@ func (client *Client) LoadURL(ctx context.Context, surl url.URL, skipVerify bool Config: &tls.Config{ InsecureSkipVerify: true, VerifyConnection: func(state tls.ConnectionState) error { err := state.PeerCertificates[0].VerifyHostname(surl.Hostname()) if err != nil { return err } return client.certStore.Check(surl.Hostname(), state.PeerCertificates[0], skipVerify) }, Certificates: certs,