certs

package
v0.0.0-...-fe75120 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CATYPE_GRPC   = "grpc"
	CATYPE_HTTPS  = "https"
	CATYPE_RPC    = "rpc"
	CATYPE_STAGER = "stage"
)
View Source
const (
	ECCKEY = "ecc"
	RSAKEY = "rsa"
)

Variables

This section is empty.

Functions

func GenerateECCCertificate

func GenerateECCCertificate(
	caType string,
	sans []string,
	isCA bool,
	isClient bool,
	listenerName string,
) ([]byte, []byte, error)

func GenerateRSACertificate

func GenerateRSACertificate(
	caType string,
	sans []string,
	isCA bool,
	isClient bool,
	listenerName string,
) ([]byte, []byte, error)

func GetCA

func GetCA(caType string, listenerName string) (*x509.Certificate, *ecdsa.PrivateKey, error)

func GetCAPEM

func GetCAPEM(caType string, listenerName string) ([]byte, []byte, error)

func GetCertificatePath

func GetCertificatePath(
	caType string,
	isCA bool,
	isClient bool,
	listenerName string,
) (string, string, error)

func GetSANs

func GetSANs(host string, domains []string) ([]string, error)

Get Subject Alternate Names

func HTTPSGenerateCertificates

func HTTPSGenerateCertificates(lis *listener.Listener) error

func RPCGenerateCertificates

func RPCGenerateCertificates(conf *config.ServerConfig) error

func SaveCertificate

func SaveCertificate(caType string, isCA bool, isClient bool, listenerDir string, certPEM []byte, keyPEM []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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