Documentation ¶
Index ¶
Constants ¶
View Source
const ( Issued = 0 NotNeeded = 1 Error = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IssueOutcome ¶
type IssueOutcome int
type IssuedCert ¶
type KeyPod ¶
type KeyPod interface { Read() ([]byte, error) CanRead() error Write(string) error CanWrite() error }
KeyPod is a simple wrapper around a key (which is just a byte stream itself). This way, we decouple the implementation (file-based, memory, network, ..) and make it easily swap- and testable.
type Pki ¶
type Pki interface { // Issue issues a new certificate from the PKI Issue(opts conf.IssueArguments) (*IssuedCert, error) // Sign signs a CSR Sign(csr KeyPod, opts conf.SignArguments) (*Signature, error) // Revoke revokes a certificate by its serial number Revoke(serial string) error // Tidy cleans up the PKI cert storage of dangling certificates Tidy() error // Cleanup cleans up the used resources of the client is not related to PKI operations Cleanup() error }
type PkiCli ¶
type PkiCli struct {
// contains filtered or unexported fields
}
func NewPki ¶
func NewPki(pki Pki, strategy issue_strategies.IssueStrategy) (*PkiCli, error)
func (*PkiCli) Issue ¶
func (p *PkiCli) Issue(certFile, privateKeyFile KeyPod, opts conf.IssueArguments) (IssueOutcome, error)
Click to show internal directories.
Click to hide internal directories.