Avoid fallback to SSL protocols < TLS1.0
Signed-off-by: Tibor Vass <teabee89@gmail.com> Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh) Conflicts: registry/registry.gomaster
							parent
							
								
									798fd3c764
								
							
						
					
					
						commit
						dff0678909
					
				| 
						 | 
					@ -37,7 +37,11 @@ const (
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func newClient(jar http.CookieJar, roots *x509.CertPool, cert *tls.Certificate, timeout TimeoutType, secure bool) *http.Client {
 | 
					func newClient(jar http.CookieJar, roots *x509.CertPool, cert *tls.Certificate, timeout TimeoutType, secure bool) *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 {
 | 
						if cert != nil {
 | 
				
			||||||
		tlsConfig.Certificates = append(tlsConfig.Certificates, *cert)
 | 
							tlsConfig.Certificates = append(tlsConfig.Certificates, *cert)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue