From dd85f25cb3555b6bfbbd7c8ce92e71aae45daa29 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Mon, 16 Jul 2018 22:50:51 +0200 Subject: [PATCH] Exclude TLS ALPN for some CLI arguments (#599) --- cli_handlers.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cli_handlers.go b/cli_handlers.go index dd986de5..19b8dc8e 100644 --- a/cli_handlers.go +++ b/cli_handlers.go @@ -40,7 +40,7 @@ func setup(c *cli.Context) (*Configuration, *Account, *acme.Client) { } if len(c.GlobalStringSlice("dns-resolvers")) > 0 { - resolvers := []string{} + var resolvers []string for _, resolver := range c.GlobalStringSlice("dns-resolvers") { if !strings.Contains(resolver, ":") { resolver += ":53" @@ -92,7 +92,7 @@ func setup(c *cli.Context) (*Configuration, *Account, *acme.Client) { // --webroot=foo indicates that the user specifically want to do a HTTP challenge // infer that the user also wants to exclude all other challenges - client.ExcludeChallenges([]acme.Challenge{acme.DNS01}) + client.ExcludeChallenges([]acme.Challenge{acme.DNS01, acme.TLSALPN01}) } if c.GlobalIsSet("memcached-host") { provider, err := memcached.NewMemcachedProvider(c.GlobalStringSlice("memcached-host")) @@ -107,7 +107,7 @@ func setup(c *cli.Context) (*Configuration, *Account, *acme.Client) { // --memcached-host=foo:11211 indicates that the user specifically want to do a HTTP challenge // infer that the user also wants to exclude all other challenges - client.ExcludeChallenges([]acme.Challenge{acme.DNS01}) + client.ExcludeChallenges([]acme.Challenge{acme.DNS01, acme.TLSALPN01}) } if c.GlobalIsSet("http") { if !strings.Contains(c.GlobalString("http"), ":") { @@ -140,7 +140,7 @@ func setup(c *cli.Context) (*Configuration, *Account, *acme.Client) { // --dns=foo indicates that the user specifically want to do a DNS challenge // infer that the user also wants to exclude all other challenges - client.ExcludeChallenges([]acme.Challenge{acme.HTTP01}) + client.ExcludeChallenges([]acme.Challenge{acme.HTTP01, acme.TLSALPN01}) } if client.GetExternalAccountRequired() && !c.GlobalIsSet("eab") {