ca

package
v0.0.0-...-2db71d7 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTLSConfig

func GetTLSConfig(certPemPath, certKeyPath string, caPaths []string) (*tls.Config, error)

func NewTLSListener

func NewTLSListener(inner net.Listener, config *tls.Config) net.Listener

Types

type CAClient

type CAClient struct {
	ServerName string
	CaPaths    []string
	CaCerts    []string
	CertFile   string
	KeyFile    string
	CertBytes  []byte
	KeyBytes   []byte
	Logger     log.LoggerInterface
}

func (*CAClient) GetCredentialsByCA

func (c *CAClient) GetCredentialsByCA() (*credentials.TransportCredentials, error)

type CAServer

type CAServer struct {
	CaPaths  []string
	CaCerts  []string
	CertFile string
	KeyFile  string
	Logger   log.LoggerInterface
}

func (*CAServer) GetCredentialsByCA

func (s *CAServer) GetCredentialsByCA(checkClientAuth bool) (*credentials.TransportCredentials, error)

Jump to

Keyboard shortcuts

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