diff options
| author | Adnan Maolood <[email protected]> | 2021-03-06 15:24:14 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2021-03-06 15:24:15 -0500 |
| commit | 6e5c2473e736a90b06124bda3ded6a2c6248f855 (patch) | |
| tree | 41d9c28df19a51697d56dfddb28b630da65b41bf /examples | |
| parent | tofu: Fix format in error message (diff) | |
| download | go-gemini-6e5c2473e736a90b06124bda3ded6a2c6248f855.tar.xz go-gemini-6e5c2473e736a90b06124bda3ded6a2c6248f855.zip | |
tofu: Use base64-encoded sha256 fingerprints
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/client.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/client.go b/examples/client.go index 69a928f..ad114f0 100644 --- a/examples/client.go +++ b/examples/client.go @@ -6,7 +6,6 @@ package main import ( "bufio" - "bytes" "context" "crypto/x509" "errors" @@ -64,7 +63,7 @@ func trustCertificate(hostname string, cert *x509.Certificate) error { knownHost, ok := hosts.Lookup(hostname) if ok { // Check fingerprint - if bytes.Equal(knownHost.Fingerprint, host.Fingerprint) { + if knownHost.Fingerprint != host.Fingerprint { return nil } return errors.New("error: fingerprint does not match!") |