1
0
Fork 0
mirror of https://git.sr.ht/~adnano/go-gemini synced 2024-05-06 00:26:19 +02:00

examples/client: Fix certificate trust check

This commit is contained in:
Adnan Maolood 2021-03-08 14:07:18 -05:00
parent a5493b708a
commit 7d958a4798

View File

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