certs

package
v0.4.15 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeCertPEM

func EncodeCertPEM(cert *x509.Certificate) []byte

func EncodePrivateKeyPEM

func EncodePrivateKeyPEM(key *rsa.PrivateKey) []byte

func GenerateCertAndKey

func GenerateCertAndKey(commonName string, extKeyUsages []x509.ExtKeyUsage, caCert *x509.Certificate, caKey *rsa.PrivateKey) (*x509.Certificate, *rsa.PrivateKey, error)

func GeneratePrivateKey

func GeneratePrivateKey() (*rsa.PrivateKey, error)

func GenerateSelfSignedCACert

func GenerateSelfSignedCACert(commonName string, key *rsa.PrivateKey) (*x509.Certificate, error)

func GenerateSelfSignedCACertAndKey

func GenerateSelfSignedCACertAndKey(commonName string) (*x509.Certificate, *rsa.PrivateKey, error)

func GenerateSignedCert

func GenerateSignedCert(commonName string, extKeyUsages []x509.ExtKeyUsage, key *rsa.PrivateKey, caCert *x509.Certificate, caKey *rsa.PrivateKey) (*x509.Certificate, error)

func WriteCertPEM

func WriteCertPEM(path string, cert *x509.Certificate) error

func WritePrivateKeyPEM

func WritePrivateKeyPEM(path string, key *rsa.PrivateKey) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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