summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/xenolf/lego/cli_handlers.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/xenolf/lego/cli_handlers.go')
-rw-r--r--vendor/github.com/xenolf/lego/cli_handlers.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/vendor/github.com/xenolf/lego/cli_handlers.go b/vendor/github.com/xenolf/lego/cli_handlers.go
index 858d71000..dad19a144 100644
--- a/vendor/github.com/xenolf/lego/cli_handlers.go
+++ b/vendor/github.com/xenolf/lego/cli_handlers.go
@@ -136,12 +136,20 @@ func saveCertRes(certRes acme.CertificateResource, conf *Configuration) {
privOut := path.Join(conf.CertPath(), certRes.Domain+".key")
pemOut := path.Join(conf.CertPath(), certRes.Domain+".pem")
metaOut := path.Join(conf.CertPath(), certRes.Domain+".json")
+ issuerOut := path.Join(conf.CertPath(), certRes.Domain+".issuer.crt")
err := ioutil.WriteFile(certOut, certRes.Certificate, 0600)
if err != nil {
logger().Fatalf("Unable to save Certificate for domain %s\n\t%s", certRes.Domain, err.Error())
}
+ if certRes.IssuerCertificate != nil {
+ err = ioutil.WriteFile(issuerOut, certRes.IssuerCertificate, 0600)
+ if err != nil {
+ logger().Fatalf("Unable to save IssuerCertificate for domain %s\n\t%s", certRes.Domain, err.Error())
+ }
+ }
+
if certRes.PrivateKey != nil {
// if we were given a CSR, we don't know the private key
err = ioutil.WriteFile(privOut, certRes.PrivateKey, 0600)