Documentation ¶
Index ¶
- func CreateCertificateToMem(template, parent *sm2.Certificate, key csp.Key) (cert []byte, err error)
- func CreateCertificateToPem(FileName string, template, parent *sm2.Certificate, key csp.Key) (bool, error)
- func GeneratePrivateKey(keystorePath string, opt int) (csp.Key, crypto.Signer, error)
- func GetECPublicKey(priv csp.Key) (*ecdsa.PublicKey, error)
- func GetSM2PublicKey(priv csp.Key) (*sm2.PublicKey, error)
- func ParseSm2CertificateToX509(sm2Cert *sm2.Certificate) *x509.Certificate
- func ParseX509CertificateToSm2(x509Cert *x509.Certificate) *sm2.Certificate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCertificateToMem ¶
func CreateCertificateToMem(template, parent *sm2.Certificate, key csp.Key) (cert []byte, err error)
CreateCertificateToMem 证书转mem
func CreateCertificateToPem ¶
func CreateCertificateToPem(FileName string, template, parent *sm2.Certificate, key csp.Key) (bool, error)
CreateCertificateToPem 证书转pem
func GeneratePrivateKey ¶
GeneratePrivateKey 生成私钥
func GetECPublicKey ¶
GetECPublicKey 获取ecdsa公钥
func GetSM2PublicKey ¶
GetSM2PublicKey 获取sm2公钥
func ParseSm2CertificateToX509 ¶
func ParseSm2CertificateToX509(sm2Cert *sm2.Certificate) *x509.Certificate
ParseSm2CertificateToX509 解析sm2格式证书为x509格式
func ParseX509CertificateToSm2 ¶
func ParseX509CertificateToSm2(x509Cert *x509.Certificate) *sm2.Certificate
ParseX509CertificateToSm2 解析x509格式为sm2格式证书
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.