-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
131 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# This is a example of a response file, used with --response-file. | ||
# It automatically answers prompts for unattended operation. | ||
# grep for UniqueID in the source code for prompt names. | ||
# Pass --response-file to all invocations, not just quickstart. | ||
# You will typically want to use --response-file with --stdio or --batch. | ||
# For dialogs not requiring a response, but merely acknowledgement, specify true. | ||
# This file is YAML. Note that JSON is a subset of YAML. | ||
"acmetool-quickstart-choose-server": https://acme-staging.api.letsencrypt.org/directory | ||
"acmetool-quickstart-choose-method": redirector | ||
"acme-enter-email": "hostmaster@example.com" | ||
"acmetool-quickstart-complete": true | ||
"acmetool-quickstart-install-cronjob": true | ||
"acmetool-quickstart-install-haproxy-script": true | ||
"acmetool-quickstart-install-redirector-systemd": true | ||
"acmetool-quickstart-rsa-key-size": 4096 | ||
"acme-agreement:https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf": true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package interaction | ||
|
||
import "fmt" | ||
|
||
type responder struct{} | ||
|
||
var responses = map[string]*Response{} | ||
|
||
// Auto-responder. | ||
var Responder Interactor = responder{} | ||
|
||
func (responder) Status(c *StatusInfo) (StatusSink, error) { | ||
return nil, fmt.Errorf("not supported") | ||
} | ||
|
||
func (responder) Prompt(c *Challenge) (*Response, error) { | ||
if c.UniqueID == "" { | ||
return nil, fmt.Errorf("cannot auto-respond to a challenge without a unique ID") | ||
} | ||
|
||
res := responses[c.UniqueID] | ||
if res == nil { | ||
return nil, fmt.Errorf("unknown unique ID, cannot respond: %#v", c.UniqueID) | ||
} | ||
|
||
return res, nil | ||
} | ||
|
||
func SetResponse(uniqueID string, res *Response) { | ||
responses[uniqueID] = res | ||
} | ||
|
||
// © 2015 Hugo Landau <hlandau@devever.net> MIT License |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters