pki

package
v2.3.0-on-1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCA

func GenerateCA() (ca *x509.Certificate, cert, key []byte, priv *ecdsa.PrivateKey, err error)

GenerateCA creates a deterministic certificate authority (for test purposes only)

func GenerateCertificate

func GenerateCertificate(ca *x509.Certificate, caPriv *ecdsa.PrivateKey, email string) (cert, key []byte, err error)

GenerateCertificate creates a certificate

func LoadCertPool

func LoadCertPool(caBytes []byte) (*x509.CertPool, error)

LoadCertPool loads cert pool from ca certificate

func LoadCertificate

func LoadCertificate(certBytes []byte) (*tls.Certificate, error)

LoadCertificate loads cert from bytes

func LoadKey

func LoadKey(keyBytes []byte) (crypto.PrivateKey, error)

LoadKey loads key from bytes

func LoadKeyAndCertificate

func LoadKeyAndCertificate(keyBytes []byte, certBytes []byte) (*tls.Certificate, error)

LoadKeyAndCertificate loads client certificate

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