summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorHenry <cryptix@riseup.net>2014-12-11 11:14:41 +0100
committerHenry <cryptix@riseup.net>2014-12-11 11:14:41 +0100
commit4f4392b83efe13744198db13c622068f69071612 (patch)
tree120a8e78e694be9e94f44fe357eb53b3f75a1365 /cmd
parentdb6c0ebf762f2e06908622df9a7b3e8e4f782a57 (diff)
downloadgitea-4f4392b83efe13744198db13c622068f69071612.tar.gz
gitea-4f4392b83efe13744198db13c622068f69071612.zip
increase minimum version vor HTTPS to TLS 1.0 (POODLE, fixes #730)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/web.go b/cmd/web.go
index ba999dbf98..30a2cd991d 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: