mirror of
https://github.com/go-acme/lego.git
synced 2024-12-25 11:02:56 +02:00
Remove devMode from library and cli.
This commit is contained in:
parent
8d31bb0123
commit
8b16d59831
@ -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
4
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)
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user