From 6263e856c9bdbe905871a4b01345b28fc90beee6 Mon Sep 17 00:00:00 2001 From: Tom Limoncelli Date: Fri, 29 May 2020 16:56:46 -0400 Subject: [PATCH] get-certs now generates a .pem file in addition to .key and .crt (#750) --- pkg/acme/directoryStorage.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/acme/directoryStorage.go b/pkg/acme/directoryStorage.go index 0a1218b7b..26832077d 100644 --- a/pkg/acme/directoryStorage.go +++ b/pkg/acme/directoryStorage.go @@ -70,6 +70,7 @@ func (d directoryStorage) StoreCertificate(name string, cert *certificate.Resour cert.Certificate = nil priv := cert.PrivateKey cert.PrivateKey = nil + combined := []byte(string(pub) + "\n" + string(priv)) jDAt, err := json.MarshalIndent(cert, "", " ") if err != nil { return err @@ -80,6 +81,9 @@ func (d directoryStorage) StoreCertificate(name string, cert *certificate.Resour if err = ioutil.WriteFile(d.certFile(name, "crt"), pub, perms); err != nil { return err } + if err = ioutil.WriteFile(d.certFile(name, "pem"), combined, perms); err != nil { + return err + } return ioutil.WriteFile(d.certFile(name, "key"), priv, perms) }