tlsutils

package
v1.11.0-cni-plu...-7acfd45 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RSAKeySize int = 2048

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