mirror of
				https://github.com/moby/moby.git
				synced 2022-11-09 12:21:53 -05:00 
			
		
		
		
	Merge pull request #8588 from dqminh/remove-sslv3
remove sslv3 from server's TLS supported versions
This commit is contained in:
		
						commit
						10f78974ca
					
				
					 3 changed files with 9 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1439,6 +1439,8 @@ func ListenAndServe(proto, addr string, job *engine.Job) error {
 | 
			
		|||
		tlsConfig := &tls.Config{
 | 
			
		||||
			NextProtos:   []string{"http/1.1"},
 | 
			
		||||
			Certificates: []tls.Certificate{cert},
 | 
			
		||||
			// Avoid fallback on insecure SSL protocols
 | 
			
		||||
			MinVersion: tls.VersionTLS10,
 | 
			
		||||
		}
 | 
			
		||||
		if job.GetenvBool("TlsVerify") {
 | 
			
		||||
			certPool := x509.NewCertPool()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -93,6 +93,8 @@ func main() {
 | 
			
		|||
			}
 | 
			
		||||
			tlsConfig.Certificates = []tls.Certificate{cert}
 | 
			
		||||
		}
 | 
			
		||||
		// Avoid fallback to SSL protocols < TLS1.0
 | 
			
		||||
		tlsConfig.MinVersion = tls.VersionTLS10
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if *flTls || *flTlsVerify {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -36,7 +36,11 @@ const (
 | 
			
		|||
)
 | 
			
		||||
 | 
			
		||||
func newClient(jar http.CookieJar, roots *x509.CertPool, cert *tls.Certificate, timeout TimeoutType) *http.Client {
 | 
			
		||||
	tlsConfig := tls.Config{RootCAs: roots}
 | 
			
		||||
	tlsConfig := tls.Config{
 | 
			
		||||
		RootCAs: roots,
 | 
			
		||||
		// Avoid fallback to SSL protocols < TLS1.0
 | 
			
		||||
		MinVersion: tls.VersionTLS10,
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if cert != nil {
 | 
			
		||||
		tlsConfig.Certificates = append(tlsConfig.Certificates, *cert)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue