2023-03-28 19:12:30 +00:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
2023-08-11 13:12:13 +00:00
|
|
|
// SPDX-License-Identifier: BUSL-1.1
|
2023-03-28 19:12:30 +00:00
|
|
|
|
2018-12-19 08:22:49 +00:00
|
|
|
package ca
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/mitchellh/cli"
|
2023-01-30 17:26:56 +00:00
|
|
|
|
|
|
|
"github.com/hashicorp/consul/command/flags"
|
2018-12-19 08:22:49 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func New() *cmd {
|
|
|
|
return &cmd{}
|
|
|
|
}
|
|
|
|
|
|
|
|
type cmd struct{}
|
|
|
|
|
|
|
|
func (c *cmd) Run(args []string) int {
|
|
|
|
return cli.RunResultHelp
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *cmd) Synopsis() string {
|
|
|
|
return synopsis
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *cmd) Help() string {
|
|
|
|
return flags.Usage(help, nil)
|
|
|
|
}
|
|
|
|
|
|
|
|
const synopsis = `Helpers for CAs`
|
|
|
|
const help = `
|
2023-01-30 17:26:56 +00:00
|
|
|
Usage: consul tls ca <subcommand> [options]
|
2018-12-19 08:22:49 +00:00
|
|
|
|
|
|
|
This command has subcommands for interacting with Certificate Authorities.
|
|
|
|
|
|
|
|
Here are some simple examples, and more detailed examples are available
|
|
|
|
in the subcommands or the documentation.
|
|
|
|
|
|
|
|
Create a CA
|
|
|
|
|
|
|
|
$ consul tls ca create
|
|
|
|
==> saved consul-agent-ca.pem
|
|
|
|
==> saved consul-agent-ca-key.pem
|
|
|
|
|
|
|
|
For more examples, ask for subcommand help or view the documentation.
|
|
|
|
`
|