tlsutils

package
v3.3.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CertificateVerifier

func CertificateVerifier(logCxt *log.Entry, roots *x509.CertPool, requiredCN, requiredURISAN string) func([][]byte, [][]*x509.Certificate) error

Common code for verifying whether a peer certificate has a required Common Name and/or a required URI SAN.

func MakeCACert

func MakeCACert(name string) (*x509.Certificate, *rsa.PrivateKey)

func MakePeerCert

func MakePeerCert(cn, uriSAN string, extKeyUsage x509.ExtKeyUsage, caCert *x509.Certificate, caKey *rsa.PrivateKey) ([]byte, *rsa.PrivateKey)

func PanicIfErr

func PanicIfErr(err error)

The following certificate generators panic if they hit any error. This is a bit poor, but OK in practice because they are only used by test code.

func WriteCert

func WriteCert(data []byte, fileName string)

func WriteKey

func WriteKey(key *rsa.PrivateKey, fileName string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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