files

package
v3.0.0-...-8a73552 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadCertificate

func LoadCertificate(file string) (certificate *x509.Certificate, err error)

LoadCertificate 加载证书

func LoadRSAPrivateKey

func LoadRSAPrivateKey(file string) (privateKey *rsa.PrivateKey, err error)

LoadRSAPrivateKey 加载RSA PRIVATE KEY

func LoadRSAPublicKey

func LoadRSAPublicKey(file string) (publicKey *rsa.PublicKey, err error)

LoadRSAPublicKey 加载RSA PUBLIC KEY

func LoadRSAPublicKeyWithSerialNo

func LoadRSAPublicKeyWithSerialNo(file string) (serialNo string, publicKey *rsa.PublicKey, err error)

LoadRSAPublicKeyWithSerialNo 加载本地RSA公钥,同时返回证书序列号

func MakeNewPath

func MakeNewPath(targetPath string) error

MakeNewPath 判断目录是否存在,如果不存在,则新建一个目录

func UnmarshalCertificate

func UnmarshalCertificate(data []byte) (serialNo string, cert *x509.Certificate, err error)

UnmarshalCertificate 反序列化data到证书

func UnmarshalRSAPublicKey

func UnmarshalRSAPublicKey(key []byte) (serialNo string, publicKey *rsa.PublicKey, err error)

UnmarshalRSAPublicKey 反序列化RSA PublicKey, 同时返回证书序列号

func WritToFile

func WritToFile(filePath, fileName string, data []byte) (err error)

WritToFile 将data写入到指定目录的指定文件里

Types

This section is empty.

Jump to

Keyboard shortcuts

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