mirror of https://github.com/docker/docs.git
Remove overwrote of SKID on saved certificates
This commit is contained in:
parent
d39d16a717
commit
b9dbc9e20a
|
|
@ -1,7 +1,6 @@
|
||||||
package trustmanager
|
package trustmanager
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/sha256"
|
|
||||||
"crypto/x509"
|
"crypto/x509"
|
||||||
"errors"
|
"errors"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
|
@ -89,10 +88,6 @@ func (s X509FileStore) addNamedCert(cert *x509.Certificate, filename string) err
|
||||||
return errors.New("certificate validation failed")
|
return errors.New("certificate validation failed")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Overwrite every certificate SubjectKeyID with a SHA256 version.
|
|
||||||
subjectKeyID := sha256.Sum256(cert.Raw)
|
|
||||||
cert.SubjectKeyId = subjectKeyID[:]
|
|
||||||
|
|
||||||
// Add the certificate to our in-memory storage
|
// Add the certificate to our in-memory storage
|
||||||
s.fingerprintMap[fingerprint] = cert
|
s.fingerprintMap[fingerprint] = cert
|
||||||
s.fileMap[fingerprint] = filename
|
s.fileMap[fingerprint] = filename
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue