Blame SOURCES/docker-reverse-entitlement.patch

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