forked from TrueCloudLab/lego
Add --nobundle flag to supress the default creation of certificate bundle.
This commit is contained in:
parent
6b0be6de61
commit
96762fa6ba
2 changed files with 12 additions and 2 deletions
10
cli.go
10
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.",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -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())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue