Fix certificate fingerprint check

This commit is contained in:
Adnan Maolood 2020-11-25 14:20:31 -05:00
parent 7ee0ea8b7f
commit 8ee55ee009

View File

@ -241,7 +241,7 @@ func (c *Client) verifyConnection(req *Request, cs tls.ConnectionState) error {
}
fingerprint := NewFingerprint(cert.Raw, cert.NotAfter)
if !bytes.Equal(knownHost.Raw, fingerprint.Raw) {
if bytes.Equal(knownHost.Raw, fingerprint.Raw) {
return nil
}
return errors.New("gemini: fingerprint does not match")