diff options
| author | Adnan Maolood <[email protected]> | 2021-03-08 14:07:18 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2021-03-08 14:07:18 -0500 |
| commit | 7d958a47988f1d672f8f11a9a87600053ba3eef9 (patch) | |
| tree | 25a698e852df5f024bdcfc184af10d96019de17f | |
| parent | tofu: Fix known host unmarshaling (diff) | |
| download | go-gemini-7d958a47988f1d672f8f11a9a87600053ba3eef9.tar.xz go-gemini-7d958a47988f1d672f8f11a9a87600053ba3eef9.zip | |
examples/client: Fix certificate trust check
| -rw-r--r-- | examples/client.go | 4 |
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) |