utils

package
Version: v1.65.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2021 License: BSD-3-Clause Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCertificateToMem

func CreateCertificateToMem(template, parent *sm2.Certificate, key crypto.Signer) ([]byte, error)

CreateCertificateToMem 证书转mem

func CreateCertificateToPem

func CreateCertificateToPem(FileName string, template, parent *sm2.Certificate, key crypto.Signer) error

CreateCertificateToPem 证书转pem

func GeneratePrivateKey

func GeneratePrivateKey(keystorePath string, opt int) (csp.Key, crypto.Signer, error)

GeneratePrivateKey 生成私钥

func GetECPublicKey

func GetECPublicKey(priv csp.Key) (*ecdsa.PublicKey, error)

GetECPublicKey 获取ecdsa公钥

func GetSM2PublicKey

func GetSM2PublicKey(priv csp.Key) (*sm2.PublicKey, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL