cert

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidOutputFormat added in v0.2.3

func IsValidOutputFormat(format string) error

IsValidOutputFormat returns nil if a format is valid

func ValidOutputFormats added in v0.2.3

func ValidOutputFormats() []string

ValidOutputFormats returns all valid format options

Types

type Cert added in v0.2.2

type Cert struct {
	SkipVerify   bool
	Verbose      bool
	OverWrite    bool
	Hostname     string
	OutputDir    string
	OutputFormat string
	Password     string
	AltNames     string
	IPsans       string
	URISans      string
	TTL          string
	// contains filtered or unexported fields
}

Cert object describes the configuration for bmcert

func (*Cert) CA added in v1.1.0

func (config *Cert) CA() ([]byte, error)

CA returns the configured certificate authority certificate in PEM format

func (*Cert) CreateCertificate added in v0.2.2

func (config *Cert) CreateCertificate() (SignedCertificate, error)

CreateCertificate calls the Vault API and returns a signed certifcate

func (*Cert) Init added in v0.2.2

func (config *Cert) Init()

Init sets runtime variables such as tls skip verify

func (*Cert) WriteCA added in v1.1.0

func (config *Cert) WriteCA() error

WriteCA calls CA() and then writes ca.crt to disk

func (*Cert) WriteCert added in v0.2.2

func (config *Cert) WriteCert(c SignedCertificate) error

WriteCert the certificate to disk

type SignedCertificate

type SignedCertificate struct {
	Certificate    string `json:"certificate"`
	IssuingCa      string `json:"issuing_ca"`
	PrivateKey     string `json:"private_key"`
	PrivateKeyType string `json:"private_key_type"`
	SerialNumber   string `json:"serial_number"`
}

SignedCertificate object describes a certificate signed by Vault

Jump to

Keyboard shortcuts

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