cert

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCertKey

func GenerateCertKey(parentCertPem []byte, parentKeyPem []byte, subject *pkix.Name, serial *string) (cert *pem.Block, key *pem.Block)

func GenerateCertKeyBytes

func GenerateCertKeyBytes(parentCertPem []byte, parentKeyPem []byte, subject *pkix.Name, serial *string) (cert []byte, key []byte)

func GenerateCertKeyFiles

func GenerateCertKeyFiles(parentCertPem []byte, parentKeyPem []byte, subject *pkix.Name, serial *string)

func LoadTLSCfg

func LoadTLSCfg(caPath string, clientCertPath string, clientCertKeyPath string) (*tls.Config, error)

func LoadTLSCfgFromBytes

func LoadTLSCfgFromBytes(caCert []byte, clientCertPem []byte, clientCertKey []byte) (*tls.Config, error)

func PemToCertificate

func PemToCertificate(pemBytes []byte) (cert *x509.Certificate)

func PemToPrivKey

func PemToPrivKey(pemBytes []byte) (key *rsa.PrivateKey)

func Sign

func Sign(privateKey []byte, payload string) string

func Verify

func Verify(certificate []byte, payload, sig string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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