Fix certificate fingerprint check
This commit is contained in:
parent
7ee0ea8b7f
commit
8ee55ee009
@ -241,7 +241,7 @@ func (c *Client) verifyConnection(req *Request, cs tls.ConnectionState) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fingerprint := NewFingerprint(cert.Raw, cert.NotAfter)
|
fingerprint := NewFingerprint(cert.Raw, cert.NotAfter)
|
||||||
if !bytes.Equal(knownHost.Raw, fingerprint.Raw) {
|
if bytes.Equal(knownHost.Raw, fingerprint.Raw) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return errors.New("gemini: fingerprint does not match")
|
return errors.New("gemini: fingerprint does not match")
|
||||||
|
Loading…
Reference in New Issue
Block a user