Skip to content

Commit 55ffb15

Browse files
Merge pull request #93 from umago/min-tls-1.3
Enforce the minimum TLS version to 1.3
2 parents 37f1651 + 377a935 commit 55ffb15

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

cmd/main.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ func main() {
9090
// Rapid Reset CVEs. For more information see:
9191
// - https://github.com/advisories/GHSA-qppj-fm5r-hxr3
9292
// - https://github.com/advisories/GHSA-4374-p667-p6c8
93-
disableHTTP2 := func(c *tls.Config) {
94-
setupLog.Info("disabling http/2")
95-
c.NextProtos = []string{"http/1.1"}
96-
}
97-
98-
if !enableHTTP2 {
99-
tlsOpts = append(tlsOpts, disableHTTP2)
100-
}
93+
tlsOpts = append(tlsOpts, func(c *tls.Config) {
94+
setupLog.Info("enforcing minimum TLS version 1.3")
95+
c.MinVersion = tls.VersionTLS13
96+
if !enableHTTP2 {
97+
setupLog.Info("disabling http/2")
98+
c.NextProtos = []string{"http/1.1"}
99+
}
100+
})
101101

102102
webhookServer := webhook.NewServer(webhook.Options{
103103
TLSOpts: tlsOpts,

0 commit comments

Comments
 (0)