1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 12:54:53 -05:00

Set TLS minimum version to 1.2 (#12689)

Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
zeripath 2020-09-02 23:37:49 +01:00 committed by GitHub
parent 5fd9f72104
commit 702e98c5ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)