Documentation ¶
Overview ¶
Package pkitest provides a few utility functions shared across tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CmpBigInt ¶
CmpBigInt implements a functions that compares big.Ints and is compatible with cmp.Comparer.
func EncodePrivateKey ¶
func EncodePrivateKey(t *testing.T, key *ecdsa.PrivateKey) []byte
EncodePrivateKey is a test heper that x509 encodes the provided ECDSA private key.
func NewPrivateKey ¶
func NewPrivateKey(t *testing.T) *ecdsa.PrivateKey
NewPrivateKey is a test helper that creates a new ECDSA private key.
func PemEncodeCertificate ¶
func PemEncodeCertificate(t *testing.T, cert x509.Certificate, key *ecdsa.PrivateKey) []byte
PemEncodeCertificate is a test helper that encodes the provided certificate with the public key derived from the ECDSA private key and encodes into PEM.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.