Versions in this module Expand all Collapse all v0 v0.2.0 Jan 2, 2024 Changes in this version + const DefaultCountry + const DefaultExpires + const DefaultOrganization + const DefaultPublicKeyAlgorithm + const PEMTypeCertificate + const PEMTypePrivateKey + const PEMTypeRSAPrivateKey + func CreateCertificatePEM(template, parent *x509.Certificate, pub any, priv any) (crt *x509.Certificate, crtPEM []byte, err error) + func GeneratePrivateKeyPEM(alg x509.PublicKeyAlgorithm) (key crypto.Signer, keyPEM []byte, err error) + type GenerateOptions struct + Country string + Expires time.Duration + IsCA bool + Names []string + Organization string + Parent PEMPair + PublicKeyAlgorithm x509.PublicKeyAlgorithm + type PEMPair struct + Crt []byte + Key []byte + func Generate(opts GenerateOptions) (res PEMPair, err error) + func (b PEMPair) Certificate() (crt *x509.Certificate, err error) + func (b PEMPair) Decode() (crt *x509.Certificate, key any, err error) + func (b PEMPair) IsZero() bool + func (b PEMPair) PrivateKey() (key any, err error)