From e4028b23c74ae37a8cf2bb83dae4e65b37469125 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Sat, 31 Oct 2015 13:15:47 -0600 Subject: [PATCH] letsencrypt: Email prompt includes link to SA --- caddy/letsencrypt/letsencrypt.go | 7 ++++--- caddy/letsencrypt/user.go | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/caddy/letsencrypt/letsencrypt.go b/caddy/letsencrypt/letsencrypt.go index f7a5fd54..b060afa7 100644 --- a/caddy/letsencrypt/letsencrypt.go +++ b/caddy/letsencrypt/letsencrypt.go @@ -30,10 +30,12 @@ import ( // if that is not available it will check the command line // argument. If absent, it will use the most recent email // address from last time. If there isn't one, the user -// will be prompted. If the user leaves email blank, . +// will be prompted and shown SA link. // // Also note that calling this function activates asset -// management automatically, which . +// management automatically, which keeps certificates +// renewed and OCSP stapling updated. This has the effect +// of causing restarts when assets are updated. // // Activate returns the updated list of configs, since // some may have been appended, for example, to redirect @@ -41,7 +43,6 @@ import ( func Activate(configs []server.Config) ([]server.Config, error) { // just in case previous caller forgot... Deactivate() - // TODO: Is multiple activation (before a deactivation) an error? // reset cached ocsp statuses from any previous activations ocspStatus = make(map[*[]byte]int) diff --git a/caddy/letsencrypt/user.go b/caddy/letsencrypt/user.go index 0e7a8b45..1e1ab2c4 100644 --- a/caddy/letsencrypt/user.go +++ b/caddy/letsencrypt/user.go @@ -143,11 +143,12 @@ func getEmail(cfg server.Config) string { } } if leEmail == "" { - // Alas, we must bother the user and ask for an email address + // Alas, we must bother the user and ask for an email address; + // if they proceed they also agree to the SA. reader := bufio.NewReader(stdin) fmt.Println("Your sites will be served over HTTPS automatically using Let's Encrypt.") fmt.Println("By continuing, you agree to the Let's Encrypt Subscriber Agreement at:") - fmt.Println(" ") + fmt.Println(" https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf") // TODO: Show current SA link fmt.Println("Please enter your email address so you can recover your account if needed.") fmt.Println("You can leave it blank, but you lose the ability to recover your account.") fmt.Print("Email address: ") @@ -157,6 +158,7 @@ func getEmail(cfg server.Config) string { return "" } DefaultEmail = leEmail + Agreed = true } return strings.TrimSpace(leEmail) }