summaryrefslogtreecommitdiff
path: root/gemini/client.go
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-05-09 10:19:51 -0600
committertjpcc <tjp@ctrl-c.club>2023-05-09 10:19:51 -0600
commitc754a4406455936dd8ab6d0278fc6423f2fbf2cc (patch)
treee9e043ff4bb8bcaa438ec3235a8188610c697a36 /gemini/client.go
parent45c2beece021db32c47a32f5e45573307e2edd73 (diff)
InsecureSkipVerify and other improvements for the gemini fetch example code
Diffstat (limited to 'gemini/client.go')
-rw-r--r--gemini/client.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/gemini/client.go b/gemini/client.go
index 68c5488..7c78b71 100644
--- a/gemini/client.go
+++ b/gemini/client.go
@@ -43,7 +43,12 @@ func (client Client) RoundTrip(request *sr.Request) (*sr.Response, error) {
host = net.JoinHostPort(host, "1965")
}
- conn, err := tls.Dial("tcp", host, client.tlsConf)
+ tlsConf := tls.Config{InsecureSkipVerify: true}
+ if (client.tlsConf != nil) {
+ tlsConf = *client.tlsConf
+ }
+
+ conn, err := tls.Dial("tcp", host, &tlsConf)
if err != nil {
return nil, err
}