Documentation ¶
Overview ¶
Package testing provides easy to use methods for creating certificates using a CA, derived, or standalone certificate.
Index ¶
- func CAKeyPairForTesting(hostnames []string) ([]byte, []byte, error)
- func CAKeyPairWithTypeForTesting(keyType string, hostnames []string) ([]byte, []byte, error)
- func DerivedKeyPairForTesting(parentPublicCertificatePEM []byte, parentPrivateKeyPEM []byte, ...) ([]byte, []byte, error)
- func DerivedKeyPairWithTypeForTesting(keyType string, parentPublicCertificatePEM []byte, parentPrivateKeyPEM []byte, ...) ([]byte, []byte, error)
- func KeyPairForTesting(hostnames []string) ([]byte, []byte, error)
- func KeyPairWithTypeForTesting(keyType string, hostnames []string) ([]byte, []byte, error)
- func KeyTypes() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CAKeyPairForTesting ¶
CAKeyPairForTesting creates a CA certificate that can be used as the parent from certificate-private key pairs created from CreateDerivedCertificateAndPrivateKeyForTesting.
func CAKeyPairWithTypeForTesting ¶
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 ¶
KeyPairForTesting is for generating test certificates in unit tests.
func KeyPairWithTypeForTesting ¶
KeyPairWithTypeForTesting is for generating test certificates in unit tests.
Types ¶
This section is empty.