You've already forked step-ca-cli
mirror of
https://github.com/smallstep/cli.git
synced 2026-10-29 00:17:23 +03:00
Improve docs for step ca root
This commit is contained in:
@@ -20,7 +20,33 @@ func rootComand() cli.Command {
|
||||
UsageText: `**step ca root** <root-file>
|
||||
[--fingerprint=<fingerprint>] [**--ca-url**=<uri>]`,
|
||||
Description: `**step ca root** downloads and validates the root certificate from the
|
||||
certificate authority.`,
|
||||
certificate authority.
|
||||
|
||||
## POSITIONAL ARGUMENTS
|
||||
|
||||
<root-file>
|
||||
: File to write root certificate (PEM format)
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
Get the root fingerprint in the CA:
|
||||
'''
|
||||
$ step certificate fingerprint /path/to/root_ca.crt
|
||||
0d7d3834cf187726cf331c40a31aa7ef6b29ba4df601416c9788f6ee01058cf3
|
||||
'''
|
||||
|
||||
Download the root certificate from the configured certificate authority:
|
||||
'''
|
||||
$ step ca root root_ca.crt \
|
||||
--fingerprint 0d7d3834cf187726cf331c40a31aa7ef6b29ba4df601416c9788f6ee01058cf3
|
||||
'''
|
||||
|
||||
Download the root certificate using a given certificate authority:
|
||||
'''
|
||||
$ step ca root root_ca.crt \
|
||||
--ca-url https://ca.smallstep.com:9000 \
|
||||
--fingerprint 0d7d3834cf187726cf331c40a31aa7ef6b29ba4df601416c9788f6ee01058cf3
|
||||
'''`,
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "fingerprint",
|
||||
@@ -56,6 +82,7 @@ func rootAction(ctx *cli.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Root already validates the certificate
|
||||
resp, err := client.Root(fingerprint)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "error downloading root certificate")
|
||||
|
||||
Reference in New Issue
Block a user