Help us shape the future of Go! Take the 2026 Go Developer Survey

mtls

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Listener = "listener"
	Client   = "client"
)

Functions

func GetGrpcOptions

func GetGrpcOptions(caCertificate []byte, certificate []byte, privateKey []byte, servername string) ([]grpc.DialOption, error)

func GetListeners

func GetListeners() ([]string, error)

func VerifyCertificate

func VerifyCertificate(caCertificate []byte, rawCerts [][]byte) error

VerifyCertificate - Verify a certificate

Types

type ClientConfig

type ClientConfig struct {
	Operator      string `json:"operator" yaml:"operator"` // This value is actually ignored for the most part (cert CN is used instead)
	Host          string `json:"host" yaml:"host"`
	Port          int    `json:"port" yaml:"port"`
	Type          string `json:"type" yaml:"type"`
	CACertificate string `json:"ca" yaml:"ca"`
	PrivateKey    string `json:"key" yaml:"key"`
	Certificate   string `json:"cert" yaml:"cert"`
}

func ReadConfig

func ReadConfig(confFilePath string) (*ClientConfig, error)

ReadConfig - Load config into struct

func (*ClientConfig) Address

func (c *ClientConfig) Address() string

Jump to

Keyboard shortcuts

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