istio: istio.io/istio/security/pkg/pki/ca/mock Index | Files

package mock

import "istio.io/istio/security/pkg/pki/ca/mock"

Index

Package Files

fakeca.go

type FakeCA Uses

type FakeCA struct {
    SignedCert    []byte
    SignErr       *caerror.Error
    KeyCertBundle util.KeyCertBundle
    ReceivedIDs   []string
}

FakeCA is a mock of CertificateAuthority.

func (*FakeCA) GetCAKeyCertBundle Uses

func (ca *FakeCA) GetCAKeyCertBundle() util.KeyCertBundle

GetCAKeyCertBundle returns KeyCertBundle if KeyCertBundle is not nil, otherwise, it returns an empty FakeKeyCertBundle.

func (*FakeCA) Sign Uses

func (ca *FakeCA) Sign(csr []byte, identities []string, lifetime time.Duration, forCA bool) ([]byte, error)

Sign returns the SignErr if SignErr is not nil, otherwise, it returns SignedCert.

func (*FakeCA) SignWithCertChain Uses

func (ca *FakeCA) SignWithCertChain(csr []byte, identities []string, lifetime time.Duration, forCA bool) ([]byte, error)

SignWithCertChain returns the SignErr if SignErr is not nil, otherwise, it returns SignedCert and the cert chain.

Package mock imports 4 packages (graph). Updated 2019-10-03. Refresh now. Tools for package owners.