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
5c96ee1d
Commit
5c96ee1d
authored
Apr 22, 2016
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug in renewing default certificate
parent
3c578dfb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
caddy/https/maintain.go
caddy/https/maintain.go
+11
-2
No files found.
caddy/https/maintain.go
View file @
5c96ee1d
...
...
@@ -112,12 +112,21 @@ func renewManagedCertificates(allowPrompts bool) (err error) {
// Apply changes to the cache
for
_
,
cert
:=
range
renewed
{
if
cert
.
Names
[
len
(
cert
.
Names
)
-
1
]
==
""
{
// Special case: This is the default certificate, so we must
// ensure it gets updated as well, otherwise the renewal
// routine will find it and think it still needs to be renewed,
// even though we already renewed it...
certCacheMu
.
Lock
()
delete
(
certCache
,
""
)
certCacheMu
.
Unlock
()
}
_
,
err
:=
cacheManagedCertificate
(
cert
.
Names
[
0
],
cert
.
OnDemand
)
if
err
!=
nil
{
if
client
.
AllowPrompts
{
return
err
// operator is present, so report error immediately
}
log
.
Printf
(
"[ERROR] %v"
,
err
)
log
.
Printf
(
"[ERROR]
Caching renewed certificate:
%v"
,
err
)
}
}
for
_
,
cert
:=
range
deleted
{
...
...
@@ -178,7 +187,7 @@ func updateOCSPStaples() {
if
err
!=
nil
{
if
cert
.
OCSP
!=
nil
{
// if it was no staple before, that's fine, otherwise we should log the error
log
.
Printf
(
"[ERROR] Checking OCSP for %
s: %v"
,
name
,
err
)
log
.
Printf
(
"[ERROR] Checking OCSP for %
v: %v"
,
cert
.
Names
,
err
)
}
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