0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-23 22:27:38 -05:00

Update for latest lego changes (cert bundling)

This commit is contained in:
xenolf 2015-10-24 04:35:55 +02:00
parent 2e5eb63850
commit f8ad050dda
2 changed files with 4 additions and 3 deletions

View file

@ -189,7 +189,7 @@ func obtainCertificates(client *acme.Client, serverConfigs []*server.Config) ([]
hosts = append(hosts, cfg.Host)
}
certificates, err := client.ObtainCertificates(hosts)
certificates, err := client.ObtainCertificates(hosts, true)
if err != nil {
return nil, errors.New("error obtaining certs: " + err.Error())
}

View file

@ -84,10 +84,11 @@ func processCertificateRenewal(configs []server.Config) []error {
// Renew certificate.
// TODO: revokeOld should be an option in the caddyfile
newCertMeta, err := client.RenewCertificate(certMeta, true)
// TODO: bundle should be an option in the caddyfile as well :)
newCertMeta, err := client.RenewCertificate(certMeta, true, true)
if err != nil {
time.Sleep(10 * time.Second)
newCertMeta, err = client.RenewCertificate(certMeta, true)
newCertMeta, err = client.RenewCertificate(certMeta, true, true)
if err != nil {
errs = append(errs, err)
continue