extcert

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadCrt

func LoadCrt(cert string) ([]byte, error)

LoadCrt 加载tls cert 如果cert有"base64://"前缀,直接解析后面的字符串,否则认为这是个cert文件名

func LoadCrtAndKeyFile

func LoadCrtAndKeyFile(crtFilename, keyFilename string) (crt, key []byte, err error)

LoadCrtAndKeyFile 读取根证书文件和私钥文件

func LoadCrtFile

func LoadCrtFile(filename string) (*x509.Certificate, error)

LoadCrtFile 解析根证书文件

func LoadKey

func LoadKey(key string) ([]byte, error)

LoadKey 加载tls key 如果key有"base64://"前缀,直接解析后面的字符串,否则认为这是个key文件名

func LoadKeyFile

func LoadKeyFile(filename string) (*rsa.PrivateKey, error)

LoadKeyFile 解析私钥文件

func LoadPair

func LoadPair(cert, key string) (certBytes, keyBytes []byte, err error)

LoadPair 加载tls cert key 如果cert有"base64://"前缀,直接解析后面的字符串,否则认为这是个cert文件名 如果key有"base64://"前缀,直接解析后面的字符串,否则认为这是个key文件名

func ParseCrt

func ParseCrt(b []byte) (*x509.Certificate, error)

ParseCrt 解析根证书

func ParseCrtAndKey

func ParseCrtAndKey(crt, key []byte) (ca *x509.Certificate, privateKey *rsa.PrivateKey, err error)

ParseCrtAndKey 解析根证书和私钥

func ParseCrtAndKeyFile

func ParseCrtAndKeyFile(crtFilename, keyFilename string) (ca *x509.Certificate, key *rsa.PrivateKey, err error)

ParseCrtAndKeyFile 解析根证书文件和私钥文件

func ParseKey

func ParseKey(b []byte) (*rsa.PrivateKey, error)

ParseKey 解析私钥

Types

This section is empty.

Jump to

Keyboard shortcuts

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