From a4e9eeefed99da75cc82adb3d81165b22861c408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ken-H=C3=A5vard=20Lieng?= Date: Sat, 20 May 2017 23:06:37 +0200 Subject: [PATCH] Handle error returned by acme.NewClient --- letsencrypt/letsencrypt.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/letsencrypt/letsencrypt.go b/letsencrypt/letsencrypt.go index e0d2fd78..ff8ae262 100644 --- a/letsencrypt/letsencrypt.go +++ b/letsencrypt/letsencrypt.go @@ -25,6 +25,9 @@ func Run(dir, domain, email, port string) (*state, error) { } client, err := acme.NewClient(URL, &user, acme.RSA2048) + if err != nil { + return nil, err + } client.ExcludeChallenges([]acme.Challenge{acme.TLSSNI01}) client.SetHTTPAddress(port)