mirror of https://github.com/docker/docs.git
Inspired by #1880 (and docker/compose#890 et al.). Make sure `ca.pem` subject is different from `cert.pem` subject to work-around OpenSSL bug.
Signed-off-by: Matt Bogosian <mtb19@columbia.edu>
This commit is contained in:
parent
de5d052985
commit
f80dc360c7
|
@ -20,7 +20,8 @@ func BootstrapCertificates(authOptions *auth.AuthOptions) error {
|
||||||
// TODO: I'm not super happy about this use of "org", the user should
|
// TODO: I'm not super happy about this use of "org", the user should
|
||||||
// have to specify it explicitly instead of implicitly basing it on
|
// have to specify it explicitly instead of implicitly basing it on
|
||||||
// $USER.
|
// $USER.
|
||||||
org := mcnutils.GetUsername()
|
caOrg := mcnutils.GetUsername()
|
||||||
|
org := caOrg + ".<bootstrap>"
|
||||||
|
|
||||||
bits := 2048
|
bits := 2048
|
||||||
|
|
||||||
|
@ -42,7 +43,7 @@ func BootstrapCertificates(authOptions *auth.AuthOptions) error {
|
||||||
return errors.New("The CA key already exists. Please remove it or specify a different key/cert.")
|
return errors.New("The CA key already exists. Please remove it or specify a different key/cert.")
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := GenerateCACertificate(caCertPath, caPrivateKeyPath, org, bits); err != nil {
|
if err := GenerateCACertificate(caCertPath, caPrivateKeyPath, caOrg, bits); err != nil {
|
||||||
return fmt.Errorf("Generating CA certificate failed: %s", err)
|
return fmt.Errorf("Generating CA certificate failed: %s", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@ func ConfigureAuth(p Provisioner) error {
|
||||||
driver := p.GetDriver()
|
driver := p.GetDriver()
|
||||||
machineName := driver.GetMachineName()
|
machineName := driver.GetMachineName()
|
||||||
authOptions := p.GetAuthOptions()
|
authOptions := p.GetAuthOptions()
|
||||||
org := machineName
|
org := mcnutils.GetUsername() + "." + machineName
|
||||||
bits := 2048
|
bits := 2048
|
||||||
|
|
||||||
ip, err := driver.GetIP()
|
ip, err := driver.GetIP()
|
||||||
|
|
Loading…
Reference in New Issue