1
0
mirror of https://github.com/go-acme/lego.git synced 2024-12-26 03:09:37 +02:00

Remove devMode from library and cli.

This commit is contained in:
xenolf 2015-10-26 00:47:37 +01:00
parent 8d31bb0123
commit 8b16d59831
3 changed files with 3 additions and 8 deletions

View File

@ -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.

4
cli.go
View File

@ -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)

View File

@ -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) {