aboutsummaryrefslogtreecommitdiff
path: root/examples/client
diff options
context:
space:
mode:
authoradnano <[email protected]>2020-09-27 17:41:41 -0400
committeradnano <[email protected]>2020-09-27 17:41:41 -0400
commit8009de81eb66556155bb944729972b147242916f (patch)
tree615c65783a071431ea5b998c3d67c2d2707d86cd /examples/client
parentAdd client authorization example (diff)
downloadgo-gemini-8009de81eb66556155bb944729972b147242916f.tar.xz
go-gemini-8009de81eb66556155bb944729972b147242916f.zip
Add function to add a host temporarily
Diffstat (limited to 'examples/client')
-rw-r--r--examples/client/client.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/client/client.go b/examples/client/client.go
index a8256f2..52a1253 100644
--- a/examples/client/client.go
+++ b/examples/client/client.go
@@ -34,6 +34,7 @@ func init() {
// Prompt the user to trust the certificate
if userTrustsCertificateTemporarily() {
// Temporarily trust the certificate
+ knownHosts.AddTemporary(hostname, cert)
return nil
} else if userTrustsCertificatePermanently() {
// Add the certificate to the known hosts file