Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
caddy
Commits
f8ad050d
Commit
f8ad050d
authored
Oct 24, 2015
by
xenolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update for latest lego changes (cert bundling)
parent
2e5eb638
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
config/letsencrypt/letsencrypt.go
config/letsencrypt/letsencrypt.go
+1
-1
config/letsencrypt/renew.go
config/letsencrypt/renew.go
+3
-2
No files found.
config/letsencrypt/letsencrypt.go
View file @
f8ad050d
...
@@ -189,7 +189,7 @@ func obtainCertificates(client *acme.Client, serverConfigs []*server.Config) ([]
...
@@ -189,7 +189,7 @@ func obtainCertificates(client *acme.Client, serverConfigs []*server.Config) ([]
hosts
=
append
(
hosts
,
cfg
.
Host
)
hosts
=
append
(
hosts
,
cfg
.
Host
)
}
}
certificates
,
err
:=
client
.
ObtainCertificates
(
hosts
)
certificates
,
err
:=
client
.
ObtainCertificates
(
hosts
,
true
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
errors
.
New
(
"error obtaining certs: "
+
err
.
Error
())
return
nil
,
errors
.
New
(
"error obtaining certs: "
+
err
.
Error
())
}
}
...
...
config/letsencrypt/renew.go
View file @
f8ad050d
...
@@ -84,10 +84,11 @@ func processCertificateRenewal(configs []server.Config) []error {
...
@@ -84,10 +84,11 @@ func processCertificateRenewal(configs []server.Config) []error {
// Renew certificate.
// Renew certificate.
// TODO: revokeOld should be an option in the caddyfile
// 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
{
if
err
!=
nil
{
time
.
Sleep
(
10
*
time
.
Second
)
time
.
Sleep
(
10
*
time
.
Second
)
newCertMeta
,
err
=
client
.
RenewCertificate
(
certMeta
,
true
)
newCertMeta
,
err
=
client
.
RenewCertificate
(
certMeta
,
true
,
true
)
if
err
!=
nil
{
if
err
!=
nil
{
errs
=
append
(
errs
,
err
)
errs
=
append
(
errs
,
err
)
continue
continue
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment