spiffetest

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCACertificate

func CreateCACertificate(tb testing.TB, parent *x509.Certificate, parentKey crypto.Signer) (*x509.Certificate, crypto.Signer)

func CreateCertificate

func CreateCertificate(tb testing.TB, tmpl, parent *x509.Certificate, pub, priv interface{}) *x509.Certificate

func CreateX509SVID

func CreateX509SVID(tb testing.TB, parent *x509.Certificate, parentKey crypto.Signer, spiffeID string) (*x509.Certificate, crypto.Signer)

func NewEC256Key

func NewEC256Key(tb testing.TB) *ecdsa.PrivateKey

NewEC256Key returns an ECDSA key over the P256 curve

func NewSerial

func NewSerial(tb testing.TB) *big.Int

Types

type CA

type CA struct {
	// contains filtered or unexported fields
}

func NewCA

func NewCA(tb testing.TB) *CA

func (*CA) CreateCA

func (ca *CA) CreateCA() *CA

func (*CA) CreateX509SVID

func (ca *CA) CreateX509SVID(spiffeID string) ([]*x509.Certificate, crypto.Signer)

func (*CA) Roots

func (ca *CA) Roots() []*x509.Certificate

func (*CA) RootsPool

func (ca *CA) RootsPool() *x509.CertPool

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(tb testing.TB) *Logger

func (*Logger) Debugf

func (l *Logger) Debugf(format string, args ...interface{})

func (*Logger) Errorf

func (l *Logger) Errorf(format string, args ...interface{})

func (*Logger) Infof

func (l *Logger) Infof(format string, args ...interface{})

func (*Logger) Warnf

func (l *Logger) Warnf(format string, args ...interface{})

type WorkloadAPI

type WorkloadAPI struct {
	// contains filtered or unexported fields
}

func NewWorkloadAPI

func NewWorkloadAPI(tb testing.TB, resp *X509SVIDResponse) *WorkloadAPI

func (*WorkloadAPI) Addr

func (w *WorkloadAPI) Addr() string

func (*WorkloadAPI) SetX509SVIDResponse

func (w *WorkloadAPI) SetX509SVIDResponse(r *X509SVIDResponse)

func (*WorkloadAPI) Stop

func (w *WorkloadAPI) Stop()

type X509SVID

type X509SVID struct {
	CertChain []*x509.Certificate
	Key       crypto.Signer
}

type X509SVIDResponse

type X509SVIDResponse struct {
	SVIDs            []X509SVID
	Bundle           []*x509.Certificate
	FederatedBundles map[string][]*x509.Certificate
}

func (*X509SVIDResponse) ToProto

Jump to

Keyboard shortcuts

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