From e5076b0dfcd8aea435a331731b01e8c423c4c3d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E8=83=96?= Date: Tue, 8 Feb 2022 19:13:16 +0800 Subject: [PATCH] [X509] polish --- smx509/x509.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/smx509/x509.go b/smx509/x509.go index 5d1ade2..7853707 100644 --- a/smx509/x509.go +++ b/smx509/x509.go @@ -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):