Versions in this module Expand all Collapse all v0 v0.1.0 Jun 21, 2019 Changes in this version + func GenerateCert(ca *CA, name string, validFrom string, validFor time.Duration, isCA bool, ...) (cert, key []byte, err error) + type CA struct + NextSerial *big.Int + func NewCA(certPem, keyPem []byte, nextSerial *big.Int) (*CA, error) + func NewSelfSignedCA(caID string, curve string, rsaBits int) (*CA, error) + func (ca *CA) GetNextSerial() *big.Int + func (ca *CA) IssueCA(name, curve string, rsaBits int) (cert, key []byte, err error) + func (ca *CA) IssueClient(name, curve string, rsaBits int) (cert, key []byte, err error) + func (ca *CA) IssueServer(name, curve string, rsaBits int) (cert, key []byte, err error) + type Entity struct + Algorithm x509.PublicKeyAlgorithm + Cert *x509.Certificate + Key interface{} + func NewEntityFromDER(certDer, keyDer []byte, algo x509.PublicKeyAlgorithm) (*Entity, error) + func NewEntityFromFile(cert, key string) (*Entity, error) + func NewEntityFromPEM(cert []byte, key []byte) (*Entity, error) + func (entity *Entity) GetCertAsDER() ([]byte, error) + func (entity *Entity) GetCertAsPEM() ([]byte, error) + func (entity *Entity) GetKeyAsDER() ([]byte, error) + func (entity *Entity) GetKeyAsPEM() ([]byte, error)