testing

package
v0.0.0-...-b563d55 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package testing provides easy to use methods for creating certificates using a CA, derived, or standalone certificate.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CAKeyPairForTesting

func CAKeyPairForTesting(hostnames []string) ([]byte, []byte, error)

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

func CAKeyPairWithTypeForTesting

func CAKeyPairWithTypeForTesting(keyType string, hostnames []string) ([]byte, []byte, error)

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

func DerivedKeyPairForTesting

func DerivedKeyPairForTesting(parentPublicCertificatePEM []byte, parentPrivateKeyPEM []byte, hostnames []string) ([]byte, []byte, error)

DerivedKeyPairForTesting creates a certificate rooted in the parent certificate from KeyPairForTesting().

func DerivedKeyPairWithTypeForTesting

func DerivedKeyPairWithTypeForTesting(keyType string, parentPublicCertificatePEM []byte, parentPrivateKeyPEM []byte, hostnames []string) ([]byte, []byte, error)

DerivedKeyPairWithTypeForTesting creates a certificate rooted in the parent certificate from KeyPairWithTypeForTesting().

func KeyPairForTesting

func KeyPairForTesting(hostnames []string) ([]byte, []byte, error)

KeyPairForTesting is for generating test certificates in unit tests.

func KeyPairWithTypeForTesting

func KeyPairWithTypeForTesting(keyType string, hostnames []string) ([]byte, []byte, error)

KeyPairWithTypeForTesting is for generating test certificates in unit tests.

func KeyTypes

func KeyTypes() []string

KeyTypes returns a list of all the acceptable key types that can be generated.

Types

This section is empty.

Jump to

Keyboard shortcuts

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