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

examples/client: Fix certificate trust check

This commit is contained in:
adnano 2021-03-08 14:07:18 -05:00
parent ec52faab6b
commit 8c453c7531

@ -64,9 +64,9 @@ func trustCertificate(hostname string, cert *x509.Certificate) error {
if ok {
// Check fingerprint
if knownHost.Fingerprint != host.Fingerprint {
return nil
return errors.New("error: fingerprint does not match!")
}
return errors.New("error: fingerprint does not match!")
return nil
}
fmt.Printf(trustPrompt, hostname, host.Fingerprint)