Skip to content

Commit 9fb9065

Browse files
committed
Remove the new- prefix on ca token and ca certificate commands.
Fixes smallstep/step#128
1 parent 00942e2 commit 9fb9065

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

command/ca/ca.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ $ step ca root root_ca.crt \
3131
3232
Create a new certificate using a token:
3333
'''
34-
$ TOKEN=$(step ca new-token internal.example.com)
35-
$ step ca new-certificate internal.example.com internal.crt internal.key \
34+
$ TOKEN=$(step ca token internal.example.com)
35+
$ step ca certificate internal.example.com internal.crt internal.key \
3636
--token $TOKEN --ca-url https://ca.smallstep.com --root root_ca.crt
3737
'''
3838

command/ca/certificate.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ import (
2222

2323
func newCertificateCommand() cli.Command {
2424
return cli.Command{
25-
Name: "new-certificate",
25+
Name: "certificate",
2626
Action: cli.ActionFunc(newCertificateAction),
2727
Usage: "generate a new certificate pair signed by the root certificate",
28-
UsageText: `**step ca new-certificate** <hostname> <crt-file> <key-file>
28+
UsageText: `**step ca certificate** <hostname> <crt-file> <key-file>
2929
[**--token**=<token>] [**--ca-url**=<uri>] [**--root**=<file>]
3030
[**--not-before**=<time|duration>] [**--not-after**=<time|duration>]`,
31-
Description: `**step ca new-certificate** command generates a new certificate pair
31+
Description: `**step ca certificate** command generates a new certificate pair
3232
3333
## POSITIONAL ARGUMENTS
3434
@@ -45,14 +45,14 @@ func newCertificateCommand() cli.Command {
4545
4646
Request a new certificate for a given domain:
4747
'''
48-
$ TOKEN=$(step ca new-token internal.example.com)
49-
$ step ca new-certificate --token $TOKEN internal.example.com internal.crt internal.key
48+
$ TOKEN=$(step ca token internal.example.com)
49+
$ step ca certificate --token $TOKEN internal.example.com internal.crt internal.key
5050
'''
5151
5252
Request a new certificate with a 1h validity:
5353
'''
54-
$ TOKEN=$(step ca new-token internal.example.com)
55-
$ step ca new-certificate --token $TOKEN --not-after=1h internal.example.com internal.crt internal.key
54+
$ TOKEN=$(step ca token internal.example.com)
55+
$ step ca certificate --token $TOKEN --not-after=1h internal.example.com internal.crt internal.key
5656
'''`,
5757
Flags: []cli.Flag{
5858
tokenFlag,
@@ -86,13 +86,13 @@ func signCertificateCommand() cli.Command {
8686
8787
Sign a new certificate for the given CSR:
8888
'''
89-
$ TOKEN=$(step ca new-token internal.example.com)
89+
$ TOKEN=$(step ca token internal.example.com)
9090
$ step ca sign --token $TOKEN internal.csr internal.crt
9191
'''
9292
9393
Sign a new certificate with a 1h validity:
9494
'''
95-
$ TOKEN=$(step ca new-token internal.example.com)
95+
$ TOKEN=$(step ca token internal.example.com)
9696
$ step ca sign --token $TOKEN --not-after=1h internal.csr internal.crt
9797
'''`,
9898
Flags: []cli.Flag{

command/ca/token.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ type provisionersSelect struct {
2828

2929
func newTokenCommand() cli.Command {
3030
return cli.Command{
31-
Name: "new-token",
31+
Name: "token",
3232
Action: cli.ActionFunc(newTokenAction),
3333
Usage: "generates an OTT granting access to the CA",
34-
UsageText: `**step ca new-token** <hostname>
34+
UsageText: `**step ca token** <hostname>
3535
[--**kid**=<kid>] [--**issuer**=<issuer>] [**--ca-url**=<uri>] [**--root**=<file>]
3636
[**--not-before**=<time|duration>] [**--not-after**=<time|duration>]
3737
[**--password-file**=<file>] [**--output-file**=<file>] [**--key**=<file>]`,
38-
Description: `**step ca new-token** command generates a one-time token granting access to the
38+
Description: `**step ca token** command generates a one-time token granting access to the
3939
certificates authority.
4040
4141
## POSITIONAL ARGUMENTS
@@ -51,33 +51,33 @@ certificates authority.
5151
5252
Get a new token for a DNS:
5353
'''
54-
$ step ca new-token internal.example.com
54+
$ step ca token internal.example.com
5555
'''
5656
5757
Get a new token for an IP address:
5858
'''
59-
$ step ca new-token 192.168.10.10
59+
$ step ca token 192.168.10.10
6060
'''
6161
6262
Get a new token that would be valid not, but expires in 30 minutes:
6363
'''
64-
$ step ca new-token --not-after 30m internal.example.com
64+
$ step ca token --not-after 30m internal.example.com
6565
'''
6666
6767
Get a new token that is not valid for 30 and expires 5 minutes after that:
6868
'''
69-
$ step ca new-token --not-before 30m --not-after 35m internal.example.com
69+
$ step ca token --not-before 30m --not-after 35m internal.example.com
7070
'''
7171
7272
Get a new token signed with the given private key, the public key must be
7373
configured in the certificate authority:
7474
'''
75-
$ step ca new-token internal.smallstep.com --key token.key
75+
$ step ca token internal.smallstep.com --key token.key
7676
'''
7777
7878
Get a new token for a specific provisioner kid, ca-url and root:
7979
'''
80-
$ step ca new-token internal.example.com \
80+
$ step ca token internal.example.com \
8181
--kid 4vn46fbZT68Uxfs9LBwHkTvrjEvxQqx-W8nnE-qDjts \
8282
--ca-url https://ca.example.com \
8383
--root /path/to/root_ca.crt internal.example.com

0 commit comments

Comments
 (0)