Improve log message consistency

This commit is contained in:
Jakob Borg
2013-12-30 15:27:46 -05:00
parent 7948d046d1
commit ec0489a8ea
5 changed files with 13 additions and 11 deletions

4
tls.go
View File

@@ -58,11 +58,11 @@ func newCertificate(dir string) {
fatalErr(err)
pem.Encode(certOut, &pem.Block{Type: "CERTIFICATE", Bytes: derBytes})
certOut.Close()
okln("wrote cert.pem")
okln("Created TLS certificate file")
keyOut, err := os.OpenFile(path.Join(dir, "key.pem"), os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
fatalErr(err)
pem.Encode(keyOut, &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(priv)})
keyOut.Close()
okln("wrote key.pem")
okln("Created TLS key file")
}