certificate

package
v0.0.0-...-01f5b33 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Der2Pem

func Der2Pem(data []byte, title string) string

Der2Pem encodes der data to pem format

func GetCert

func GetCert(name, subject string) (*x509.Certificate, error)

GetCert return or create a self-signed Certificate.

func GetCertBundle

func GetCertBundle(name string, subject string) ([]byte, error)

GetCertBundle return or create a Certificate Bundle, based on GetCert and GetCertKey. Especially for client certificate, user may need to import to system.

func GetCertBundleFilename

func GetCertBundleFilename(name string) string

GetCertBundleFilename returns the file path of Certificate Bundle in the AppDataDir

func GetCertFilename

func GetCertFilename(name string) string

GetCertFilename returns the file path of Certificate in the AppDataDir

func GetCertKey

func GetCertKey(name string) (key []byte, err error)

GetCertKey return or create a private key

func GetCertKeyFilename

func GetCertKeyFilename(name string) string

GetCertKeyFilename returns the file path of private key in the AppDataDir

func Pem2Der

func Pem2Der(PEMString string) ([]byte, string)

Pem2Der decodes pem data to der format

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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