From 701d1ab638b23c24877fc41824add66232446676 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Thu, 2 Feb 2017 09:32:00 -0500 Subject: Updating server dependancies (#5249) --- vendor/github.com/xenolf/lego/cli_handlers.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'vendor/github.com/xenolf/lego/cli_handlers.go') 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) -- cgit v1.2.3-1-g7c22