tlstest

package module
v0.0.0-...-6888154 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

README

tlstest

tlstest is a library used for helping go test code when you need to use test TLS functionality.

NOTE: tlstest is designed only to be used in testing code. Do not run in production - it has no guarantied security

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CertTemplate

func CertTemplate() (*x509.Certificate, error)

CertTemplate returns a new generic template for an x509.Certificate which is set to use SHA256 and expire after an hour

func CreateRootCertKeyPEMPair

func CreateRootCertKeyPEMPair() ([]byte, []byte, error)

func CreateRootTLSCert

func CreateRootTLSCert() (*tls.Certificate, error)

func CreateServerCertKeyPEMPairWithRootCert

func CreateServerCertKeyPEMPairWithRootCert() (rootCertPEM []byte, servCertPEM []byte, servKeyPEM []byte, err error)

func CreateServerClientTLSConfig

func CreateServerClientTLSConfig() (serverConfig *tls.Config, clientConfig *tls.Config, err error)

func NewKey

func NewKey() (*rsa.PrivateKey, error)

NewKey returns a new rsa private key

Types

This section is empty.

Jump to

Keyboard shortcuts

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