mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-26 12:16:20 +08:00
expose type cast method
This commit is contained in:
parent
51f29b0258
commit
db4ee8585a
@ -555,6 +555,10 @@ func (c *Certificate) asX509() *x509.Certificate {
|
|||||||
return (*x509.Certificate)(c)
|
return (*x509.Certificate)(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *Certificate) ToX509() *x509.Certificate {
|
||||||
|
return c.asX509()
|
||||||
|
}
|
||||||
|
|
||||||
func (c *Certificate) Equal(other *Certificate) bool {
|
func (c *Certificate) Equal(other *Certificate) bool {
|
||||||
if c == nil || other == nil {
|
if c == nil || other == nil {
|
||||||
return c == other
|
return c == other
|
||||||
@ -1491,6 +1495,10 @@ func (c *CertificateRequest) asX509() *x509.CertificateRequest {
|
|||||||
return (*x509.CertificateRequest)(c)
|
return (*x509.CertificateRequest)(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *CertificateRequest) ToX509() *x509.CertificateRequest {
|
||||||
|
return c.asX509()
|
||||||
|
}
|
||||||
|
|
||||||
// These structures reflect the ASN.1 structure of X.509 certificate
|
// These structures reflect the ASN.1 structure of X.509 certificate
|
||||||
// signature requests (see RFC 2986):
|
// signature requests (see RFC 2986):
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user