pkitest

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

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

func CmpBigInt(x, y *big.Int) bool

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.

Jump to

Keyboard shortcuts

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