Documentation ¶
Overview ¶
Package pki provides helpers to manage a Public Key Infrastructure.
Index ¶
- Variables
- type CSRRequest
- type Request
- type ZitiPKI
- func (e *ZitiPKI) CRL(caName string, expire time.Time) ([]byte, error)
- func (e *ZitiPKI) CSR(caname string, bundleName string, csrTemplate x509.CertificateRequest, ...) error
- func (e *ZitiPKI) Chain(signer *certificate.Bundle, req *Request) error
- func (e *ZitiPKI) GeneratePrivateKey(signer *certificate.Bundle, req *Request) error
- func (e *ZitiPKI) GetBundle(caName, name string) (*certificate.Bundle, error)
- func (e *ZitiPKI) GetCA(name string) (*certificate.Bundle, error)
- func (e *ZitiPKI) GetPrivateKey(caname string, keyname string) (crypto.PrivateKey, error)
- func (e *ZitiPKI) Revoke(caName string, cert *x509.Certificate) error
- func (e *ZitiPKI) Sign(signer *certificate.Bundle, req *Request) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCannotSelfSignNonCA = errors.New("cannot self sign non CA request") ErrMaxPathLenReached = errors.New("max path len reached") )
Signing errors.
Functions ¶
This section is empty.
Types ¶
type CSRRequest ¶
type CSRRequest struct { Name string IsClientCertificate bool PrivateKey rsa.PrivateKey Template *x509.CertificateRequest }
type Request ¶
type Request struct { Name string KeyName string IsClientCertificate bool PrivateKeySize int Template *x509.Certificate }
Request is a struct for providing configuration to GenerateCertificate when actioning a certification generation request.
type ZitiPKI ¶
ZitiPKI wraps helpers to handle a Public Key Infrastructure.
func (*ZitiPKI) CSR ¶
func (e *ZitiPKI) CSR(caname string, bundleName string, csrTemplate x509.CertificateRequest, privateKey crypto.PrivateKey) error
CSR generates a csr certificate
func (*ZitiPKI) Chain ¶
func (e *ZitiPKI) Chain(signer *certificate.Bundle, req *Request) error
Chain will...
func (*ZitiPKI) GeneratePrivateKey ¶
func (e *ZitiPKI) GeneratePrivateKey(signer *certificate.Bundle, req *Request) error
Generate and store a private key
func (*ZitiPKI) GetBundle ¶
func (e *ZitiPKI) GetBundle(caName, name string) (*certificate.Bundle, error)
GetBundle fetches and returns a certificate bundle from the store.
func (*ZitiPKI) GetCA ¶
func (e *ZitiPKI) GetCA(name string) (*certificate.Bundle, error)
GetCA fetches and returns the named Certificate Authority bundle from the store.
func (*ZitiPKI) GetPrivateKey ¶
GetPrivateKey fetches and returns a private key from the store.
Click to show internal directories.
Click to hide internal directories.