testutils

package
v0.0.0-...-34c7675 Latest Latest
Warning

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

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

Documentation

Overview

Package testutils contains helper functions for advancedtls.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertStore

type CertStore struct {
	// ClientCert1 is the certificate sent by client to prove its identity.
	// It is trusted by ServerTrust1.
	ClientCert1 tls.Certificate
	// ClientCert2 is the certificate sent by client to prove its identity.
	// It is trusted by ServerTrust2.
	ClientCert2 tls.Certificate
	// ClientCertForCRL is the certificate sent by client to prove its identity.
	// It is trusted by ServerTrust3. Used in CRL tests
	ClientCertForCRL tls.Certificate
	// ServerCert1 is the certificate sent by server to prove its identity.
	// It is trusted by ClientTrust1.
	ServerCert1 tls.Certificate
	// ServerCert2 is the certificate sent by server to prove its identity.
	// It is trusted by ClientTrust2.
	ServerCert2 tls.Certificate
	// ServerCertForCRL is a revoked certificate
	// (this info is stored in provider_crl_server_revoked.pem).
	ServerCertForCRL tls.Certificate
	// ServerPeer3 is the certificate sent by server to prove its identity.
	ServerPeer3 tls.Certificate
	// ServerPeerLocalhost1 is the certificate sent by server to prove its
	// identity. It has "localhost" as its common name, and is trusted by
	// ClientTrust1.
	ServerPeerLocalhost1 tls.Certificate
	// ClientTrust1 is the root certificate used on the client side.
	ClientTrust1 *x509.CertPool
	// ClientTrust2 is the root certificate used on the client side.
	ClientTrust2 *x509.CertPool
	// ClientTrust3 is the root certificate used on the client side.
	ClientTrust3 *x509.CertPool
	// ServerTrust1 is the root certificate used on the server side.
	ServerTrust1 *x509.CertPool
	// ServerTrust2 is the root certificate used on the server side.
	ServerTrust2 *x509.CertPool
	// ServerTrust2 is the root certificate used on the server side.
	ServerTrust3 *x509.CertPool
}

CertStore contains all the certificates used in the integration tests.

func (*CertStore) LoadCerts

func (cs *CertStore) LoadCerts() error

LoadCerts function is used to load test certificates at the beginning of each integration test.

Jump to

Keyboard shortcuts

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