[X509] polish

This commit is contained in:
徐胖 2022-02-08 19:13:16 +08:00
parent 03f6b2c30e
commit e5076b0dfc

View File

@ -149,14 +149,8 @@ func MarshalPKIXPublicKey(pub interface{}) ([]byte, error) {
return ret, nil
}
// CertificateRequest represents a PKCS #10, certificate signature request.
type CertificateRequest x509.CertificateRequest
func (c *CertificateRequest) asX509() *x509.CertificateRequest {
return (*x509.CertificateRequest)(c)
}
// These structures reflect the ASN.1 structure of X.509 certificates.:
type certificate struct {
Raw asn1.RawContent
TBSCertificate tbsCertificate
@ -1532,6 +1526,13 @@ func (c *Certificate) CreateCRL(rand io.Reader, priv interface{}, revokedCerts [
})
}
// CertificateRequest represents a PKCS #10, certificate signature request.
type CertificateRequest x509.CertificateRequest
func (c *CertificateRequest) asX509() *x509.CertificateRequest {
return (*x509.CertificateRequest)(c)
}
// These structures reflect the ASN.1 structure of X.509 certificate
// signature requests (see RFC 2986):