aboutsummaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
authorAdnan Maolood <[email protected]>2021-01-14 22:34:12 -0500
committerAdnan Maolood <[email protected]>2021-01-14 22:34:12 -0500
commitf36a1c5c8783d08926f336b71d0b8a7984406adf (patch)
tree8f8b986adae2f95b343f942f4131275425862bae /client.go
parentfs: Update comments (diff)
downloadgo-gemini-f36a1c5c8783d08926f336b71d0b8a7984406adf.tar.xz
go-gemini-f36a1c5c8783d08926f336b71d0b8a7984406adf.zip
client: Add note about TOFU
Diffstat (limited to 'client.go')
-rw-r--r--client.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/client.go b/client.go
index f210f71..ba84245 100644
--- a/client.go
+++ b/client.go
@@ -19,6 +19,9 @@ type Client struct {
// If TrustCertificate is nil, the client will accept any certificate.
// If the returned error is not nil, the certificate will not be trusted
// and the request will be aborted.
+ //
+ // For a basic trust on first use implementation, see (*KnownHosts).TOFU
+ // in the tofu submodule.
TrustCertificate func(hostname string, cert *x509.Certificate) error
// Timeout specifies a time limit for requests made by this