未验证 提交 4d047bbc 编写于 作者: S Shu Muto 提交者: GitHub

Set MinVersion for TLS (#5013)

Limits TLS <= v1.1 due to security reason.
上级 78624722
......@@ -181,9 +181,12 @@ func main() {
log.Printf("Serving securely on HTTPS port: %d", args.Holder.GetPort())
secureAddr := fmt.Sprintf("%s:%d", args.Holder.GetBindAddress(), args.Holder.GetPort())
server := &http.Server{
Addr: secureAddr,
Handler: http.DefaultServeMux,
TLSConfig: &tls.Config{Certificates: servingCerts},
Addr: secureAddr,
Handler: http.DefaultServeMux,
TLSConfig: &tls.Config{
Certificates: servingCerts,
MinVersion: tls.VersionTLS12,
},
}
go func() { log.Fatal(server.ListenAndServeTLS("", "")) }()
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册