diff --git a/cli.go b/cli.go index e08f809c..a02ad78e 100644 --- a/cli.go +++ b/cli.go @@ -50,6 +50,12 @@ func main() { Name: "run", Usage: "Register an account, then create and install a certificate", Action: run, + Flags: []cli.Flag{ + cli.BoolFlag{ + Name: "nobundle", + Usage: "Do not create a certificate bundle by adding the issuers certificate to the new certificate.", + }, + }, }, { Name: "revoke", @@ -70,6 +76,10 @@ func main() { Name: "reuse-key", Usage: "Used to indicate you want to reuse your current private key for the new certificate.", }, + cli.BoolFlag{ + Name: "nobundle", + Usage: "Do not create a certificate bundle by adding the issuers certificate to the new certificate.", + }, }, }, } diff --git a/cli_handlers.go b/cli_handlers.go index e6e71cbe..2b614ade 100644 --- a/cli_handlers.go +++ b/cli_handlers.go @@ -198,7 +198,7 @@ func run(c *cli.Context) { logger().Fatal("Please specify --domains or -d") } - cert, failures := client.ObtainCertificate(c.GlobalStringSlice("domains"), true, nil) + cert, failures := client.ObtainCertificate(c.GlobalStringSlice("domains"), !c.Bool("nobundle"), nil) if len(failures) > 0 { for k, v := range failures { logger().Printf("[%s] Could not obtain certificates\n\t%s", k, v.Error()) @@ -295,7 +295,7 @@ func renew(c *cli.Context) { certRes.Certificate = certBytes - newCert, err := client.RenewCertificate(certRes, true) + newCert, err := client.RenewCertificate(certRes, !c.Bool("nobundle")) if err != nil { logger().Fatalf("%s", err.Error()) }