Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Commit

Permalink
Add more logs
Browse files Browse the repository at this point in the history
Signed-off-by: David Gageot <david@gageot.net>
  • Loading branch information
dgageot committed Oct 21, 2015
1 parent 39e400a commit 30a9399
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libmachine/cert/cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,19 @@ func GenerateCert(hosts []string, certFile, keyFile, caFile, caKeyFile, org stri

// ValidateCertificate validate the certificate installed on the vm.
func ValidateCertificate(addr, caCertPath, serverCertPath, serverKeyPath string) (bool, error) {
log.Debugf("Reading CA certificate from %s", caCertPath)
caCert, err := ioutil.ReadFile(caCertPath)
if err != nil {
return false, ErrValidatingCert{err}
}

log.Debugf("Reading server certificate from %s", serverCertPath)
serverCert, err := ioutil.ReadFile(serverCertPath)
if err != nil {
return false, ErrValidatingCert{err}
}

log.Debugf("Reading server key from %s", serverKeyPath)
serverKey, err := ioutil.ReadFile(serverKeyPath)
if err != nil {
return false, ErrValidatingCert{err}
Expand Down

0 comments on commit 30a9399

Please sign in to comment.