diff options
| author | Adnan Maolood <[email protected]> | 2020-11-05 15:27:12 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2020-11-05 15:27:12 -0500 |
| commit | b76080c86312b18f18c6333766895aac410f31bc (patch) | |
| tree | f3149548a5f81defe4d84f18c481ce62776d0aae /examples/client.go | |
| parent | Document CertificateOptions (diff) | |
| download | go-gemini-b76080c86312b18f18c6333766895aac410f31bc.tar.xz go-gemini-b76080c86312b18f18c6333766895aac410f31bc.zip | |
Refactor KnownHosts
Diffstat (limited to 'examples/client.go')
| -rw-r--r-- | examples/client.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/client.go b/examples/client.go index 35266f9..9f5efae 100644 --- a/examples/client.go +++ b/examples/client.go @@ -33,7 +33,8 @@ func init() { client.Timeout = 30 * time.Second client.KnownHosts.LoadDefault() client.TrustCertificate = func(hostname string, cert *x509.Certificate) gemini.Trust { - fmt.Printf(trustPrompt, hostname, gemini.Fingerprint(cert)) + fingerprint := gemini.NewFingerprint(cert) + fmt.Printf(trustPrompt, hostname, fingerprint.Hex) scanner.Scan() switch scanner.Text() { case "t": |