Skip to content

Commit

Permalink
Warning if invalid TLS version is chosen
Browse files Browse the repository at this point in the history
  • Loading branch information
r3-gabriel committed Sep 9, 2024
1 parent e029a52 commit 7f3098e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions r3.go
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,9 @@ func (prg *program) execute(svc service.Service) {
prg.webServer.TLSConfig.MinVersion = tls.VersionTLS12
case "1.3":
prg.webServer.TLSConfig.MinVersion = tls.VersionTLS13
default:
log.Warning("server", "failed to apply min. TLS version",
fmt.Errorf("version '%s' is not supported (valid: 1.1, 1.2 or 1.3)", config.File.Web.TlsMinVersion))
}
if err := prg.webServer.ServeTLS(webListener, "", ""); err != nil && err != http.ErrServerClosed {
prg.executeAborted(svc, err)
Expand Down

0 comments on commit 7f3098e

Please sign in to comment.