cmd/inspect: add help

This commit is contained in:
Laurence Withers 2023-04-29 11:48:10 +01:00
parent 5e6b089971
commit 5953627623
1 changed files with 13 additions and 3 deletions

View File

@ -26,10 +26,20 @@ var (
// Register the "inspect" subcommand.
func Register(root *cobra.Command) {
cmd := &cobra.Command{
Use: "inspect",
Use: "inspect source [source2 …]",
Short: "Inspect files and TLS servers",
RunE: Inspect,
Args: cobra.MinimumNArgs(1),
Long: `Allows inspection of RSA keys, X.509 certificates, CRLs and CSRs. Pass
it a list of sources. Valid sources are:
filenames
- for stdin
host:port for extracting the server's certificate chain from a TLS handshake
https://addr.example/ as per host:port
The output will by default be human-readable formatted text for the terminal,
but JSON and YAML are also supported through the --output flag.`,
RunE: Inspect,
Args: cobra.MinimumNArgs(1),
}
if isatty.IsTerminal(1) {