Update TlsMinVersion to latest version 13
This commit is contained in:
parent
6f51715aad
commit
5c1c304d30
@ -120,7 +120,7 @@ func (p *HTTPS2HTTPPlugin) genTLSConfig() (*tls.Config, error) {
|
||||
|
||||
config := &tls.Config{
|
||||
Certificates: []tls.Certificate{cert},
|
||||
MinVersion: tls.VersionTLS12,
|
||||
MinVersion: tls.VersionTLS13,
|
||||
}
|
||||
return config, nil
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ func (p *HTTPS2HTTPSPlugin) genTLSConfig() (*tls.Config, error) {
|
||||
|
||||
config := &tls.Config{
|
||||
Certificates: []tls.Certificate{cert},
|
||||
MinVersion: tls.VersionTLS12,
|
||||
MinVersion: tls.VersionTLS13,
|
||||
}
|
||||
return config, nil
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ func newCertPool(caPath string) (*x509.CertPool, error) {
|
||||
|
||||
func NewServerTLSConfig(certPath, keyPath, caPath string) (*tls.Config, error) {
|
||||
base := &tls.Config{
|
||||
MinVersion: tls.VersionTLS12,
|
||||
MinVersion: tls.VersionTLS13,
|
||||
}
|
||||
|
||||
if certPath == "" || keyPath == "" {
|
||||
@ -104,7 +104,7 @@ func NewServerTLSConfig(certPath, keyPath, caPath string) (*tls.Config, error) {
|
||||
|
||||
func NewClientTLSConfig(certPath, keyPath, caPath, serverName string) (*tls.Config, error) {
|
||||
base := &tls.Config{
|
||||
MinVersion: tls.VersionTLS12,
|
||||
MinVersion: tls.VersionTLS13,
|
||||
}
|
||||
|
||||
if certPath != "" && keyPath != "" {
|
||||
|
@ -56,7 +56,7 @@ func readClientHello(reader io.Reader) (*tls.ClientHelloInfo, error) {
|
||||
// As long as the Client Hello is successfully read, the failure should only happen after GetConfigForClient is called,
|
||||
// so we only care about the error if hello was never set.
|
||||
err := tls.Server(readOnlyConn{reader: reader}, &tls.Config{
|
||||
MinVersion: tls.VersionTLS12,
|
||||
MinVersion: tls.VersionTLS13,
|
||||
GetConfigForClient: func(argHello *tls.ClientHelloInfo) (*tls.Config, error) {
|
||||
hello = &tls.ClientHelloInfo{}
|
||||
*hello = *argHello
|
||||
|
@ -88,7 +88,7 @@ func (svr *Service) RunDashboardServer(address string) (err error) {
|
||||
return err
|
||||
}
|
||||
tlsCfg := &tls.Config{
|
||||
MinVersion: tls.VersionTLS12,
|
||||
MinVersion: tls.VersionTLS13,
|
||||
Certificates: []tls.Certificate{cert},
|
||||
}
|
||||
ln = tls.NewListener(ln, tlsCfg)
|
||||
|
Loading…
Reference in New Issue
Block a user