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
b143bbdb
Commit
b143bbdb
authored
Nov 02, 2015
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
letsencrypt: Better logic for handling issuance failures
This fixes a bug with the -agree flag
parent
be0fb005
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
caddy/letsencrypt/letsencrypt.go
caddy/letsencrypt/letsencrypt.go
+7
-6
No files found.
caddy/letsencrypt/letsencrypt.go
View file @
b143bbdb
...
...
@@ -89,15 +89,16 @@ func Activate(configs []server.Config) ([]server.Config, error) {
// Build an error string to return, using all the failures in the list.
var
errMsg
string
// An agreement error means we need to prompt the user (once) with updated terms
// while they're still here.
var
promptedUpdatedTerms
bool
// If an error is because of updated SA, only prompt user for agreement once
var
promptedForAgreement
bool
for
domain
,
obtainErr
:=
range
failures
{
// If the failure was simply because the terms have changed, re-prompt and re-try
if
tosErr
,
ok
:=
obtainErr
.
(
acme
.
TOSError
);
ok
&&
!
promptedUpdatedTerms
{
Agreed
=
promptUserAgreement
(
tosErr
.
Detail
,
true
)
// TODO: Use latest URL
promptedUpdatedTerms
=
true
if
tosErr
,
ok
:=
obtainErr
.
(
acme
.
TOSError
);
ok
{
if
!
Agreed
&&
!
promptedForAgreement
{
Agreed
=
promptUserAgreement
(
tosErr
.
Detail
,
true
)
// TODO: Use latest URL
promptedForAgreement
=
true
}
if
Agreed
{
err
:=
client
.
AgreeToTOS
()
if
err
!=
nil
{
...
...
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