Skip to content

Commit

Permalink
Fix identity new --ip example
Browse files Browse the repository at this point in the history
  • Loading branch information
ramondeklein committed Jun 11, 2024
1 parent e9f73b9 commit b495056
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/kes/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ Options:
Examples:
$ kes identity new
$ kes identity new --ip "192.168.0.182" --ip "10.0.0.92" localhost
$ kes identity new --ip "192.168.0.182" --ip "10.0.0.92" --key private.key --cert public.crt localhost
$ kes identity new --key server.key --cert server.crt --encrypt --expiry 8760h kes-server.local
`

Expand All @@ -217,8 +217,8 @@ func newIdentityCmd(args []string) {
expiry time.Duration
encrypt bool
)
cmd.StringVar(&keyPath, "key", "", "Path to private key")
cmd.StringVar(&certPath, "cert", "", "Path to certificate")
cmd.StringVar(&keyPath, "key", "server.key", "Path to private key")
cmd.StringVar(&certPath, "cert", "server.crt", "Path to certificate")
cmd.BoolVarP(&forceFlag, "force", "f", false, "Overwrite an existing private key and/or certificate")
cmd.IPSliceVar(&IPs, "ip", []net.IP{}, "Add <IP> as subject alternative name")
cmd.StringSliceVar(&domains, "dns", []string{}, "Add <DOMAIN> as subject alternative name")
Expand Down Expand Up @@ -249,9 +249,9 @@ func newIdentityCmd(args []string) {
if expiry > 0 {
cli.Fatalf("'--expiry' requires a private key and certificate file. Set the '--cert' and '--key' flag")
}
if len(IPs) > 0 {
cli.Fatalf("'--ip' requires a private key and certificate file. Set the '--cert' and '--key' flag")
}
// if len(IPs) > 0 {
// cli.Fatalf("'--ip' requires a private key and certificate file. Set the '--cert' and '--key' flag")
// }
if len(domains) > 0 {
cli.Fatalf("'--dns' requires a private key and certificate file. Set the '--cert' and '--key' flag")
}
Expand Down

0 comments on commit b495056

Please sign in to comment.