aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYotam Nachum <me@yotam.net>2019-11-16 22:43:06 +0200
committerYotam Nachum <me@yotam.net>2019-11-16 22:43:06 +0200
commit8ebb75240eefc7b7149dc33848da5a46034cab53 (patch)
treef69a8143a1650d35b487a5bf4c65fdf78cf05ee4
parentExtract Fetch to a client struct (diff)
downloadgo-gemini-8ebb75240eefc7b7149dc33848da5a46034cab53.tar.gz
go-gemini-8ebb75240eefc7b7149dc33848da5a46034cab53.zip
Set the minimum TLS version to TLS 1.2
The protocol specification says that the required minimum TLS version is 1.2 and the clients should refuse lower versions.
-rw-r--r--client.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/client.go b/client.go
index c04b996..d6cb405 100644
--- a/client.go
+++ b/client.go
@@ -51,6 +51,7 @@ func (c Client) connect(rawURL string) (io.ReadWriteCloser, error) {
}
conf := &tls.Config{
+ MinVersion: tls.VersionTLS12,
InsecureSkipVerify: c.InsecureSkipVerify,
}