diff options
| author | Adnan Maolood <[email protected]> | 2021-01-10 16:44:32 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2021-01-10 16:46:12 -0500 |
| commit | d78052ce084da33e94b2f242e73364c56a759aec (patch) | |
| tree | 7a71f2df524e490b860545ccfc3ea1f945f6bdb4 /examples/client.go | |
| parent | Update documentation (diff) | |
| download | go-gemini-d78052ce084da33e94b2f242e73364c56a759aec.tar.xz go-gemini-d78052ce084da33e94b2f242e73364c56a759aec.zip | |
Move tofu.go to a subpackagev0.1.11
Diffstat (limited to 'examples/client.go')
| -rw-r--r-- | examples/client.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/client.go b/examples/client.go index e3c7537..251c6cd 100644 --- a/examples/client.go +++ b/examples/client.go @@ -17,11 +17,12 @@ import ( "time" "git.sr.ht/~adnano/go-gemini" + "git.sr.ht/~adnano/go-gemini/tofu" "git.sr.ht/~adnano/go-xdg" ) var ( - hosts gemini.KnownHostsFile + hosts tofu.KnownHostsFile scanner *bufio.Scanner ) @@ -46,7 +47,7 @@ Otherwise, this should be safe to trust. => ` func trustCertificate(hostname string, cert *x509.Certificate) error { - fingerprint := gemini.NewFingerprint(cert.Raw, cert.NotAfter) + fingerprint := tofu.NewFingerprint(cert.Raw, cert.NotAfter) knownHost, ok := hosts.Lookup(hostname) if ok && time.Now().Before(knownHost.Expires) { // Check fingerprint |