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 { if ok {
// Check fingerprint // Check fingerprint
if knownHost.Fingerprint != host.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) fmt.Printf(trustPrompt, hostname, host.Fingerprint)