mirror of
https://git.sr.ht/~adnano/go-gemini
synced 2024-11-23 08:32:02 +01:00
examples/client: Fix certificate trust check
This commit is contained in:
parent
ec52faab6b
commit
8c453c7531
@ -64,10 +64,10 @@ 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 nil
|
||||
}
|
||||
|
||||
fmt.Printf(trustPrompt, hostname, host.Fingerprint)
|
||||
scanner.Scan()
|
||||
|
Loading…
Reference in New Issue
Block a user