hughesjr / rpms / docker

Forked from rpms/docker 4 years ago
Clone

Blame SOURCES/docker-reverse-entitlement.patch

bf7bdc
diff -up docker-2a2f26c1979cdaed884c765ea3dd203543e7e284/registry/registry.go.entitlement docker-2a2f26c1979cdaed884c765ea3dd203543e7e284/registry/registry.go
bf7bdc
--- docker-2a2f26c1979cdaed884c765ea3dd203543e7e284/registry/registry.go.entitlement	2014-10-30 12:47:19.638087268 -0400
bf7bdc
+++ docker-2a2f26c1979cdaed884c765ea3dd203543e7e284/registry/registry.go	2014-10-30 12:48:30.778233169 -0400
bf7bdc
@@ -91,12 +91,6 @@ func doRequest(req *http.Request, jar ht
bf7bdc
 	if err != nil && !os.IsNotExist(err) {
bf7bdc
 		return nil, nil, err
bf7bdc
 	}
bf7bdc
-	hostDir = path.Join(" /etc/pki/entitlement", req.URL.Host)
bf7bdc
-	if fs1, err := ioutil.ReadDir(hostDir); err == nil {
bf7bdc
-		for _, f := range fs1 {
bf7bdc
-			fs = append(fs, f)
bf7bdc
-		}
bf7bdc
-	}
bf7bdc
 
bf7bdc
 	var (
bf7bdc
 		pool  *x509.CertPool
bf7bdc
@@ -124,33 +118,6 @@ func doRequest(req *http.Request, jar ht
bf7bdc
 				cert, err := tls.LoadX509KeyPair(path.Join(hostDir, certName), path.Join(hostDir, keyName))
bf7bdc
 				if err != nil {
bf7bdc
 					return nil, nil, err
bf7bdc
-				}
bf7bdc
-				certs = append(certs, &cert)
bf7bdc
-			}
bf7bdc
-		}
bf7bdc
-		if strings.HasSuffix(f.Name(), ".key") {
bf7bdc
-			keyName := f.Name()
bf7bdc
-			certName := keyName[:len(keyName)-4] + ".cert"
bf7bdc
-			if !hasFile(fs, certName) {
bf7bdc
-				return nil, nil, fmt.Errorf("Missing certificate %s for key %s", certName, keyName)
bf7bdc
-			}
bf7bdc
-		}
bf7bdc
-		if strings.HasSuffix(f.Name(), ".pem") {
bf7bdc
-			if strings.HasSuffix(f.Name(), "-key.pem") {
bf7bdc
-				keyName := f.Name()
bf7bdc
-				certName := keyName[:len(keyName)-len("-key.pem")] + ".pem"
bf7bdc
-				if !hasFile(fs, certName) {
bf7bdc
-					return nil, nil, fmt.Errorf("Missing certificate %s for key %s", certName, keyName)
bf7bdc
-				}
bf7bdc
-			} else {
bf7bdc
-				certName := f.Name()
bf7bdc
-				keyName := certName[:len(certName)-len(".pem")] + "-key.pem"
bf7bdc
-				if !hasFile(fs, keyName) {
bf7bdc
-					return nil, nil, fmt.Errorf("Missing key %s for certificate %s", keyName, certName)
bf7bdc
-				}
bf7bdc
-				cert, err := tls.LoadX509KeyPair(path.Join(hostDir, certName), path.Join(hostDir, keyName))
bf7bdc
-				if err != nil {
bf7bdc
-					return nil, nil, err
bf7bdc
 				}
bf7bdc
 				certs = append(certs, &cert)
bf7bdc
 			}