From 8b16d59831322f3fbfbd139b9205ccf78c9ae48c Mon Sep 17 00:00:00 2001 From: xenolf Date: Mon, 26 Oct 2015 00:47:37 +0100 Subject: [PATCH] Remove devMode from library and cli. --- acme/client.go | 5 ++--- cli.go | 4 ---- cli_handlers.go | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/acme/client.go b/acme/client.go index 32a69c65..63c65059 100644 --- a/acme/client.go +++ b/acme/client.go @@ -47,7 +47,6 @@ type Client struct { user User jws *jws keyBits int - devMode bool issuerCert []byte solvers map[string]solver } @@ -57,7 +56,7 @@ type Client struct { // usr - A filled in user struct // optPort - The alternative port to listen on for challenges. // devMode - If set to true, all CanSolve() checks are skipped. -func NewClient(caURL string, usr User, keyBits int, optPort string, devMode bool) *Client { +func NewClient(caURL string, usr User, keyBits int, optPort string) *Client { if err := usr.GetPrivateKey().Validate(); err != nil { logger().Fatalf("Could not validate the private account key of %s\n\t%v", usr.GetEmail(), err) } @@ -85,7 +84,7 @@ func NewClient(caURL string, usr User, keyBits int, optPort string, devMode bool logger().Fatal("The directory returned by the server was invalid.") } - return &Client{directory: dir, user: usr, jws: jws, keyBits: keyBits, devMode: devMode, solvers: solvers} + return &Client{directory: dir, user: usr, jws: jws, keyBits: keyBits, solvers: solvers} } // Register the current account to the ACME server. diff --git a/cli.go b/cli.go index 99a48ace..e4ab6923 100644 --- a/cli.go +++ b/cli.go @@ -85,10 +85,6 @@ func main() { Name: "port", Usage: "Challenges will use this port to listen on. Please make sure to forward port 443 to this port on your machine. Otherwise use setcap on the binary", }, - cli.BoolFlag{ - Name: "devMode", - Usage: "If set to true, all client side challenge pre-tests are skipped.", - }, } app.Run(os.Args) diff --git a/cli_handlers.go b/cli_handlers.go index fa7cc9c8..253e1e8d 100644 --- a/cli_handlers.go +++ b/cli_handlers.go @@ -32,7 +32,7 @@ func setup(c *cli.Context) (*Configuration, *Account, *acme.Client) { //TODO: move to account struct? Currently MUST pass email. acc := NewAccount(c.GlobalString("email"), conf) - return conf, acc, acme.NewClient(c.GlobalString("server"), acc, conf.RsaBits(), conf.OptPort(), c.GlobalBool("devMode")) + return conf, acc, acme.NewClient(c.GlobalString("server"), acc, conf.RsaBits(), conf.OptPort()) } func saveCertRes(certRes acme.CertificateResource, conf *Configuration) {