mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-07 17:49:04 +00:00
enhance(tls): use go's tls defaults (#38687)
The hardcoded cipher suites and curve preferences date from 2021 and no longer match what Go ships. All four `SSL_*` are now unset by default which means "use Go's default". 1. TLS 1.3 is now the default instead of TLS 1.2. 2. Post-quantum key exchange (`X25519MLKEM768`) works. 3. Four `ECDHE-*-CBC-SHA` suites become negotiable on TLS 1.2.
This commit is contained in:
@@ -101,10 +101,6 @@ func (srv *Server) ListenAndServe(serve ServeFunction, useProxyProtocol bool) er
|
||||
func (srv *Server) ListenAndServeTLSConfig(tlsConfig *tls.Config, serve ServeFunction, useProxyProtocol, proxyProtocolTLSBridging bool) error {
|
||||
go srv.awaitShutdown()
|
||||
|
||||
if tlsConfig.MinVersion == 0 {
|
||||
tlsConfig.MinVersion = tls.VersionTLS12
|
||||
}
|
||||
|
||||
listener, err := GetListener(srv.network, srv.address)
|
||||
if err != nil {
|
||||
log.Error("Unable to get Listener: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user