cert

package
v4.2.0-alpha.0+incompa... Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const CertRecommendedName = "ca"
View Source
const DecryptCommandName = "decrypt"
View Source
const EncryptCommandName = "encrypt"

Variables

This section is empty.

Functions

func NewCmdCert

func NewCmdCert(name, fullName string, streams genericclioptions.IOStreams) *cobra.Command

NewCmdCert implements the OpenShift cli ca command

func NewCommandDecrypt

func NewCommandDecrypt(commandName string, fullName, encryptFullName string, streams genericclioptions.IOStreams) *cobra.Command

func NewCommandEncrypt

func NewCommandEncrypt(commandName string, fullName string, streams genericclioptions.IOStreams) *cobra.Command

Types

type DecryptOptions

type DecryptOptions struct {
	// EncryptedFile is a file containing an encrypted PEM block.
	EncryptedFile string
	// EncryptedData is a byte slice containing an encrypted PEM block.
	EncryptedData []byte
	// EncryptedReader is used to read an encrypted PEM block if no EncryptedFile or EncryptedData is provided. Cannot be a terminal reader.
	EncryptedReader io.Reader

	// DecryptedFile is a destination file to write decrypted data to.
	DecryptedFile string
	// DecryptedWriter is used to write decrypted data to if no DecryptedFile is provided
	DecryptedWriter io.Writer

	// KeyFile is a file containing a PEM block with the password to use to decrypt the data
	KeyFile string
}

func NewDecryptOptions

func NewDecryptOptions(streams genericclioptions.IOStreams) *DecryptOptions

func (*DecryptOptions) Decrypt

func (o *DecryptOptions) Decrypt() error

func (*DecryptOptions) Validate

func (o *DecryptOptions) Validate(args []string) error

type EncryptOptions

type EncryptOptions struct {
	// CleartextFile contains cleartext data to encrypt.
	CleartextFile string
	// CleartextData is cleartext data to encrypt.
	CleartextData []byte
	// CleartextReader reads cleartext data to encrypt if CleartextReader and CleartextFile are unspecified.
	CleartextReader io.Reader

	// EncryptedFile has encrypted data written to it.
	EncryptedFile string
	// EncryptedWriter has encrypted data written to it if EncryptedFile is unspecified.
	EncryptedWriter io.Writer

	// KeyFile contains the password in PEM format (as previously written by GenKeyFile)
	KeyFile string
	// GenKeyFile indicates a key should be generated and written
	GenKeyFile string

	// PromptWriter is used to write status and prompt messages
	PromptWriter io.Writer
}

func NewEncryptOptions

func NewEncryptOptions(streams genericclioptions.IOStreams) *EncryptOptions

func (*EncryptOptions) Encrypt

func (o *EncryptOptions) Encrypt() error

func (*EncryptOptions) Validate

func (o *EncryptOptions) Validate(args []string) error

Jump to

Keyboard shortcuts

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