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:
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)
|
||||
|
Loading…
Reference in New Issue
Block a user