testhelper

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Overview

Package testhelper implements utility routines required for writing unit tests. The testhelper should only be used in unit tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ECCertTuple

type ECCertTuple struct {
	Cert       *x509.Certificate
	PrivateKey *ecdsa.PrivateKey
}

func GetECDSACertTupleWithPK

func GetECDSACertTupleWithPK(privKey *ecdsa.PrivateKey, cn string, issuer *ECCertTuple) ECCertTuple

func GetECLeafCertificate

func GetECLeafCertificate() ECCertTuple

GetECLeafCertificate returns leaf certificate signed using EC algorithm

func GetECRootCertificate

func GetECRootCertificate() ECCertTuple

GetECRootCertificate returns root certificate signed using EC algorithm

type RSACertTuple

type RSACertTuple struct {
	Cert       *x509.Certificate
	PrivateKey *rsa.PrivateKey
}

func GetRSACertTupleWithPK

func GetRSACertTupleWithPK(privKey *rsa.PrivateKey, cn string, issuer *RSACertTuple) RSACertTuple

func GetRSALeafCertificate

func GetRSALeafCertificate() RSACertTuple

GetRSALeafCertificate returns leaf certificate signed using RSA algorithm

func GetRSARootCertificate

func GetRSARootCertificate() RSACertTuple

GetRSARootCertificate returns root certificate signed using RSA algorithm

func GetUnsupportedCertificate

func GetUnsupportedCertificate() RSACertTuple

GetUnsupportedCertificate returns certificate signed using RSA algorithm with key size of 1024 bits which is not supported by notary.

Jump to

Keyboard shortcuts

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