Versions in this module Expand all Collapse all v0 v0.1.0 Nov 23, 2019 Changes in this version + const Country + const Duration + const EnvCAKeyPassword + const Locality + const Organization + const OrganizationalUnit + const Province + var GenericDNSNames = []string + var GenericIPAddresses = []string + func GenCAPrivateKey(filename string) (caKey *rsa.PrivateKey, caKeyBytes []byte, err error) + func GenRSAPrivateKey() (key *rsa.PrivateKey, err error) + func NewSelfSignedCACert(caKey *rsa.PrivateKey, cn string) (*x509.Certificate, error) + func NewSignedCert(privKey *rsa.PrivateKey, caKeyPair *KeyPair, cn, o string, dns, ips []string, ...) (*x509.Certificate, error) + func SelfSignedCACert(filename string, caKey *rsa.PrivateKey, cn string) (*x509.Certificate, []byte, error) + func SignedCert(privKey *rsa.PrivateKey, caKeyPair *KeyPair, cn, o string, dns, ips []string, ...) (*x509.Certificate, []byte, error) + type KeyPair struct + CN string + CertFile string + Certificate *x509.Certificate + CertificatePEM []byte + DNSNames []string + ExtKeyUsage []x509.ExtKeyUsage + IPAddresses []string + IsCA bool + KeyFile string + Name string + O string + PrivateKey *rsa.PrivateKey + PrivateKeyPEM []byte + func Load(baseCertsDir, name, cn string) (*KeyPair, error) + func NewCAKeyPair(fromCAKeyPair *KeyPair, baseCertsDir, name, cn string) (*KeyPair, error) + func NewEmptyKeyPair(baseCertsDir, name, cn, o string, dns, ips []string, ...) *KeyPair + func NewKeyPair(baseCertsDir, name, cn, o string, dns, ips []string, caKeyPair *KeyPair, ...) (*KeyPair, error) + func (kp *KeyPair) GenCAKeyPair(fromCAKeyPair *KeyPair) error + func (kp *KeyPair) GenKeyPair(caKeyPair *KeyPair) error + func (kp *KeyPair) Load() error + func (kp *KeyPair) NewFilenames(baseCertsDir, name string) (prevKeyFile string, prevCertFile string) + func (kp *KeyPair) PEMEncodeCert() []byte + func (kp *KeyPair) PEMEncodePrivateKey() []byte + func (kp *KeyPair) SaveCertificate(overwrite bool) error + func (kp *KeyPair) SavePrivateKey(overwrite bool) error + type KeyPairs map[string]*KeyPair + func (kps KeyPairs) Save(overwrite bool) error