cli

package
v0.0.0-...-8fbced5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2016 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package cli provides the template for adding new cfssl commands

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PopFirstArgument

func PopFirstArgument(args []string) (string, []string, error)

PopFirstArgument returns the first element and the rest of a string slice and return error if failed to do so. It is a helper function to parse non-flag arguments previously used in cfssl commands.

func PrintCRL

func PrintCRL(certList []byte)

PrintCRL outputs the CRL to stdout

func PrintCert

func PrintCert(key, csrBytes, cert []byte)

PrintCert outputs a cert, key and csr to stdout

func PrintOCSPResponse

func PrintOCSPResponse(resp []byte)

PrintOCSPResponse outputs an OCSP response to stdout ocspResponse is base64 encoded

func ReadStdin

func ReadStdin(filename string) ([]byte, error)

ReadStdin reads from stdin if the file is "-"

func RootFromConfig

func RootFromConfig(c *Config) universal.Root

RootFromConfig returns a universal signer Root structure that can be used to produce a signer.

func Start

func Start(cmds map[string]*Command) error

Start is the entrance point of cfssl command line tools.

Types

type Command

type Command struct {
	// The Usage Text
	UsageText string
	// Flags to look up in the global table
	Flags []string
	// Main runs the command, args are the arguments after flags
	Main func(args []string, c Config) error
}

Command holds the implementation details of a cfssl command.

type Config

type Config struct {
	Hostname                     string
	CertFile                     string
	CSRFile                      string
	CAFile                       string
	CAKeyFile                    string
	TLSCertFile                  string
	TLSKeyFile                   string
	TrustAnchorFile              string
	RequireClientTLSCertificates bool
	KeyFile                      string
	IntermediatesFile            string
	CABundleFile                 string
	IntBundleFile                string
	Stats                        string
	Address                      string
	Port                         int
	Password                     string
	ConfigFile                   string
	CFG                          *config.Config
	Profile                      string
	IsCA                         bool
	RenewCA                      bool
	IntDir                       string
	Flavor                       string
	Metadata                     string
	Domain                       string
	IP                           string
	Remote                       string
	Label                        string
	AuthKey                      string
	Module                       string
	Token                        string
	PIN                          string
	PKCS11Label                  string
	ResponderFile                string
	ResponderKeyFile             string
	Status                       string
	Reason                       string
	RevokedAt                    string
	Interval                     time.Duration
	List                         bool
	Family                       string
	Timeout                      time.Duration
	Scanner                      string
	CSVFile                      string
	NumWorkers                   int
	MaxHosts                     int
	Responses                    string
	Path                         string
	Usage                        string
	PGPPrivate                   string
	Serial                       string
	DBConfigFile                 string
}

Config is a type to hold flag values used by cfssl commands.

Directories

Path Synopsis
Package bundle implements the bundle command.
Package bundle implements the bundle command.
Package certinfo implements the certinfo command
Package certinfo implements the certinfo command
Package gencert implements the gencert command.
Package gencert implements the gencert command.
Package gencrl implements the gencrl command
Package gencrl implements the gencrl command
Package genkey implements the genkey command.
Package genkey implements the genkey command.
Package info implements the info command.
Package info implements the info command.
Package ocspdump implements the ocspdump command.
Package ocspdump implements the ocspdump command.
Package ocsprefresh implements the ocsprefresh command.
Package ocsprefresh implements the ocsprefresh command.
Package ocspserve implements the ocspserve function.
Package ocspserve implements the ocspserve function.
Package ocspsign implements the ocspsign command.
Package ocspsign implements the ocspsign command.
Package revoke implements the revoke command.
Package revoke implements the revoke command.
Package selfsign implements the selfsign command.
Package selfsign implements the selfsign command.
Package serve implements the serve command for CFSSL's API.
Package serve implements the serve command for CFSSL's API.
Package sign implements the sign command.
Package sign implements the sign command.
Package version implements the version command.
Package version implements the version command.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL