testscenario

package
v1.72.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TLSScenario

type TLSScenario struct {
	CAs        *x509.CertPool
	ServerCert *x509.Certificate
	ServerKey  *ecdsa.PrivateKey
	ClientCert *x509.Certificate
	ClientKey  *ecdsa.PrivateKey
}

TLSScenario holds client & server tls credentials.

func Create

func Create(t *testing.T, clientValidity time.Duration, serverValidity time.Duration) TLSScenario

Create returns client and server TLS credentials generated during the runtime only for testing.

func (TLSScenario) ClientTLSConfig added in v1.66.0

func (t TLSScenario) ClientTLSConfig() *tls.Config

ClientTLSConfig returns client TLS config.

func (TLSScenario) ServerTLSConfig added in v1.66.0

func (t TLSScenario) ServerTLSConfig() *tls.Config

ServerTLSConfig returns server TLS config.

Jump to

Keyboard shortcuts

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