Versions in this module Expand all Collapse all v0 v0.1.0 Nov 23, 2019 Changes in this version + type Certificate struct + Certificate *x509.Certificate + CertificateRequest *x509.CertificateRequest + Opts *CertificateOpts + PrivateKey *rsa.PrivateKey + func GenerateCertificate(cn, certsDir string) *Certificate + func GenerateCertificateAuthority(cn, certsDir string) *Certificate + func GenerateCertificateSigningRequest(cn, certDir string, altNames ...string) *Certificate + func GenerateSignedCertificate(cn, certsDir string, ca *Certificate, altNames ...string) *Certificate + func GenerateSignedClientCertificate(cn, certsDir string, ca *Certificate, altNames ...string) *Certificate + func Load(cn, keyFilename, certFilename string) *Certificate + func LoadFromDir(cn, certsDir string) *Certificate + func NewCertificate(cn string, opts *CertificateOpts) *Certificate + func (crt *Certificate) CertificatePEM() []byte + func (crt *Certificate) CertificateSigningRequestPEM() []byte + func (crt *Certificate) Error() error + func (crt *Certificate) GenerateCertificate() *Certificate + func (crt *Certificate) GenerateCertificateAuthority() *Certificate + func (crt *Certificate) GenerateCertificateFromPEM(data []byte) *Certificate + func (crt *Certificate) GenerateCertificateSigningRequest() *Certificate + func (crt *Certificate) GeneratePrivateKeyFromPEM(data []byte) *Certificate + func (crt *Certificate) GenerateRSAKey() *Certificate + func (crt *Certificate) GenerateSignedCertificate(ca *Certificate) *Certificate + func (crt *Certificate) GetPrivateKey() *Certificate + func (crt *Certificate) Load() *Certificate + func (crt *Certificate) Persist() *Certificate + func (crt *Certificate) PrivateKeyPEM() []byte + func (crt *Certificate) ReadCertificateFile() *Certificate + func (crt *Certificate) ReadCertificateFromFile(filename string) *Certificate + func (crt *Certificate) ReadFromFile(keyFilename, certFilename string) *Certificate + func (crt *Certificate) ReadPrivateKeyFile() *Certificate + func (crt *Certificate) ReadPrivateKeyFromFile(filename string) *Certificate + func (crt *Certificate) Sign(ca *Certificate) *Certificate + func (crt *Certificate) WithBits(bits int) *Certificate + func (crt *Certificate) WithPassphrase(passphrase string) *Certificate + func (crt *Certificate) WithPath(certsDir string) *Certificate + func (crt *Certificate) WriteCertificate() *Certificate + func (crt *Certificate) WriteCertificateToFile(filename string) *Certificate + func (crt *Certificate) WritePrivateKeyFile() *Certificate + func (crt *Certificate) WritePrivateKeyToFile(filename string) *Certificate + func (crt *Certificate) WriteToFiles(keyFilename, certFilename string) *Certificate + type CertificateOpts struct + Bits int + CertificateFile string + CertsDir string + CommonName string + Country string + DNSNames []string + Duration time.Duration + IPAddresses []string + Locality string + Organization string + OrganizationalUnit string + Passphrase string + PrivateKeyFile string + Province string + URIs []string + UseAs CertificateUse + func DefaultCertificateOpts(cn, certsDir string) *CertificateOpts + func (opts *CertificateOpts) AsCA() *CertificateOpts + func (opts *CertificateOpts) AsClient() *CertificateOpts + func (opts *CertificateOpts) AsServer() *CertificateOpts + func (opts *CertificateOpts) GenerateCSRTemplate() (x509.CertificateRequest, error) + func (opts *CertificateOpts) GenerateSubject() pkix.Name + func (opts *CertificateOpts) GenerateSubjectAltNameExtension() (*pkix.Extension, error) + func (opts *CertificateOpts) GenerateTemplate() (x509.Certificate, error) + func (opts *CertificateOpts) IsCertFileFound() bool + func (opts *CertificateOpts) IsKeyFileFound() bool + func (opts *CertificateOpts) WithPath(certsDir string) *CertificateOpts + type CertificateUse int + const CertificateUsedForCA + const CertificateUsedForClient