Skip to content

Commit

Permalink
Honour tlsConfig.MinVersion
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Thornton <art27@cantab.net>
  • Loading branch information
zeripath committed Nov 19, 2021
1 parent 7ac1540 commit 7cb3835
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/graceful/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ func (srv *Server) ListenAndServe(serve ServeFunction) error {
func (srv *Server) ListenAndServeTLSConfig(tlsConfig *tls.Config, serve ServeFunction) error {
go srv.awaitShutdown()

tlsConfig.MinVersion = tls.VersionTLS12
if tlsConfig.MinVersion == 0 {
tlsConfig.MinVersion = tls.VersionTLS12
}

l, err := GetListener(srv.network, srv.address)
if err != nil {
Expand Down

0 comments on commit 7cb3835

Please sign in to comment.