Versions in this module Expand all Collapse all v1 v1.0.1 Jul 31, 2020 v1.0.0 Jul 3, 2020 Changes in this version + func CheckSignature(cert *x509.Certificate) error + func CheckSignatureFrom(son *x509.Certificate, parent *x509.Certificate) error + func CheckSignatureFromSM2(son, parent *x509.Certificate) error + func CheckSignatureSM2(csr *x509.Certificate) error + func CreateCertBySMPrivte(pri *sm2.PrivateKey, pub *sm2.PublicKey) (cert []byte) + func CreateCertificate(cinfo *TBSCertificate, signature []byte) ([]byte, error) + func CreateCertificateRequest(template *x509.CertificateRequest, pub *sm2.PublicKey, pri *sm2.PrivateKey, ...) (csr []byte, err error) + func CreateRootCert(rootPri *sm2.PrivateKey) (cert []byte, err error) + func FillCertificateTemplateByCSR(template *x509.Certificate, csr *x509.CertificateRequest) + func FromCertBytesToPubKey(asn1Data []byte) (*ecdsa.PublicKey, error) + func FromCertBytesToPubKey1(asn1Data []byte) (*ecdsa.PublicKey, error) + func GetCertFromByte(idBytes []byte) (*x509.Certificate, error) + func GetPubByteFromCert(asn1Data []byte) ([]byte, error) + func IsCorrectSY(syCrypto interface{}) bool + func IsEqulCert(cert *x509.Certificate, idBytes []byte) error + func IssueCert(rootcert *x509.Certificate, rootPri *sm2.PrivateKey, sonPuk *sm2.PublicKey) (cert []byte, err error) + func IssueCertificateBySoftCAKey(cinfo *TBSCertificate, caPri *sm2.PrivateKey, userId []byte) ([]byte, error) + func ParseCertificate(asn1Data []byte) (*x509.Certificate, error) + func ParseCertificateRequest(asn1Data []byte) (*x509.CertificateRequest, error) + func ParseCertificateSM2(asn1Data []byte) (*x509.Certificate, error) + func ReadPemFileByPath(path string) ([]byte, error) + func VarifyCertByPubKey(pubkey *sm2.PublicKey, cert []byte) error + func VerifyCSRSign(csr *x509.CertificateRequest, userId []byte) bool + func VerifyDERCSRSign(asn1Data []byte, userId []byte) (bool, error) + type TBSCertificate tbsCertificate + func CreateCertificateInfo(template, parent *x509.Certificate, csr *x509.CertificateRequest) (*TBSCertificate, error)