package testutil

import "github.com/docker/libtrust/testutil"

Index

Functions

func GenerateIntermediate

func GenerateIntermediate(key crypto.PublicKey, parentKey crypto.PrivateKey, parent *x509.Certificate) (*x509.Certificate, error)

GenerateIntermediate generates an intermediate certificate for testing using the parent certificate (likely a CA) and the provided keys.

func GenerateTrustCA

func GenerateTrustCA(pub crypto.PublicKey, priv crypto.PrivateKey) (*x509.Certificate, error)

GenerateTrustCA generates a new certificate authority for testing.

func GenerateTrustCert

func GenerateTrustCert(key crypto.PublicKey, parentKey crypto.PrivateKey, parent *x509.Certificate) (*x509.Certificate, error)

GenerateTrustCert generates a new trust certificate for testing. Unlike the intermediate certificates, this certificate should be used for signature only, not creating certificates.

Source Files

certificates.go

Version
v0.0.0-20160708172513-aabc10ec26b7 (latest)
Published
Jul 8, 2016
Platform
linux/amd64
Imports
6 packages
Last checked
1 month ago

Tools for package owners.