aboutsummaryrefslogtreecommitdiffstats
path: root/modules/graceful
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-09-02 23:37:49 +0100
committerGitHub <noreply@github.com>2020-09-02 23:37:49 +0100
commit702e98c5ec7b11f3c988d61dccbec71e1e69a8bd (patch)
tree5fdb74f53c6a065f50648d344ba8c3af6d138019 /modules/graceful
parent5fd9f72104aab3136133ec5b058bd67cb39cf314 (diff)
downloadgitea-702e98c5ec7b11f3c988d61dccbec71e1e69a8bd.tar.gz
gitea-702e98c5ec7b11f3c988d61dccbec71e1e69a8bd.zip
Set TLS minimum version to 1.2 (#12689)
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/graceful')
-rw-r--r--modules/graceful/server.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/graceful/server.go b/modules/graceful/server.go
index 4d0d8677f0..db73174ac1 100644
--- a/modules/graceful/server.go
+++ b/modules/graceful/server.go
@@ -128,6 +128,8 @@ func (srv *Server) ListenAndServeTLS(certFile, keyFile string, serve ServeFuncti
func (srv *Server) ListenAndServeTLSConfig(tlsConfig *tls.Config, serve ServeFunction) error {
go srv.awaitShutdown()
+ tlsConfig.MinVersion = tls.VersionTLS12
+
l, err := GetListener(srv.network, srv.address)
if err != nil {
log.Error("Unable to get Listener: %v", err)