security

package
v0.0.0-...-99d5ca6 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClientTLSConfig

func CreateClientTLSConfig(sslCA, sslKey, sslCert string) (tlsConfig *tls.Config, err error)

CreateClientTLSConfig creates a tlsConfig that is used to connect to the backend server.

func CreateClusterTLSConfig

func CreateClusterTLSConfig(sslCA, sslKey, sslCert string) (tlsConfig *tls.Config, err error)

CreateClusterTLSConfig generates tls's config based on security section of the config. It's used to connect to PD.

func CreateServerTLSConfig

func CreateServerTLSConfig(logger *zap.Logger, ca, key, cert string, rsaKeySize int, workdir string) (tlsConfig *tls.Config, err error)

CreateServerTLSConfig creates a tlsConfig that is used to connect to the client.

func CreateTLSConfigForTest

func CreateTLSConfigForTest() (serverTLSConf *tls.Config, clientTLSConf *tls.Config, err error)

CreateTLSConfigForTest is from https://gist.github.com/shaneutt/5e1995295cff6721c89a71d13a71c251.

Types

This section is empty.

Jump to

Keyboard shortcuts

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