tls

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BASE64_ENCODING_PATTERN    = "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$"
	PEM_CERTIFICATE_BLOCK_TYPE = "CERTIFICATE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateAuthentication

type CertificateAuthentication struct {
	// contains filtered or unexported fields
}

func (*CertificateAuthentication) GetClientCertificate

func (ca *CertificateAuthentication) GetClientCertificate() string

func (*CertificateAuthentication) GetTrustedCertificates

func (ca *CertificateAuthentication) GetTrustedCertificates() string

func (*CertificateAuthentication) TrustAnyCertificate

func (ca *CertificateAuthentication) TrustAnyCertificate() bool

func (*CertificateAuthentication) UseClientCertificate

func (ca *CertificateAuthentication) UseClientCertificate() bool

func (*CertificateAuthentication) UseTrustedCertificates

func (ca *CertificateAuthentication) UseTrustedCertificates() bool

type CertificateAuthenticationOption

type CertificateAuthenticationOption func(*CertificateAuthentication)

func TrustAnyCertificate

func TrustAnyCertificate(trustAnyCert bool) CertificateAuthenticationOption

func TrustCertificates

func TrustCertificates(trustedCerts string) CertificateAuthenticationOption

func WithClientCertificate

func WithClientCertificate(clientCert string) CertificateAuthenticationOption

type TLSConfigurationProvider

type TLSConfigurationProvider struct {
	*CertificateAuthentication
	// contains filtered or unexported fields
}

func NewTLSConfigurationProvider

func NewTLSConfigurationProvider(certAuth *CertificateAuthentication) *TLSConfigurationProvider

func (*TLSConfigurationProvider) CreateTransport

func (p *TLSConfigurationProvider) CreateTransport() (http.RoundTripper, error)

Jump to

Keyboard shortcuts

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