Documentation ¶
Overview ¶
Package signer combines some utilities for management behind the keys involved in certificates.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SigningCert ¶
type SigningCert struct { CertBin []byte Cert *x509.Certificate PrivateKey *ecdsa.PrivateKey }
A SigningCert is a certificate that can be used to sign other certificates. As such, it's private key is also needed.
func LoadSigningCert ¶
func LoadSigningCert(base string) (*SigningCert, error)
LoadSigningCert loads a signing certificate from a pair of files base.crt, and base.key.
func NewSigningCert ¶
func NewSigningCert() (*SigningCert, error)
NewSigningCert builds a fresh signing certificate to use as a root certificate.
func (*SigningCert) Export ¶
func (s *SigningCert) Export(cafile, keyfile string) error
Export writes the certificate and the signing key to files in PEM format. May return an error if the files exist.
func (*SigningCert) SignTemplate ¶
func (s *SigningCert) SignTemplate(template *x509.Certificate, pub interface{}) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.