aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/client.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/client.go b/examples/client.go
index ad114f0..a7b8544 100644
--- a/examples/client.go
+++ b/examples/client.go
@@ -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)