Versions in this module Expand all Collapse all v0 v0.15.6 Dec 21, 2022 Changes in this version + const CANotAuthorizedForExtKeyUsage + const CANotAuthorizedForThisName + const DSA + const DSAWithSHA1 + const DSAWithSHA256 + const ECDSA + const ECDSAWithSHA1 + const ECDSAWithSHA256 + const ECDSAWithSHA384 + const ECDSAWithSHA512 + const Ed25519 + const Expired + const ExtKeyUsageAny + const ExtKeyUsageClientAuth + const ExtKeyUsageCodeSigning + const ExtKeyUsageEmailProtection + const ExtKeyUsageIPSECEndSystem + const ExtKeyUsageIPSECTunnel + const ExtKeyUsageIPSECUser + const ExtKeyUsageMicrosoftCommercialCodeSigning + const ExtKeyUsageMicrosoftKernelCodeSigning + const ExtKeyUsageMicrosoftServerGatedCrypto + const ExtKeyUsageNetscapeServerGatedCrypto + const ExtKeyUsageOCSPSigning + const ExtKeyUsageServerAuth + const ExtKeyUsageTimeStamping + const IncompatibleUsage + const KeyUsageCRLSign + const KeyUsageCertSign + const KeyUsageContentCommitment + const KeyUsageDataEncipherment + const KeyUsageDecipherOnly + const KeyUsageDigitalSignature + const KeyUsageEncipherOnly + const KeyUsageKeyAgreement + const KeyUsageKeyEncipherment + const MD2WithRSA + const MD5WithRSA + const NameConstraintsWithoutSANs + const NameMismatch + const NotAuthorizedToSign + const PureEd25519 + const RSA + const SHA1WithRSA + const SHA256WithRSA + const SHA256WithRSAPSS + const SHA384WithRSA + const SHA384WithRSAPSS + const SHA512WithRSA + const SHA512WithRSAPSS + const SM2WithSM3 + const TooManyConstraints + const TooManyIntermediates + const UnconstrainedName + const UnknownPublicKeyAlgorithm + const UnknownSignatureAlgorithm + var IncorrectPasswordError = errors.New("x509: decryption password incorrect") + func CreateCertificate(rand io.Reader, template, parent *x509.Certificate, pub, priv interface{}) ([]byte, error) + func CreateCertificateRequest(rand io.Reader, template *x509.CertificateRequest, priv interface{}) (csr []byte, err error) + func CreateRevocationList(rand io.Reader, template *x509.RevocationList, issuer *Certificate, ...) ([]byte, error) + func DecryptPEMBlock(b *pem.Block, password []byte) ([]byte, error) + func EncryptPEMBlock(rand io.Reader, blockType string, data, password []byte, alg PEMCipher) (*pem.Block, error) + func IsEncryptedPEMBlock(b *pem.Block) bool + func MarshalECPrivateKey(key *ecdsa.PrivateKey) ([]byte, error) + func MarshalPKCS1PrivateKey(key *rsa.PrivateKey) []byte + func MarshalPKCS1PublicKey(key *rsa.PublicKey) []byte + func MarshalPKCS8PrivateKey(key interface{}) ([]byte, error) + func MarshalPKIXPublicKey(pub interface{}) ([]byte, error) + func MarshalSM2PrivateKey(key *sm2.PrivateKey) ([]byte, error) + func ParseCRL(crlBytes []byte) (*pkix.CertificateList, error) + func ParseDERCRL(derBytes []byte) (*pkix.CertificateList, error) + func ParseECPrivateKey(der []byte) (*ecdsa.PrivateKey, error) + func ParseName(raw cryptobyte.String) (*pkix.RDNSequence, error) + func ParsePKCS1PrivateKey(der []byte) (*rsa.PrivateKey, error) + func ParsePKCS1PublicKey(der []byte) (*rsa.PublicKey, error) + func ParsePKCS8PrivateKey(der []byte) (key interface{}, err error) + func ParsePKIXPublicKey(derBytes []byte) (interface{}, error) + func ParseSM2PrivateKey(der []byte) (*sm2.PrivateKey, error) + type CertPool struct + func NewCertPool() *CertPool + func SystemCertPool() (*CertPool, error) + func (s *CertPool) AddCert(cert *Certificate) + func (s *CertPool) AppendCertsFromPEM(pemCerts []byte) (ok bool) + func (s *CertPool) Clone() *CertPool + func (s *CertPool) Equal(other *CertPool) bool + func (s *CertPool) Subjects() [][]byte + type Certificate x509.Certificate + func ParseCertificate(der []byte) (*Certificate, error) + func ParseCertificatePEM(data []byte) (*Certificate, error) + func ParseCertificates(der []byte) ([]*Certificate, error) + func (c *Certificate) CheckCRLSignature(crl *pkix.CertificateList) error + func (c *Certificate) CheckSignature(algo SignatureAlgorithm, signed, signature []byte) error + func (c *Certificate) CheckSignatureFrom(parent *Certificate) error + func (c *Certificate) CreateCRL(rand io.Reader, priv interface{}, revokedCerts []pkix.RevokedCertificate, ...) (crlBytes []byte, err error) + func (c *Certificate) Equal(other *Certificate) bool + func (c *Certificate) ToX509() *x509.Certificate + func (c *Certificate) Verify(opts VerifyOptions) (chains [][]*Certificate, err error) + func (c *Certificate) VerifyHostname(h string) error + type CertificateInvalidError = x509.CertificateInvalidError + type CertificateRequest x509.CertificateRequest + func ParseCertificateRequest(asn1Data []byte) (*CertificateRequest, error) + func ParseCertificateRequestPEM(data []byte) (*CertificateRequest, error) + func (c *CertificateRequest) CheckSignature() error + func (c *CertificateRequest) ToX509() *x509.CertificateRequest + type ExtKeyUsage = x509.ExtKeyUsage + type KeyUsage = x509.KeyUsage + type PEMCipher int + const PEMCipher3DES + const PEMCipherAES128 + const PEMCipherAES192 + const PEMCipherAES256 + const PEMCipherDES + const PEMCipherSM4 + type PublicKeyAlgorithm = x509.PublicKeyAlgorithm + type SignatureAlgorithm = x509.SignatureAlgorithm + type UnknownAuthorityError struct + Cert *Certificate + func (e UnknownAuthorityError) Error() string + type VerifyOptions struct + CurrentTime time.Time + DNSName string + Intermediates *CertPool + KeyUsages []ExtKeyUsage + MaxConstraintComparisions int + Roots *CertPool