tls

package
v0.0.0-...-7b34d14 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultRsaBits        = 2048
	DefaultValidityPeriod = 10 * 365 * 24 * time.Hour
)

Functions

This section is empty.

Types

type CertType

type CertType string
const (
	ServerCertType CertType = "server"
	ClientCertType CertType = "client"
)

type KeyPair

type KeyPair struct {
	CertPEM []byte
	KeyPEM  []byte
}

func NewSelfSignedCert

func NewSelfSignedCert(commonName string, certType CertType, hosts ...string) (KeyPair, error)

func ToKeyPair

func ToKeyPair(key interface{}, cert []byte) (*KeyPair, error)

Jump to

Keyboard shortcuts

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