From 4f4392b83efe13744198db13c622068f69071612 Mon Sep 17 00:00:00 2001 From: Henry Date: Thu, 11 Dec 2014 11:14:41 +0100 Subject: [PATCH] increase minimum version vor HTTPS to TLS 1.0 (POODLE, fixes #730) --- cmd/web.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/web.go b/cmd/web.go index ba999dbf98a..30a2cd991df 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -5,6 +5,7 @@ package cmd import ( + "crypto/tls" "fmt" "html/template" "io/ioutil" @@ -453,7 +454,9 @@ func runWeb(*cli.Context) { case setting.HTTP: err = http.ListenAndServe(listenAddr, m) case setting.HTTPS: - err = http.ListenAndServeTLS(listenAddr, setting.CertFile, setting.KeyFile, m) + cfg := &tls.Config{MinVersion: tls.VersionTLS10} + server := &http.Server{Addr: listenAddr, TLSConfig: cfg, Handler: m} + err = server.ListenAndServeTLS(setting.CertFile, setting.KeyFile) case setting.FCGI: err = fcgi.Serve(nil, m) default: