Merge pull request #1910 from posita/posita/1880-ssl-cert-snafu

READY FOR REVIEW - Work-around erroneous SSL: CERTIFICATE_VERIFY_FAILED error with some buggy versions of OpenSSL
This commit is contained in:
Olivier Gambier 2015-10-22 09:57:56 -07:00
commit c60b2cb2f9
2 changed files with 4 additions and 3 deletions

View File

@ -20,7 +20,8 @@ func BootstrapCertificates(authOptions *auth.AuthOptions) error {
// 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
// $USER.
org := mcnutils.GetUsername()
caOrg := mcnutils.GetUsername()
org := caOrg + ".<bootstrap>"
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.")
}
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)
}
}

View File

@ -63,7 +63,7 @@ func ConfigureAuth(p Provisioner) error {
driver := p.GetDriver()
machineName := driver.GetMachineName()
authOptions := p.GetAuthOptions()
org := machineName
org := mcnutils.GetUsername() + "." + machineName
bits := 2048
ip, err := driver.GetIP()