Versions in this module Expand all Collapse all v1 v1.0.0 Mar 3, 2023 Changes in this version + const AlternateNameTypeDNS + const AlternateNameTypeEmail + const AlternateNameTypeIP + const AlternateNameTypeURI + const KeyTypeECDSA_256 + const KeyTypeECDSA_384 + const KeyTypeRSA_2048 + const KeyTypeRSA_4096 + const KeyTypeRSA_8192 + const SignatureAlgorithmSHA256 + const SignatureAlgorithmSHA384 + const SignatureAlgorithmSHA512 + func ExportDER(certificate *Certificate) ([]byte, []byte, error) + func ExportPEM(certificate *Certificate) ([]byte, []byte, error) + func ExportPKCS12(certificate *Certificate, issuer *Certificate, password string) ([]byte, error) + type AlternateName struct + Type string + Value string + type Certificate struct + CertificateAuthority bool + CertificateData string + KeyData string + Serial string + Subject Name + func GenerateCertificate(request CertificateRequest, issuer *Certificate) (*Certificate, error) + func ImportP12(p12Data []byte, password string) (*Certificate, error) + func ImportPEM(certData []byte, keyData []byte, password string) (*Certificate, error) + func ImportPEMCertificate(certData []byte) (*Certificate, error) + func (c Certificate) Clone() CertificateRequest + func (c Certificate) Description() string + func (c Certificate) PKey() crypto.PrivateKey + func (c Certificate) X509() *x509.Certificate + type CertificateRequest struct + AlternateNames []AlternateName + IsCertificateAuthority bool + KeyType string + SignatureAlgorithm string + StatusProviders StatusProviders + Subject Name + Usage KeyUsage + Validity DateRange + type DateRange struct + NotAfter time.Time + NotBefore time.Time + func (d DateRange) IsValid() bool + type KeyUsage struct + CRLSign bool + CertSign bool + ClientAuth bool + CodeSigning bool + ContentCommitment bool + CustomEKUs []string + DataEncipherment bool + DecipherOnly bool + DigitalSignature bool + EmailProtection bool + EncipherOnly bool + KeyAgreement bool + KeyEncipherment bool + OCSPSigning bool + ServerAuth bool + TimeStamping bool + type Name struct + City string + CommonName string + Country string + Organization string + Province string + type StatusProviders struct + CRL *string + OCSP *string