From 6e5182512c82d3295ed732a8fa9c62d3fb509f9e Mon Sep 17 00:00:00 2001 From: Manuel Gysin Date: Sat, 3 Dec 2016 17:22:19 +0100 Subject: [PATCH 01/10] Added multiple DNS provider support --- acme/client.go | 3 ++- acme/dns_challenge.go | 48 +++++++++++++++++++++++++++++++------------ cli_handlers.go | 16 +++++++++++---- 3 files changed, 49 insertions(+), 18 deletions(-) diff --git a/acme/client.go b/acme/client.go index 9f837af366..77f994b0e8 100644 --- a/acme/client.go +++ b/acme/client.go @@ -15,6 +15,7 @@ import ( "strconv" "strings" "time" + "reflect" ) var ( @@ -105,7 +106,7 @@ func (c *Client) SetChallengeProvider(challenge Challenge, p ChallengeProvider) case TLSSNI01: c.solvers[challenge] = &tlsSNIChallenge{jws: c.jws, validate: validate, provider: p} case DNS01: - c.solvers[challenge] = &dnsChallenge{jws: c.jws, validate: validate, provider: p} + c.solvers[challenge] = &dnsChallenge{jws: c.jws, validate: validate, providers: p} default: return fmt.Errorf("Unknown challenge %v", challenge) } diff --git a/acme/dns_challenge.go b/acme/dns_challenge.go index 30f2170ff5..23b93ea8c1 100644 --- a/acme/dns_challenge.go +++ b/acme/dns_challenge.go @@ -69,13 +69,13 @@ func DNS01Record(domain, keyAuth string) (fqdn string, value string, ttl int) { type dnsChallenge struct { jws *jws validate validateFunc - provider ChallengeProvider + providers []ChallengeProvider } func (s *dnsChallenge) Solve(chlng challenge, domain string) error { logf("[INFO][%s] acme: Trying to solve DNS-01", domain) - if s.provider == nil { + if s.providers == nil { return errors.New("No DNS Provider configured") } @@ -85,14 +85,22 @@ func (s *dnsChallenge) Solve(chlng challenge, domain string) error { return err } - err = s.provider.Present(domain, chlng.Token, keyAuth) - if err != nil { - return fmt.Errorf("Error presenting token: %s", err) + for _, v := range s.providers { + err = v.Present(domain, chlng.Token, keyAuth) + + if err != nil { + return fmt.Errorf("Error presenting token: %s", err) + } } + defer func() { - err := s.provider.CleanUp(domain, chlng.Token, keyAuth) - if err != nil { - log.Printf("Error cleaning up %s: %v ", domain, err) + + for _, v := range s.providers { + err := v.CleanUp(domain, chlng.Token, keyAuth) + + if err != nil { + log.Printf("Error cleaning up %s: %v ", domain, err) + } } }() @@ -101,16 +109,30 @@ func (s *dnsChallenge) Solve(chlng challenge, domain string) error { logf("[INFO][%s] Checking DNS record propagation using %+v", domain, RecursiveNameservers) var timeout, interval time.Duration - switch provider := s.provider.(type) { - case ChallengeProviderTimeout: - timeout, interval = provider.Timeout() - default: - timeout, interval = 60*time.Second, 2*time.Second + + for _, v := range s.providers { + var tiou, inter int + + switch provider := v.(type) { + case ChallengeProviderTimeout: + tiou, inter = provider.Timeout() + default: + tiou, inter = 60*time.Second, 2*time.Second + } + + // Check if interval or timeout is greater, we take the highest number + if timeout < tiou { + timeout = tiou + } + if interval < inter { + interval = inter + } } err = WaitFor(timeout, interval, func() (bool, error) { return PreCheckDNS(fqdn, value) }) + if err != nil { return err } diff --git a/cli_handlers.go b/cli_handlers.go index 858d710006..650907ee0c 100644 --- a/cli_handlers.go +++ b/cli_handlers.go @@ -114,12 +114,20 @@ func setup(c *cli.Context) (*Configuration, *Account, *acme.Client) { } if c.GlobalIsSet("dns") { - provider, err := dns.NewDNSChallengeProviderByName(c.GlobalString("dns")) - if err != nil { - logger().Fatal(err) + // Get providers + var providers []DNSProvider + + for _, v := range strings.Split(c.GlobalString("dns"), ',') { + provider, err := dns.NewDNSChallengeProviderByName(v) + + if err != nil { + logger().Fatal(err) + } + + providers.append(provider) } - client.SetChallengeProvider(acme.DNS01, provider) + client.SetChallengeProvider(acme.DNS01, providers) // --dns=foo indicates that the user specifically want to do a DNS challenge // infer that the user also wants to exclude all other challenges From 22d4e2d8086529bcfdba5f0215af90094a4235b0 Mon Sep 17 00:00:00 2001 From: Manuel Gysin Date: Sat, 3 Dec 2016 17:39:24 +0100 Subject: [PATCH 02/10] Fixed bug --- cli_handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli_handlers.go b/cli_handlers.go index 650907ee0c..0ad0bf3ddb 100644 --- a/cli_handlers.go +++ b/cli_handlers.go @@ -115,7 +115,7 @@ func setup(c *cli.Context) (*Configuration, *Account, *acme.Client) { if c.GlobalIsSet("dns") { // Get providers - var providers []DNSProvider + var providers []struct{} for _, v := range strings.Split(c.GlobalString("dns"), ',') { provider, err := dns.NewDNSChallengeProviderByName(v) From 46fbcdb7c043683ea33e5d3bcbd8c4690b590876 Mon Sep 17 00:00:00 2001 From: Manuel Gysin Date: Sat, 3 Dec 2016 17:53:23 +0100 Subject: [PATCH 03/10] More fixes --- cli_handlers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli_handlers.go b/cli_handlers.go index 0ad0bf3ddb..99d2aea054 100644 --- a/cli_handlers.go +++ b/cli_handlers.go @@ -117,14 +117,14 @@ func setup(c *cli.Context) (*Configuration, *Account, *acme.Client) { // Get providers var providers []struct{} - for _, v := range strings.Split(c.GlobalString("dns"), ',') { + for _, v := range strings.Split(c.GlobalString("dns"), ",") { provider, err := dns.NewDNSChallengeProviderByName(v) if err != nil { logger().Fatal(err) } - providers.append(provider) + providers = append(providers, provider) } client.SetChallengeProvider(acme.DNS01, providers) From deb89de6488512b6075073273bdc24343c084fca Mon Sep 17 00:00:00 2001 From: Manuel Gysin Date: Sat, 3 Dec 2016 20:08:25 +0100 Subject: [PATCH 04/10] Next fix --- cli_handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli_handlers.go b/cli_handlers.go index 99d2aea054..68e16b8b75 100644 --- a/cli_handlers.go +++ b/cli_handlers.go @@ -115,7 +115,7 @@ func setup(c *cli.Context) (*Configuration, *Account, *acme.Client) { if c.GlobalIsSet("dns") { // Get providers - var providers []struct{} + var providers []acme.ChallengeProvider for _, v := range strings.Split(c.GlobalString("dns"), ",") { provider, err := dns.NewDNSChallengeProviderByName(v) From 0c07f2d339395eef6f685f14d88af16dbe2ab7bd Mon Sep 17 00:00:00 2001 From: Manuel Gysin Date: Sat, 3 Dec 2016 20:19:44 +0100 Subject: [PATCH 05/10] Fix --- acme/client.go | 7 +++++-- cli_handlers.go | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/acme/client.go b/acme/client.go index 77f994b0e8..e20f36c833 100644 --- a/acme/client.go +++ b/acme/client.go @@ -105,14 +105,17 @@ func (c *Client) SetChallengeProvider(challenge Challenge, p ChallengeProvider) c.solvers[challenge] = &httpChallenge{jws: c.jws, validate: validate, provider: p} case TLSSNI01: c.solvers[challenge] = &tlsSNIChallenge{jws: c.jws, validate: validate, provider: p} - case DNS01: - c.solvers[challenge] = &dnsChallenge{jws: c.jws, validate: validate, providers: p} default: return fmt.Errorf("Unknown challenge %v", challenge) } return nil } +func (c *Client) SetChallengeProviderDNS(challenge Challenge, p []ChallengeProvider) error { + c.solvers[challenge] = &dnsChallenge{jws: c.jws, validate: validate, providers: p} + return nil +} + // SetHTTPAddress specifies a custom interface:port to be used for HTTP based challenges. // If this option is not used, the default port 80 and all interfaces will be used. // To only specify a port and no interface use the ":port" notation. diff --git a/cli_handlers.go b/cli_handlers.go index 68e16b8b75..2385f7a2a0 100644 --- a/cli_handlers.go +++ b/cli_handlers.go @@ -127,7 +127,7 @@ func setup(c *cli.Context) (*Configuration, *Account, *acme.Client) { providers = append(providers, provider) } - client.SetChallengeProvider(acme.DNS01, providers) + client.SetChallengeProviderDNS(acme.DNS01, providers) // --dns=foo indicates that the user specifically want to do a DNS challenge // infer that the user also wants to exclude all other challenges From a5968cf14b7c9577cf6422fef965f020d3ff35e2 Mon Sep 17 00:00:00 2001 From: Manuel Gysin Date: Sat, 3 Dec 2016 20:24:19 +0100 Subject: [PATCH 06/10] Fix --- account.go | 2 +- cli.go | 2 +- cli_handlers.go | 8 ++--- configuration.go | 2 +- providers/dns/auroradns/auroradns.go | 2 +- providers/dns/azure/azure.go | 2 +- providers/dns/cloudflare/cloudflare.go | 2 +- providers/dns/digitalocean/digitalocean.go | 2 +- providers/dns/dns_providers.go | 42 +++++++++++----------- providers/dns/dns_providers_test.go | 2 +- providers/dns/dnsimple/dnsimple.go | 2 +- providers/dns/dnsmadeeasy/dnsmadeeasy.go | 2 +- providers/dns/dnspod/dnspod.go | 2 +- providers/dns/dyn/dyn.go | 2 +- providers/dns/exoscale/exoscale.go | 2 +- providers/dns/gandi/gandi.go | 2 +- providers/dns/gandi/gandi_test.go | 2 +- providers/dns/googlecloud/googlecloud.go | 2 +- providers/dns/linode/linode.go | 2 +- providers/dns/namecheap/namecheap.go | 2 +- providers/dns/ns1/ns1.go | 2 +- providers/dns/ovh/ovh.go | 2 +- providers/dns/pdns/pdns.go | 2 +- providers/dns/rackspace/rackspace.go | 2 +- providers/dns/rfc2136/rfc2136.go | 2 +- providers/dns/rfc2136/rfc2136_test.go | 2 +- providers/dns/route53/route53.go | 2 +- providers/dns/vultr/vultr.go | 2 +- providers/http/memcached/memcached.go | 2 +- providers/http/memcached/memcached_test.go | 2 +- providers/http/webroot/webroot.go | 2 +- 31 files changed, 54 insertions(+), 54 deletions(-) diff --git a/account.go b/account.go index 34856e16f0..be690a8a2a 100644 --- a/account.go +++ b/account.go @@ -7,7 +7,7 @@ import ( "os" "path" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // Account represents a users local saved credentials diff --git a/cli.go b/cli.go index 61c08d455c..351967584e 100644 --- a/cli.go +++ b/cli.go @@ -11,7 +11,7 @@ import ( "text/tabwriter" "github.com/urfave/cli" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // Logger is used to log errors; if nil, the default log.Logger is used. diff --git a/cli_handlers.go b/cli_handlers.go index 2385f7a2a0..8c024756f8 100644 --- a/cli_handlers.go +++ b/cli_handlers.go @@ -14,10 +14,10 @@ import ( "time" "github.com/urfave/cli" - "github.com/xenolf/lego/acme" - "github.com/xenolf/lego/providers/dns" - "github.com/xenolf/lego/providers/http/memcached" - "github.com/xenolf/lego/providers/http/webroot" + "github.com/ManuelGysin/lego/acme" + "github.com/ManuelGysin/lego/providers/dns" + "github.com/ManuelGysin/lego/providers/http/memcached" + "github.com/ManuelGysin/lego/providers/http/webroot" ) func checkFolder(path string) error { diff --git a/configuration.go b/configuration.go index f92c1fe96d..eb84f3bf46 100644 --- a/configuration.go +++ b/configuration.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/urfave/cli" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // Configuration type from CLI and config files. diff --git a/providers/dns/auroradns/auroradns.go b/providers/dns/auroradns/auroradns.go index 55b48f9b40..7233cda9a8 100644 --- a/providers/dns/auroradns/auroradns.go +++ b/providers/dns/auroradns/auroradns.go @@ -5,7 +5,7 @@ import ( "github.com/edeckers/auroradnsclient" "github.com/edeckers/auroradnsclient/records" "github.com/edeckers/auroradnsclient/zones" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" "os" "sync" ) diff --git a/providers/dns/azure/azure.go b/providers/dns/azure/azure.go index 9d281cd695..24883084ff 100644 --- a/providers/dns/azure/azure.go +++ b/providers/dns/azure/azure.go @@ -12,7 +12,7 @@ import ( "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/to" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" "strings" ) diff --git a/providers/dns/cloudflare/cloudflare.go b/providers/dns/cloudflare/cloudflare.go index 84952238d8..e6a6caef8e 100644 --- a/providers/dns/cloudflare/cloudflare.go +++ b/providers/dns/cloudflare/cloudflare.go @@ -11,7 +11,7 @@ import ( "os" "time" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // CloudFlareAPIURL represents the API endpoint to call. diff --git a/providers/dns/digitalocean/digitalocean.go b/providers/dns/digitalocean/digitalocean.go index da261b39ad..c1ca4329c4 100644 --- a/providers/dns/digitalocean/digitalocean.go +++ b/providers/dns/digitalocean/digitalocean.go @@ -11,7 +11,7 @@ import ( "sync" "time" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface diff --git a/providers/dns/dns_providers.go b/providers/dns/dns_providers.go index 33fca0fada..e2d7388acb 100644 --- a/providers/dns/dns_providers.go +++ b/providers/dns/dns_providers.go @@ -4,27 +4,27 @@ package dns import ( "fmt" - "github.com/xenolf/lego/acme" - "github.com/xenolf/lego/providers/dns/auroradns" - "github.com/xenolf/lego/providers/dns/azure" - "github.com/xenolf/lego/providers/dns/cloudflare" - "github.com/xenolf/lego/providers/dns/digitalocean" - "github.com/xenolf/lego/providers/dns/dnsimple" - "github.com/xenolf/lego/providers/dns/dnsmadeeasy" - "github.com/xenolf/lego/providers/dns/dnspod" - "github.com/xenolf/lego/providers/dns/dyn" - "github.com/xenolf/lego/providers/dns/exoscale" - "github.com/xenolf/lego/providers/dns/gandi" - "github.com/xenolf/lego/providers/dns/googlecloud" - "github.com/xenolf/lego/providers/dns/linode" - "github.com/xenolf/lego/providers/dns/namecheap" - "github.com/xenolf/lego/providers/dns/ns1" - "github.com/xenolf/lego/providers/dns/ovh" - "github.com/xenolf/lego/providers/dns/pdns" - "github.com/xenolf/lego/providers/dns/rackspace" - "github.com/xenolf/lego/providers/dns/rfc2136" - "github.com/xenolf/lego/providers/dns/route53" - "github.com/xenolf/lego/providers/dns/vultr" + "github.com/ManuelGysin/lego/acme" + "github.com/ManuelGysin/lego/providers/dns/auroradns" + "github.com/ManuelGysin/lego/providers/dns/azure" + "github.com/ManuelGysin/lego/providers/dns/cloudflare" + "github.com/ManuelGysin/lego/providers/dns/digitalocean" + "github.com/ManuelGysin/lego/providers/dns/dnsimple" + "github.com/ManuelGysin/lego/providers/dns/dnsmadeeasy" + "github.com/ManuelGysin/lego/providers/dns/dnspod" + "github.com/ManuelGysin/lego/providers/dns/dyn" + "github.com/ManuelGysin/lego/providers/dns/exoscale" + "github.com/ManuelGysin/lego/providers/dns/gandi" + "github.com/ManuelGysin/lego/providers/dns/googlecloud" + "github.com/ManuelGysin/lego/providers/dns/linode" + "github.com/ManuelGysin/lego/providers/dns/namecheap" + "github.com/ManuelGysin/lego/providers/dns/ns1" + "github.com/ManuelGysin/lego/providers/dns/ovh" + "github.com/ManuelGysin/lego/providers/dns/pdns" + "github.com/ManuelGysin/lego/providers/dns/rackspace" + "github.com/ManuelGysin/lego/providers/dns/rfc2136" + "github.com/ManuelGysin/lego/providers/dns/route53" + "github.com/ManuelGysin/lego/providers/dns/vultr" ) func NewDNSChallengeProviderByName(name string) (acme.ChallengeProvider, error) { diff --git a/providers/dns/dns_providers_test.go b/providers/dns/dns_providers_test.go index 3f87ffd337..1c227c580f 100644 --- a/providers/dns/dns_providers_test.go +++ b/providers/dns/dns_providers_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/xenolf/lego/providers/dns/exoscale" + "github.com/ManuelGysin/lego/providers/dns/exoscale" ) var ( diff --git a/providers/dns/dnsimple/dnsimple.go b/providers/dns/dnsimple/dnsimple.go index c903a35ce8..e68fd46fbf 100644 --- a/providers/dns/dnsimple/dnsimple.go +++ b/providers/dns/dnsimple/dnsimple.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/weppos/dnsimple-go/dnsimple" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface. diff --git a/providers/dns/dnsmadeeasy/dnsmadeeasy.go b/providers/dns/dnsmadeeasy/dnsmadeeasy.go index c4363a4ebe..8e69a8fa1f 100644 --- a/providers/dns/dnsmadeeasy/dnsmadeeasy.go +++ b/providers/dns/dnsmadeeasy/dnsmadeeasy.go @@ -14,7 +14,7 @@ import ( "strings" "time" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface that uses diff --git a/providers/dns/dnspod/dnspod.go b/providers/dns/dnspod/dnspod.go index 0ce08a8bbc..e5c51c362e 100644 --- a/providers/dns/dnspod/dnspod.go +++ b/providers/dns/dnspod/dnspod.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/decker502/dnspod-go" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface. diff --git a/providers/dns/dyn/dyn.go b/providers/dns/dyn/dyn.go index 384bc850cf..b255bd06dd 100644 --- a/providers/dns/dyn/dyn.go +++ b/providers/dns/dyn/dyn.go @@ -11,7 +11,7 @@ import ( "strconv" "time" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) var dynBaseURL = "https://api.dynect.net/REST" diff --git a/providers/dns/exoscale/exoscale.go b/providers/dns/exoscale/exoscale.go index 3b6b58d08c..1af6202744 100644 --- a/providers/dns/exoscale/exoscale.go +++ b/providers/dns/exoscale/exoscale.go @@ -8,7 +8,7 @@ import ( "os" "github.com/pyr/egoscale/src/egoscale" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface. diff --git a/providers/dns/gandi/gandi.go b/providers/dns/gandi/gandi.go index 422b02a212..5b4861d4f0 100644 --- a/providers/dns/gandi/gandi.go +++ b/providers/dns/gandi/gandi.go @@ -14,7 +14,7 @@ import ( "sync" "time" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // Gandi API reference: http://doc.rpc.gandi.net/index.html diff --git a/providers/dns/gandi/gandi_test.go b/providers/dns/gandi/gandi_test.go index 451333ca16..8feb0aac13 100644 --- a/providers/dns/gandi/gandi_test.go +++ b/providers/dns/gandi/gandi_test.go @@ -13,7 +13,7 @@ import ( "strings" "testing" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // stagingServer is the Let's Encrypt staging server used by the live test diff --git a/providers/dns/googlecloud/googlecloud.go b/providers/dns/googlecloud/googlecloud.go index ea6c0875c6..e974b3734d 100644 --- a/providers/dns/googlecloud/googlecloud.go +++ b/providers/dns/googlecloud/googlecloud.go @@ -7,7 +7,7 @@ import ( "os" "time" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" "golang.org/x/net/context" "golang.org/x/oauth2/google" diff --git a/providers/dns/linode/linode.go b/providers/dns/linode/linode.go index a91d2b4893..f9abc8e35c 100644 --- a/providers/dns/linode/linode.go +++ b/providers/dns/linode/linode.go @@ -9,7 +9,7 @@ import ( "time" "github.com/timewasted/linode/dns" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) const ( diff --git a/providers/dns/namecheap/namecheap.go b/providers/dns/namecheap/namecheap.go index d7eb409358..9a92a84c9f 100644 --- a/providers/dns/namecheap/namecheap.go +++ b/providers/dns/namecheap/namecheap.go @@ -12,7 +12,7 @@ import ( "strings" "time" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // Notes about namecheap's tool API: diff --git a/providers/dns/ns1/ns1.go b/providers/dns/ns1/ns1.go index 105d73f893..0fd3087f38 100644 --- a/providers/dns/ns1/ns1.go +++ b/providers/dns/ns1/ns1.go @@ -8,7 +8,7 @@ import ( "os" "time" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" "gopkg.in/ns1/ns1-go.v2/rest" "gopkg.in/ns1/ns1-go.v2/rest/model/dns" ) diff --git a/providers/dns/ovh/ovh.go b/providers/dns/ovh/ovh.go index 290a8d7dfe..46c885990a 100644 --- a/providers/dns/ovh/ovh.go +++ b/providers/dns/ovh/ovh.go @@ -9,7 +9,7 @@ import ( "sync" "github.com/ovh/go-ovh/ovh" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // OVH API reference: https://eu.api.ovh.com/ diff --git a/providers/dns/pdns/pdns.go b/providers/dns/pdns/pdns.go index a4fd22b0c5..1e2bc8b669 100644 --- a/providers/dns/pdns/pdns.go +++ b/providers/dns/pdns/pdns.go @@ -14,7 +14,7 @@ import ( "strings" "time" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface diff --git a/providers/dns/rackspace/rackspace.go b/providers/dns/rackspace/rackspace.go index 2b106a27e5..c9d16be9a1 100644 --- a/providers/dns/rackspace/rackspace.go +++ b/providers/dns/rackspace/rackspace.go @@ -11,7 +11,7 @@ import ( "os" "time" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // rackspaceAPIURL represents the Identity API endpoint to call diff --git a/providers/dns/rfc2136/rfc2136.go b/providers/dns/rfc2136/rfc2136.go index 43a95f18c3..db6e465d2f 100644 --- a/providers/dns/rfc2136/rfc2136.go +++ b/providers/dns/rfc2136/rfc2136.go @@ -10,7 +10,7 @@ import ( "time" "github.com/miekg/dns" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface that diff --git a/providers/dns/rfc2136/rfc2136_test.go b/providers/dns/rfc2136/rfc2136_test.go index a2515e9956..7c08b61bbe 100644 --- a/providers/dns/rfc2136/rfc2136_test.go +++ b/providers/dns/rfc2136/rfc2136_test.go @@ -10,7 +10,7 @@ import ( "time" "github.com/miekg/dns" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) var ( diff --git a/providers/dns/route53/route53.go b/providers/dns/route53/route53.go index f3e53a8e58..993c886894 100644 --- a/providers/dns/route53/route53.go +++ b/providers/dns/route53/route53.go @@ -13,7 +13,7 @@ import ( "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/route53" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) const ( diff --git a/providers/dns/vultr/vultr.go b/providers/dns/vultr/vultr.go index 53804e2703..22250ef34b 100644 --- a/providers/dns/vultr/vultr.go +++ b/providers/dns/vultr/vultr.go @@ -9,7 +9,7 @@ import ( "strings" vultr "github.com/JamesClonk/vultr/lib" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface. diff --git a/providers/http/memcached/memcached.go b/providers/http/memcached/memcached.go index 9c5f6c0b40..d35947ff70 100644 --- a/providers/http/memcached/memcached.go +++ b/providers/http/memcached/memcached.go @@ -6,7 +6,7 @@ import ( "path" "github.com/rainycape/memcache" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // HTTPProvider implements ChallengeProvider for `http-01` challenge diff --git a/providers/http/memcached/memcached_test.go b/providers/http/memcached/memcached_test.go index 287a33304f..3a95b303c3 100644 --- a/providers/http/memcached/memcached_test.go +++ b/providers/http/memcached/memcached_test.go @@ -8,7 +8,7 @@ import ( "github.com/rainycape/memcache" "github.com/stretchr/testify/assert" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) var ( diff --git a/providers/http/webroot/webroot.go b/providers/http/webroot/webroot.go index 4bf211f39a..9e522c02dd 100644 --- a/providers/http/webroot/webroot.go +++ b/providers/http/webroot/webroot.go @@ -7,7 +7,7 @@ import ( "os" "path" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // HTTPProvider implements ChallengeProvider for `http-01` challenge From f404f44c121aa99a37596022a81fc97ba490b3b9 Mon Sep 17 00:00:00 2001 From: Manuel Gysin Date: Sat, 3 Dec 2016 20:33:28 +0100 Subject: [PATCH 07/10] Fix --- acme/dns_challenge.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acme/dns_challenge.go b/acme/dns_challenge.go index 23b93ea8c1..f06c7c03f9 100644 --- a/acme/dns_challenge.go +++ b/acme/dns_challenge.go @@ -111,7 +111,7 @@ func (s *dnsChallenge) Solve(chlng challenge, domain string) error { var timeout, interval time.Duration for _, v := range s.providers { - var tiou, inter int + var tiou, inter time.Duration switch provider := v.(type) { case ChallengeProviderTimeout: From 4e381da032537304430afaac695a71774071cbbc Mon Sep 17 00:00:00 2001 From: Manuel Gysin Date: Sat, 3 Dec 2016 20:37:11 +0100 Subject: [PATCH 08/10] Fix --- acme/client.go | 1 - 1 file changed, 1 deletion(-) diff --git a/acme/client.go b/acme/client.go index e20f36c833..b75ffe221b 100644 --- a/acme/client.go +++ b/acme/client.go @@ -15,7 +15,6 @@ import ( "strconv" "strings" "time" - "reflect" ) var ( From 0ba820dad0faf6f55782243eaa4c3dfbe94d875f Mon Sep 17 00:00:00 2001 From: Manuel Gysin Date: Sat, 3 Dec 2016 21:02:42 +0100 Subject: [PATCH 09/10] Fix --- account.go | 2 +- cli.go | 2 +- cli_handlers.go | 8 ++--- configuration.go | 2 +- providers/dns/auroradns/auroradns.go | 2 +- providers/dns/azure/azure.go | 2 +- providers/dns/cloudflare/cloudflare.go | 2 +- providers/dns/digitalocean/digitalocean.go | 2 +- providers/dns/dns_providers.go | 42 +++++++++++----------- providers/dns/dns_providers_test.go | 2 +- providers/dns/dnsimple/dnsimple.go | 2 +- providers/dns/dnsmadeeasy/dnsmadeeasy.go | 2 +- providers/dns/dnspod/dnspod.go | 2 +- providers/dns/dyn/dyn.go | 2 +- providers/dns/exoscale/exoscale.go | 2 +- providers/dns/gandi/gandi.go | 2 +- providers/dns/gandi/gandi_test.go | 2 +- providers/dns/googlecloud/googlecloud.go | 2 +- providers/dns/linode/linode.go | 2 +- providers/dns/namecheap/namecheap.go | 2 +- providers/dns/ns1/ns1.go | 2 +- providers/dns/ovh/ovh.go | 2 +- providers/dns/pdns/pdns.go | 2 +- providers/dns/rackspace/rackspace.go | 2 +- providers/dns/rfc2136/rfc2136.go | 2 +- providers/dns/rfc2136/rfc2136_test.go | 2 +- providers/dns/route53/route53.go | 2 +- providers/dns/vultr/vultr.go | 2 +- providers/http/memcached/memcached.go | 2 +- providers/http/memcached/memcached_test.go | 2 +- providers/http/webroot/webroot.go | 2 +- 31 files changed, 54 insertions(+), 54 deletions(-) diff --git a/account.go b/account.go index be690a8a2a..34856e16f0 100644 --- a/account.go +++ b/account.go @@ -7,7 +7,7 @@ import ( "os" "path" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) // Account represents a users local saved credentials diff --git a/cli.go b/cli.go index 351967584e..61c08d455c 100644 --- a/cli.go +++ b/cli.go @@ -11,7 +11,7 @@ import ( "text/tabwriter" "github.com/urfave/cli" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) // Logger is used to log errors; if nil, the default log.Logger is used. diff --git a/cli_handlers.go b/cli_handlers.go index 8c024756f8..2385f7a2a0 100644 --- a/cli_handlers.go +++ b/cli_handlers.go @@ -14,10 +14,10 @@ import ( "time" "github.com/urfave/cli" - "github.com/ManuelGysin/lego/acme" - "github.com/ManuelGysin/lego/providers/dns" - "github.com/ManuelGysin/lego/providers/http/memcached" - "github.com/ManuelGysin/lego/providers/http/webroot" + "github.com/xenolf/lego/acme" + "github.com/xenolf/lego/providers/dns" + "github.com/xenolf/lego/providers/http/memcached" + "github.com/xenolf/lego/providers/http/webroot" ) func checkFolder(path string) error { diff --git a/configuration.go b/configuration.go index eb84f3bf46..f92c1fe96d 100644 --- a/configuration.go +++ b/configuration.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/urfave/cli" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) // Configuration type from CLI and config files. diff --git a/providers/dns/auroradns/auroradns.go b/providers/dns/auroradns/auroradns.go index 7233cda9a8..55b48f9b40 100644 --- a/providers/dns/auroradns/auroradns.go +++ b/providers/dns/auroradns/auroradns.go @@ -5,7 +5,7 @@ import ( "github.com/edeckers/auroradnsclient" "github.com/edeckers/auroradnsclient/records" "github.com/edeckers/auroradnsclient/zones" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" "os" "sync" ) diff --git a/providers/dns/azure/azure.go b/providers/dns/azure/azure.go index 24883084ff..9d281cd695 100644 --- a/providers/dns/azure/azure.go +++ b/providers/dns/azure/azure.go @@ -12,7 +12,7 @@ import ( "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/to" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" "strings" ) diff --git a/providers/dns/cloudflare/cloudflare.go b/providers/dns/cloudflare/cloudflare.go index e6a6caef8e..84952238d8 100644 --- a/providers/dns/cloudflare/cloudflare.go +++ b/providers/dns/cloudflare/cloudflare.go @@ -11,7 +11,7 @@ import ( "os" "time" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) // CloudFlareAPIURL represents the API endpoint to call. diff --git a/providers/dns/digitalocean/digitalocean.go b/providers/dns/digitalocean/digitalocean.go index c1ca4329c4..da261b39ad 100644 --- a/providers/dns/digitalocean/digitalocean.go +++ b/providers/dns/digitalocean/digitalocean.go @@ -11,7 +11,7 @@ import ( "sync" "time" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface diff --git a/providers/dns/dns_providers.go b/providers/dns/dns_providers.go index e2d7388acb..33fca0fada 100644 --- a/providers/dns/dns_providers.go +++ b/providers/dns/dns_providers.go @@ -4,27 +4,27 @@ package dns import ( "fmt" - "github.com/ManuelGysin/lego/acme" - "github.com/ManuelGysin/lego/providers/dns/auroradns" - "github.com/ManuelGysin/lego/providers/dns/azure" - "github.com/ManuelGysin/lego/providers/dns/cloudflare" - "github.com/ManuelGysin/lego/providers/dns/digitalocean" - "github.com/ManuelGysin/lego/providers/dns/dnsimple" - "github.com/ManuelGysin/lego/providers/dns/dnsmadeeasy" - "github.com/ManuelGysin/lego/providers/dns/dnspod" - "github.com/ManuelGysin/lego/providers/dns/dyn" - "github.com/ManuelGysin/lego/providers/dns/exoscale" - "github.com/ManuelGysin/lego/providers/dns/gandi" - "github.com/ManuelGysin/lego/providers/dns/googlecloud" - "github.com/ManuelGysin/lego/providers/dns/linode" - "github.com/ManuelGysin/lego/providers/dns/namecheap" - "github.com/ManuelGysin/lego/providers/dns/ns1" - "github.com/ManuelGysin/lego/providers/dns/ovh" - "github.com/ManuelGysin/lego/providers/dns/pdns" - "github.com/ManuelGysin/lego/providers/dns/rackspace" - "github.com/ManuelGysin/lego/providers/dns/rfc2136" - "github.com/ManuelGysin/lego/providers/dns/route53" - "github.com/ManuelGysin/lego/providers/dns/vultr" + "github.com/xenolf/lego/acme" + "github.com/xenolf/lego/providers/dns/auroradns" + "github.com/xenolf/lego/providers/dns/azure" + "github.com/xenolf/lego/providers/dns/cloudflare" + "github.com/xenolf/lego/providers/dns/digitalocean" + "github.com/xenolf/lego/providers/dns/dnsimple" + "github.com/xenolf/lego/providers/dns/dnsmadeeasy" + "github.com/xenolf/lego/providers/dns/dnspod" + "github.com/xenolf/lego/providers/dns/dyn" + "github.com/xenolf/lego/providers/dns/exoscale" + "github.com/xenolf/lego/providers/dns/gandi" + "github.com/xenolf/lego/providers/dns/googlecloud" + "github.com/xenolf/lego/providers/dns/linode" + "github.com/xenolf/lego/providers/dns/namecheap" + "github.com/xenolf/lego/providers/dns/ns1" + "github.com/xenolf/lego/providers/dns/ovh" + "github.com/xenolf/lego/providers/dns/pdns" + "github.com/xenolf/lego/providers/dns/rackspace" + "github.com/xenolf/lego/providers/dns/rfc2136" + "github.com/xenolf/lego/providers/dns/route53" + "github.com/xenolf/lego/providers/dns/vultr" ) func NewDNSChallengeProviderByName(name string) (acme.ChallengeProvider, error) { diff --git a/providers/dns/dns_providers_test.go b/providers/dns/dns_providers_test.go index 1c227c580f..3f87ffd337 100644 --- a/providers/dns/dns_providers_test.go +++ b/providers/dns/dns_providers_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/ManuelGysin/lego/providers/dns/exoscale" + "github.com/xenolf/lego/providers/dns/exoscale" ) var ( diff --git a/providers/dns/dnsimple/dnsimple.go b/providers/dns/dnsimple/dnsimple.go index e68fd46fbf..c903a35ce8 100644 --- a/providers/dns/dnsimple/dnsimple.go +++ b/providers/dns/dnsimple/dnsimple.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/weppos/dnsimple-go/dnsimple" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface. diff --git a/providers/dns/dnsmadeeasy/dnsmadeeasy.go b/providers/dns/dnsmadeeasy/dnsmadeeasy.go index 8e69a8fa1f..c4363a4ebe 100644 --- a/providers/dns/dnsmadeeasy/dnsmadeeasy.go +++ b/providers/dns/dnsmadeeasy/dnsmadeeasy.go @@ -14,7 +14,7 @@ import ( "strings" "time" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface that uses diff --git a/providers/dns/dnspod/dnspod.go b/providers/dns/dnspod/dnspod.go index e5c51c362e..0ce08a8bbc 100644 --- a/providers/dns/dnspod/dnspod.go +++ b/providers/dns/dnspod/dnspod.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/decker502/dnspod-go" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface. diff --git a/providers/dns/dyn/dyn.go b/providers/dns/dyn/dyn.go index b255bd06dd..384bc850cf 100644 --- a/providers/dns/dyn/dyn.go +++ b/providers/dns/dyn/dyn.go @@ -11,7 +11,7 @@ import ( "strconv" "time" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) var dynBaseURL = "https://api.dynect.net/REST" diff --git a/providers/dns/exoscale/exoscale.go b/providers/dns/exoscale/exoscale.go index 1af6202744..3b6b58d08c 100644 --- a/providers/dns/exoscale/exoscale.go +++ b/providers/dns/exoscale/exoscale.go @@ -8,7 +8,7 @@ import ( "os" "github.com/pyr/egoscale/src/egoscale" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface. diff --git a/providers/dns/gandi/gandi.go b/providers/dns/gandi/gandi.go index 5b4861d4f0..422b02a212 100644 --- a/providers/dns/gandi/gandi.go +++ b/providers/dns/gandi/gandi.go @@ -14,7 +14,7 @@ import ( "sync" "time" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) // Gandi API reference: http://doc.rpc.gandi.net/index.html diff --git a/providers/dns/gandi/gandi_test.go b/providers/dns/gandi/gandi_test.go index 8feb0aac13..451333ca16 100644 --- a/providers/dns/gandi/gandi_test.go +++ b/providers/dns/gandi/gandi_test.go @@ -13,7 +13,7 @@ import ( "strings" "testing" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) // stagingServer is the Let's Encrypt staging server used by the live test diff --git a/providers/dns/googlecloud/googlecloud.go b/providers/dns/googlecloud/googlecloud.go index e974b3734d..ea6c0875c6 100644 --- a/providers/dns/googlecloud/googlecloud.go +++ b/providers/dns/googlecloud/googlecloud.go @@ -7,7 +7,7 @@ import ( "os" "time" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" "golang.org/x/net/context" "golang.org/x/oauth2/google" diff --git a/providers/dns/linode/linode.go b/providers/dns/linode/linode.go index f9abc8e35c..a91d2b4893 100644 --- a/providers/dns/linode/linode.go +++ b/providers/dns/linode/linode.go @@ -9,7 +9,7 @@ import ( "time" "github.com/timewasted/linode/dns" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) const ( diff --git a/providers/dns/namecheap/namecheap.go b/providers/dns/namecheap/namecheap.go index 9a92a84c9f..d7eb409358 100644 --- a/providers/dns/namecheap/namecheap.go +++ b/providers/dns/namecheap/namecheap.go @@ -12,7 +12,7 @@ import ( "strings" "time" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) // Notes about namecheap's tool API: diff --git a/providers/dns/ns1/ns1.go b/providers/dns/ns1/ns1.go index 0fd3087f38..105d73f893 100644 --- a/providers/dns/ns1/ns1.go +++ b/providers/dns/ns1/ns1.go @@ -8,7 +8,7 @@ import ( "os" "time" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" "gopkg.in/ns1/ns1-go.v2/rest" "gopkg.in/ns1/ns1-go.v2/rest/model/dns" ) diff --git a/providers/dns/ovh/ovh.go b/providers/dns/ovh/ovh.go index 46c885990a..290a8d7dfe 100644 --- a/providers/dns/ovh/ovh.go +++ b/providers/dns/ovh/ovh.go @@ -9,7 +9,7 @@ import ( "sync" "github.com/ovh/go-ovh/ovh" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) // OVH API reference: https://eu.api.ovh.com/ diff --git a/providers/dns/pdns/pdns.go b/providers/dns/pdns/pdns.go index 1e2bc8b669..a4fd22b0c5 100644 --- a/providers/dns/pdns/pdns.go +++ b/providers/dns/pdns/pdns.go @@ -14,7 +14,7 @@ import ( "strings" "time" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface diff --git a/providers/dns/rackspace/rackspace.go b/providers/dns/rackspace/rackspace.go index c9d16be9a1..2b106a27e5 100644 --- a/providers/dns/rackspace/rackspace.go +++ b/providers/dns/rackspace/rackspace.go @@ -11,7 +11,7 @@ import ( "os" "time" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) // rackspaceAPIURL represents the Identity API endpoint to call diff --git a/providers/dns/rfc2136/rfc2136.go b/providers/dns/rfc2136/rfc2136.go index db6e465d2f..43a95f18c3 100644 --- a/providers/dns/rfc2136/rfc2136.go +++ b/providers/dns/rfc2136/rfc2136.go @@ -10,7 +10,7 @@ import ( "time" "github.com/miekg/dns" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface that diff --git a/providers/dns/rfc2136/rfc2136_test.go b/providers/dns/rfc2136/rfc2136_test.go index 7c08b61bbe..a2515e9956 100644 --- a/providers/dns/rfc2136/rfc2136_test.go +++ b/providers/dns/rfc2136/rfc2136_test.go @@ -10,7 +10,7 @@ import ( "time" "github.com/miekg/dns" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) var ( diff --git a/providers/dns/route53/route53.go b/providers/dns/route53/route53.go index 993c886894..f3e53a8e58 100644 --- a/providers/dns/route53/route53.go +++ b/providers/dns/route53/route53.go @@ -13,7 +13,7 @@ import ( "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/route53" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) const ( diff --git a/providers/dns/vultr/vultr.go b/providers/dns/vultr/vultr.go index 22250ef34b..53804e2703 100644 --- a/providers/dns/vultr/vultr.go +++ b/providers/dns/vultr/vultr.go @@ -9,7 +9,7 @@ import ( "strings" vultr "github.com/JamesClonk/vultr/lib" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface. diff --git a/providers/http/memcached/memcached.go b/providers/http/memcached/memcached.go index d35947ff70..9c5f6c0b40 100644 --- a/providers/http/memcached/memcached.go +++ b/providers/http/memcached/memcached.go @@ -6,7 +6,7 @@ import ( "path" "github.com/rainycape/memcache" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) // HTTPProvider implements ChallengeProvider for `http-01` challenge diff --git a/providers/http/memcached/memcached_test.go b/providers/http/memcached/memcached_test.go index 3a95b303c3..287a33304f 100644 --- a/providers/http/memcached/memcached_test.go +++ b/providers/http/memcached/memcached_test.go @@ -8,7 +8,7 @@ import ( "github.com/rainycape/memcache" "github.com/stretchr/testify/assert" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) var ( diff --git a/providers/http/webroot/webroot.go b/providers/http/webroot/webroot.go index 9e522c02dd..4bf211f39a 100644 --- a/providers/http/webroot/webroot.go +++ b/providers/http/webroot/webroot.go @@ -7,7 +7,7 @@ import ( "os" "path" - "github.com/ManuelGysin/lego/acme" + "github.com/xenolf/lego/acme" ) // HTTPProvider implements ChallengeProvider for `http-01` challenge From d2674cf2af17465838c1854f7e6ab4da0e1a60e2 Mon Sep 17 00:00:00 2001 From: Manuel Gysin Date: Sun, 11 Dec 2016 23:23:50 +0100 Subject: [PATCH 10/10] Test --- CHANGELOG.md | 10 +++--- README.md | 10 +++--- account.go | 2 +- acme/dns_challenge.go | 3 ++ cli.go | 2 +- cli_handlers.go | 8 ++--- configuration.go | 2 +- providers/dns/auroradns/auroradns.go | 2 +- providers/dns/azure/azure.go | 2 +- providers/dns/cloudflare/cloudflare.go | 2 +- providers/dns/digitalocean/digitalocean.go | 2 +- providers/dns/dns_providers.go | 42 +++++++++++----------- providers/dns/dns_providers_test.go | 2 +- providers/dns/dnsimple/dnsimple.go | 2 +- providers/dns/dnsmadeeasy/dnsmadeeasy.go | 2 +- providers/dns/dnspod/dnspod.go | 2 +- providers/dns/dyn/dyn.go | 2 +- providers/dns/exoscale/exoscale.go | 2 +- providers/dns/gandi/gandi.go | 2 +- providers/dns/gandi/gandi_test.go | 2 +- providers/dns/googlecloud/googlecloud.go | 2 +- providers/dns/linode/linode.go | 2 +- providers/dns/namecheap/namecheap.go | 2 +- providers/dns/ns1/ns1.go | 2 +- providers/dns/ovh/ovh.go | 2 +- providers/dns/pdns/pdns.go | 2 +- providers/dns/rackspace/rackspace.go | 2 +- providers/dns/rfc2136/rfc2136.go | 2 +- providers/dns/rfc2136/rfc2136_test.go | 2 +- providers/dns/route53/route53.go | 2 +- providers/dns/vultr/vultr.go | 2 +- providers/http/memcached/memcached.go | 2 +- providers/http/memcached/memcached_test.go | 2 +- providers/http/webroot/webroot.go | 2 +- 34 files changed, 67 insertions(+), 64 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c43c4a9365..e969ceb277 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -87,8 +87,8 @@ ## [0.1.0] - 2015-12-03 - Initial release -[0.3.1]: https://github.com/xenolf/lego/compare/v0.3.0...v0.3.1 -[0.3.0]: https://github.com/xenolf/lego/compare/v0.2.0...v0.3.0 -[0.2.0]: https://github.com/xenolf/lego/compare/v0.1.1...v0.2.0 -[0.1.1]: https://github.com/xenolf/lego/compare/v0.1.0...v0.1.1 -[0.1.0]: https://github.com/xenolf/lego/tree/v0.1.0 +[0.3.1]: https://github.com/ManuelGysin/lego/compare/v0.3.0...v0.3.1 +[0.3.0]: https://github.com/ManuelGysin/lego/compare/v0.2.0...v0.3.0 +[0.2.0]: https://github.com/ManuelGysin/lego/compare/v0.1.1...v0.2.0 +[0.1.1]: https://github.com/ManuelGysin/lego/compare/v0.1.0...v0.1.1 +[0.1.0]: https://github.com/ManuelGysin/lego/tree/v0.1.0 diff --git a/README.md b/README.md index 136bc55485..7baf6c855e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # lego Let's Encrypt client and ACME library written in Go -[![GoDoc](https://godoc.org/github.com/xenolf/lego/acme?status.svg)](https://godoc.org/github.com/xenolf/lego/acme) +[![GoDoc](https://godoc.org/github.com/ManuelGysin/lego/acme?status.svg)](https://godoc.org/github.com/ManuelGysin/lego/acme) [![Build Status](https://travis-ci.org/xenolf/lego.svg?branch=master)](https://travis-ci.org/xenolf/lego) [![Dev Chat](https://img.shields.io/badge/dev%20chat-gitter-blue.svg?label=dev+chat)](https://gitter.im/xenolf/lego) @@ -11,7 +11,7 @@ This is a work in progress. Please do *NOT* run this on a production server and #### Installation lego supports both binary installs and install from source. -To get the binary just download the latest release for your OS/Arch from [the release page](https://github.com/xenolf/lego/releases) +To get the binary just download the latest release for your OS/Arch from [the release page](https://github.com/ManuelGysin/lego/releases) and put the binary somewhere convenient. lego does not assume anything about the location you run it from. To install from source, just run @@ -35,8 +35,8 @@ docker build -t lego . - TLS with Server Name Indication (tls-sni-01) - DNS (dns-01) - SAN certificate support -- Comes with multiple optional [DNS providers](https://github.com/xenolf/lego/tree/master/providers/dns) -- [Custom challenge solvers](https://github.com/xenolf/lego/wiki/Writing-a-Challenge-Solver) +- Comes with multiple optional [DNS providers](https://github.com/ManuelGysin/lego/tree/master/providers/dns) +- [Custom challenge solvers](https://github.com/ManuelGysin/lego/wiki/Writing-a-Challenge-Solver) - Certificate bundling - OCSP helper function @@ -106,7 +106,7 @@ GLOBAL OPTIONS: ##### CLI Example -Assumes the `lego` binary has permission to bind to ports 80 and 443. You can get a pre-built binary from the [releases](https://github.com/xenolf/lego/releases) page. +Assumes the `lego` binary has permission to bind to ports 80 and 443. You can get a pre-built binary from the [releases](https://github.com/ManuelGysin/lego/releases) page. If your environment does not allow you to bind to these ports, please read [Port Usage](#port-usage). Obtain a certificate: diff --git a/account.go b/account.go index 34856e16f0..be690a8a2a 100644 --- a/account.go +++ b/account.go @@ -7,7 +7,7 @@ import ( "os" "path" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // Account represents a users local saved credentials diff --git a/acme/dns_challenge.go b/acme/dns_challenge.go index f06c7c03f9..665cb43448 100644 --- a/acme/dns_challenge.go +++ b/acme/dns_challenge.go @@ -129,6 +129,9 @@ func (s *dnsChallenge) Solve(chlng challenge, domain string) error { } } + timeout = 600*time.Second + interval = 600*time.Second + err = WaitFor(timeout, interval, func() (bool, error) { return PreCheckDNS(fqdn, value) }) diff --git a/cli.go b/cli.go index 61c08d455c..351967584e 100644 --- a/cli.go +++ b/cli.go @@ -11,7 +11,7 @@ import ( "text/tabwriter" "github.com/urfave/cli" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // Logger is used to log errors; if nil, the default log.Logger is used. diff --git a/cli_handlers.go b/cli_handlers.go index 2385f7a2a0..8c024756f8 100644 --- a/cli_handlers.go +++ b/cli_handlers.go @@ -14,10 +14,10 @@ import ( "time" "github.com/urfave/cli" - "github.com/xenolf/lego/acme" - "github.com/xenolf/lego/providers/dns" - "github.com/xenolf/lego/providers/http/memcached" - "github.com/xenolf/lego/providers/http/webroot" + "github.com/ManuelGysin/lego/acme" + "github.com/ManuelGysin/lego/providers/dns" + "github.com/ManuelGysin/lego/providers/http/memcached" + "github.com/ManuelGysin/lego/providers/http/webroot" ) func checkFolder(path string) error { diff --git a/configuration.go b/configuration.go index f92c1fe96d..eb84f3bf46 100644 --- a/configuration.go +++ b/configuration.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/urfave/cli" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // Configuration type from CLI and config files. diff --git a/providers/dns/auroradns/auroradns.go b/providers/dns/auroradns/auroradns.go index 55b48f9b40..7233cda9a8 100644 --- a/providers/dns/auroradns/auroradns.go +++ b/providers/dns/auroradns/auroradns.go @@ -5,7 +5,7 @@ import ( "github.com/edeckers/auroradnsclient" "github.com/edeckers/auroradnsclient/records" "github.com/edeckers/auroradnsclient/zones" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" "os" "sync" ) diff --git a/providers/dns/azure/azure.go b/providers/dns/azure/azure.go index 9d281cd695..24883084ff 100644 --- a/providers/dns/azure/azure.go +++ b/providers/dns/azure/azure.go @@ -12,7 +12,7 @@ import ( "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/to" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" "strings" ) diff --git a/providers/dns/cloudflare/cloudflare.go b/providers/dns/cloudflare/cloudflare.go index 84952238d8..e6a6caef8e 100644 --- a/providers/dns/cloudflare/cloudflare.go +++ b/providers/dns/cloudflare/cloudflare.go @@ -11,7 +11,7 @@ import ( "os" "time" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // CloudFlareAPIURL represents the API endpoint to call. diff --git a/providers/dns/digitalocean/digitalocean.go b/providers/dns/digitalocean/digitalocean.go index da261b39ad..c1ca4329c4 100644 --- a/providers/dns/digitalocean/digitalocean.go +++ b/providers/dns/digitalocean/digitalocean.go @@ -11,7 +11,7 @@ import ( "sync" "time" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface diff --git a/providers/dns/dns_providers.go b/providers/dns/dns_providers.go index 33fca0fada..e2d7388acb 100644 --- a/providers/dns/dns_providers.go +++ b/providers/dns/dns_providers.go @@ -4,27 +4,27 @@ package dns import ( "fmt" - "github.com/xenolf/lego/acme" - "github.com/xenolf/lego/providers/dns/auroradns" - "github.com/xenolf/lego/providers/dns/azure" - "github.com/xenolf/lego/providers/dns/cloudflare" - "github.com/xenolf/lego/providers/dns/digitalocean" - "github.com/xenolf/lego/providers/dns/dnsimple" - "github.com/xenolf/lego/providers/dns/dnsmadeeasy" - "github.com/xenolf/lego/providers/dns/dnspod" - "github.com/xenolf/lego/providers/dns/dyn" - "github.com/xenolf/lego/providers/dns/exoscale" - "github.com/xenolf/lego/providers/dns/gandi" - "github.com/xenolf/lego/providers/dns/googlecloud" - "github.com/xenolf/lego/providers/dns/linode" - "github.com/xenolf/lego/providers/dns/namecheap" - "github.com/xenolf/lego/providers/dns/ns1" - "github.com/xenolf/lego/providers/dns/ovh" - "github.com/xenolf/lego/providers/dns/pdns" - "github.com/xenolf/lego/providers/dns/rackspace" - "github.com/xenolf/lego/providers/dns/rfc2136" - "github.com/xenolf/lego/providers/dns/route53" - "github.com/xenolf/lego/providers/dns/vultr" + "github.com/ManuelGysin/lego/acme" + "github.com/ManuelGysin/lego/providers/dns/auroradns" + "github.com/ManuelGysin/lego/providers/dns/azure" + "github.com/ManuelGysin/lego/providers/dns/cloudflare" + "github.com/ManuelGysin/lego/providers/dns/digitalocean" + "github.com/ManuelGysin/lego/providers/dns/dnsimple" + "github.com/ManuelGysin/lego/providers/dns/dnsmadeeasy" + "github.com/ManuelGysin/lego/providers/dns/dnspod" + "github.com/ManuelGysin/lego/providers/dns/dyn" + "github.com/ManuelGysin/lego/providers/dns/exoscale" + "github.com/ManuelGysin/lego/providers/dns/gandi" + "github.com/ManuelGysin/lego/providers/dns/googlecloud" + "github.com/ManuelGysin/lego/providers/dns/linode" + "github.com/ManuelGysin/lego/providers/dns/namecheap" + "github.com/ManuelGysin/lego/providers/dns/ns1" + "github.com/ManuelGysin/lego/providers/dns/ovh" + "github.com/ManuelGysin/lego/providers/dns/pdns" + "github.com/ManuelGysin/lego/providers/dns/rackspace" + "github.com/ManuelGysin/lego/providers/dns/rfc2136" + "github.com/ManuelGysin/lego/providers/dns/route53" + "github.com/ManuelGysin/lego/providers/dns/vultr" ) func NewDNSChallengeProviderByName(name string) (acme.ChallengeProvider, error) { diff --git a/providers/dns/dns_providers_test.go b/providers/dns/dns_providers_test.go index 3f87ffd337..1c227c580f 100644 --- a/providers/dns/dns_providers_test.go +++ b/providers/dns/dns_providers_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/xenolf/lego/providers/dns/exoscale" + "github.com/ManuelGysin/lego/providers/dns/exoscale" ) var ( diff --git a/providers/dns/dnsimple/dnsimple.go b/providers/dns/dnsimple/dnsimple.go index c903a35ce8..e68fd46fbf 100644 --- a/providers/dns/dnsimple/dnsimple.go +++ b/providers/dns/dnsimple/dnsimple.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/weppos/dnsimple-go/dnsimple" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface. diff --git a/providers/dns/dnsmadeeasy/dnsmadeeasy.go b/providers/dns/dnsmadeeasy/dnsmadeeasy.go index c4363a4ebe..8e69a8fa1f 100644 --- a/providers/dns/dnsmadeeasy/dnsmadeeasy.go +++ b/providers/dns/dnsmadeeasy/dnsmadeeasy.go @@ -14,7 +14,7 @@ import ( "strings" "time" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface that uses diff --git a/providers/dns/dnspod/dnspod.go b/providers/dns/dnspod/dnspod.go index 0ce08a8bbc..e5c51c362e 100644 --- a/providers/dns/dnspod/dnspod.go +++ b/providers/dns/dnspod/dnspod.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/decker502/dnspod-go" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface. diff --git a/providers/dns/dyn/dyn.go b/providers/dns/dyn/dyn.go index 384bc850cf..b255bd06dd 100644 --- a/providers/dns/dyn/dyn.go +++ b/providers/dns/dyn/dyn.go @@ -11,7 +11,7 @@ import ( "strconv" "time" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) var dynBaseURL = "https://api.dynect.net/REST" diff --git a/providers/dns/exoscale/exoscale.go b/providers/dns/exoscale/exoscale.go index 3b6b58d08c..1af6202744 100644 --- a/providers/dns/exoscale/exoscale.go +++ b/providers/dns/exoscale/exoscale.go @@ -8,7 +8,7 @@ import ( "os" "github.com/pyr/egoscale/src/egoscale" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface. diff --git a/providers/dns/gandi/gandi.go b/providers/dns/gandi/gandi.go index 422b02a212..5b4861d4f0 100644 --- a/providers/dns/gandi/gandi.go +++ b/providers/dns/gandi/gandi.go @@ -14,7 +14,7 @@ import ( "sync" "time" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // Gandi API reference: http://doc.rpc.gandi.net/index.html diff --git a/providers/dns/gandi/gandi_test.go b/providers/dns/gandi/gandi_test.go index 451333ca16..8feb0aac13 100644 --- a/providers/dns/gandi/gandi_test.go +++ b/providers/dns/gandi/gandi_test.go @@ -13,7 +13,7 @@ import ( "strings" "testing" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // stagingServer is the Let's Encrypt staging server used by the live test diff --git a/providers/dns/googlecloud/googlecloud.go b/providers/dns/googlecloud/googlecloud.go index ea6c0875c6..e974b3734d 100644 --- a/providers/dns/googlecloud/googlecloud.go +++ b/providers/dns/googlecloud/googlecloud.go @@ -7,7 +7,7 @@ import ( "os" "time" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" "golang.org/x/net/context" "golang.org/x/oauth2/google" diff --git a/providers/dns/linode/linode.go b/providers/dns/linode/linode.go index a91d2b4893..f9abc8e35c 100644 --- a/providers/dns/linode/linode.go +++ b/providers/dns/linode/linode.go @@ -9,7 +9,7 @@ import ( "time" "github.com/timewasted/linode/dns" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) const ( diff --git a/providers/dns/namecheap/namecheap.go b/providers/dns/namecheap/namecheap.go index d7eb409358..9a92a84c9f 100644 --- a/providers/dns/namecheap/namecheap.go +++ b/providers/dns/namecheap/namecheap.go @@ -12,7 +12,7 @@ import ( "strings" "time" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // Notes about namecheap's tool API: diff --git a/providers/dns/ns1/ns1.go b/providers/dns/ns1/ns1.go index 105d73f893..0fd3087f38 100644 --- a/providers/dns/ns1/ns1.go +++ b/providers/dns/ns1/ns1.go @@ -8,7 +8,7 @@ import ( "os" "time" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" "gopkg.in/ns1/ns1-go.v2/rest" "gopkg.in/ns1/ns1-go.v2/rest/model/dns" ) diff --git a/providers/dns/ovh/ovh.go b/providers/dns/ovh/ovh.go index 290a8d7dfe..46c885990a 100644 --- a/providers/dns/ovh/ovh.go +++ b/providers/dns/ovh/ovh.go @@ -9,7 +9,7 @@ import ( "sync" "github.com/ovh/go-ovh/ovh" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // OVH API reference: https://eu.api.ovh.com/ diff --git a/providers/dns/pdns/pdns.go b/providers/dns/pdns/pdns.go index a4fd22b0c5..1e2bc8b669 100644 --- a/providers/dns/pdns/pdns.go +++ b/providers/dns/pdns/pdns.go @@ -14,7 +14,7 @@ import ( "strings" "time" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface diff --git a/providers/dns/rackspace/rackspace.go b/providers/dns/rackspace/rackspace.go index 2b106a27e5..c9d16be9a1 100644 --- a/providers/dns/rackspace/rackspace.go +++ b/providers/dns/rackspace/rackspace.go @@ -11,7 +11,7 @@ import ( "os" "time" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // rackspaceAPIURL represents the Identity API endpoint to call diff --git a/providers/dns/rfc2136/rfc2136.go b/providers/dns/rfc2136/rfc2136.go index 43a95f18c3..db6e465d2f 100644 --- a/providers/dns/rfc2136/rfc2136.go +++ b/providers/dns/rfc2136/rfc2136.go @@ -10,7 +10,7 @@ import ( "time" "github.com/miekg/dns" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface that diff --git a/providers/dns/rfc2136/rfc2136_test.go b/providers/dns/rfc2136/rfc2136_test.go index a2515e9956..7c08b61bbe 100644 --- a/providers/dns/rfc2136/rfc2136_test.go +++ b/providers/dns/rfc2136/rfc2136_test.go @@ -10,7 +10,7 @@ import ( "time" "github.com/miekg/dns" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) var ( diff --git a/providers/dns/route53/route53.go b/providers/dns/route53/route53.go index f3e53a8e58..993c886894 100644 --- a/providers/dns/route53/route53.go +++ b/providers/dns/route53/route53.go @@ -13,7 +13,7 @@ import ( "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/route53" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) const ( diff --git a/providers/dns/vultr/vultr.go b/providers/dns/vultr/vultr.go index 53804e2703..22250ef34b 100644 --- a/providers/dns/vultr/vultr.go +++ b/providers/dns/vultr/vultr.go @@ -9,7 +9,7 @@ import ( "strings" vultr "github.com/JamesClonk/vultr/lib" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // DNSProvider is an implementation of the acme.ChallengeProvider interface. diff --git a/providers/http/memcached/memcached.go b/providers/http/memcached/memcached.go index 9c5f6c0b40..d35947ff70 100644 --- a/providers/http/memcached/memcached.go +++ b/providers/http/memcached/memcached.go @@ -6,7 +6,7 @@ import ( "path" "github.com/rainycape/memcache" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // HTTPProvider implements ChallengeProvider for `http-01` challenge diff --git a/providers/http/memcached/memcached_test.go b/providers/http/memcached/memcached_test.go index 287a33304f..3a95b303c3 100644 --- a/providers/http/memcached/memcached_test.go +++ b/providers/http/memcached/memcached_test.go @@ -8,7 +8,7 @@ import ( "github.com/rainycape/memcache" "github.com/stretchr/testify/assert" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) var ( diff --git a/providers/http/webroot/webroot.go b/providers/http/webroot/webroot.go index 4bf211f39a..9e522c02dd 100644 --- a/providers/http/webroot/webroot.go +++ b/providers/http/webroot/webroot.go @@ -7,7 +7,7 @@ import ( "os" "path" - "github.com/xenolf/lego/acme" + "github.com/ManuelGysin/lego/acme" ) // HTTPProvider implements ChallengeProvider for `http-01` challenge