testutil

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2025 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(certFile *os.File, keyFile *os.File) (*tls.Certificate, *x509.Certificate, error)

func GenerateCRL

func GenerateCRL(caX509Cert *x509.Certificate, caPrivateKey crypto.PrivateKey, certs []*x509.Certificate, crlFile *os.File) error

func GenerateCert

func GenerateCert(caCert *tls.Certificate, client bool, certFile *os.File, keyFile *os.File) (*tls.Certificate, *x509.Certificate, error)

Types

type CertsBundle

type CertsBundle struct {
	CACert     *os.File
	CAKey      *os.File
	CAEmptyCRL *os.File
	CATLSCert  *tls.Certificate
	CAX509Cert *x509.Certificate

	ServerCert     *os.File
	ServerKey      *os.File
	ServerTLSCert  *tls.Certificate
	ServerX509Cert *x509.Certificate

	ClientCert     *os.File
	ClientKey      *os.File
	ClientCRL      *os.File
	ClientTLSCert  *tls.Certificate
	ClientX509Cert *x509.Certificate
	// contains filtered or unexported fields
}

func NewCertsBundle

func NewCertsBundle() *CertsBundle

func (*CertsBundle) Close

func (bundle *CertsBundle) Close()

func (*CertsBundle) NewHttpClient

func (bundle *CertsBundle) NewHttpClient() *http.Client

Jump to

Keyboard shortcuts

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