1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-23 04:47:02 +00:00

set min version on tls configuration even on the tests and examples

This commit is contained in:
Gerasimos (Makis) Maropoulos
2022-03-10 21:48:05 +02:00
parent 096349bb56
commit 7ab0f6fff5
8 changed files with 19 additions and 12 deletions

View File

@@ -106,7 +106,7 @@ func CERT(addr string, cert tls.Certificate) (net.Listener, error) {
tlsConfig := &tls.Config{
Certificates: []tls.Certificate{cert},
PreferServerCipherSuites: true,
MinVersion: tls.VersionTLS11,
MinVersion: tls.VersionTLS13,
}
return tls.NewListener(l, tlsConfig), nil
}
@@ -146,7 +146,7 @@ func LETSENCRYPT(addr string, reuse bool, serverName string, cacheDirOptional ..
} else {
m.Cache = autocert.DirCache(cacheDir)
}
tlsConfig := &tls.Config{GetCertificate: m.GetCertificate, MinVersion: tls.VersionTLS11}
tlsConfig := &tls.Config{GetCertificate: m.GetCertificate, MinVersion: tls.VersionTLS13}
// use InsecureSkipVerify or ServerName to a value
if serverName == "" {