testing

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package testing provides easy to use methods for creating certificates using a Root CA or individual.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCertificateAndPrivateKeyForTesting

func CreateCertificateAndPrivateKeyForTesting(hostnameList []string) ([]byte, []byte, error)

CreateCertificateAndPrivateKeyForTesting is for generating test certificates in unit tests.

func CreateDerivedCertificateAndPrivateKeyForTesting

func CreateDerivedCertificateAndPrivateKeyForTesting(rootPublicCertificateData []byte, rootPrivateKeyData []byte, hostnameList []string) ([]byte, []byte, error)

CreateDerivedCertificateAndPrivateKeyForTesting creates a certificate rooted in the Root certificate from CreateRootCertificateAndPrivateKeyForTesting().

func CreateRootCertificateAndPrivateKeyForTesting

func CreateRootCertificateAndPrivateKeyForTesting(hostnameList []string) ([]byte, []byte, error)

CreateRootCertificateAndPrivateKeyForTesting creates a Root CA certificate that can be used as the parent from certificate-private key pairs created from CreateDerivedCertificateAndPrivateKeyForTesting.

Types

This section is empty.

Jump to

Keyboard shortcuts

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