Documentation ¶
Index ¶
- Constants
- Variables
- type CaSink
- type CertData
- type CrlSink
- type CsrSink
- type IssueOutcome
- type IssueSink
- type Pki
- type PkiCli
- func (p *PkiCli) Issue(format IssueSink, opts *conf.Config) (IssueOutcome, error)
- func (p *PkiCli) ReadAcme(format IssueSink, opts *conf.Config) (bool, error)
- func (p *PkiCli) Revoke(serial string) error
- func (p *PkiCli) Sign(sink CsrSink, opts *conf.Config) error
- func (p *PkiCli) Tidy() error
- func (p *PkiCli) Verify(cert *x509.Certificate) error
- type Signature
- type StorageImplementation
Constants ¶
View Source
const ( Issued = 0 NotNeeded = 1 Error = 2 )
Variables ¶
View Source
var ErrNoCertFound = errors.New("data not found")
Functions ¶
This section is empty.
Types ¶
type CertData ¶ added in v1.5.0
func (*CertData) AsContainer ¶ added in v1.5.0
func (*CertData) HasCertificate ¶ added in v1.5.0
func (*CertData) HasPrivateKey ¶ added in v1.5.0
type IssueOutcome ¶
type IssueOutcome int
type IssueSink ¶ added in v1.8.0
type IssueSink interface { WriteCert(cert *CertData) error ReadCert() (*x509.Certificate, error) }
IssueSink defines pluggable sink to write certificate data to.
type Pki ¶
type Pki interface { // Issue issues a new certificate from the PKI Issue(opts *conf.Config) (*CertData, error) // Sign signs a CSR Sign(csr string, opts *conf.Config) (*Signature, error) // Revoke revokes a certificate by its serial number Revoke(serial string) error // ReadAcme reads a previously acquired letsencrypt certificate from Vault ReadAcme(commonName string, config *conf.Config) (*CertData, error) // Tidy cleans up the PKI blob storage of dangling certificates Tidy() error // Cleanup cleans up the used resources of the client is not related to PKI operations Cleanup() error // FetchCa returns the CA for the configured mount FetchCa(binary bool) ([]byte, error) // FetchCaChain returns the whole CA chain for the configured mount FetchCaChain() ([]byte, error) // FetchCrl returns the CRL of the configured mount FetchCrl(binary bool) ([]byte, error) }
type PkiCli ¶
type PkiCli struct {
// contains filtered or unexported fields
}
func NewPki ¶
func NewPki(pki Pki, strategy issue_strategies.IssueStrategy) (*PkiCli, error)
type StorageImplementation ¶ added in v1.8.0
type StorageImplementation interface { Read() ([]byte, error) CanRead() error Write([]byte) error CanWrite() error }
StorageImplementation is a simple wrapper around a key artifact (cert, key, ca, crl, csr). This enables decoupling from the actual resource (file-based, kubernetes, network, ..) and make it interchangeable.
Click to show internal directories.
Click to hide internal directories.