mock

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type TSAClient

type TSAClient struct {
	Signer       crypto.Signer
	CertChain    []*x509.Certificate
	CertChainPEM string
	Time         time.Time
	Message      []byte
}

TSAClient creates RFC3161 timestamps and implements client.TimestampAuthority. Messages to sign can either be provided in the initializer or through the request. Time can be provided in the initializer, or defaults to time.Now(). All other timestamp parameters are hardcoded.

func (*TSAClient) GetTimestampCertChain

func (c *TSAClient) GetTimestampCertChain(_ *ts.GetTimestampCertChainParams, _ ...ts.ClientOption) (*ts.GetTimestampCertChainOK, error)

func (*TSAClient) GetTimestampResponse

func (c *TSAClient) GetTimestampResponse(params *ts.GetTimestampResponseParams, w io.Writer, _ ...ts.ClientOption) (*ts.GetTimestampResponseCreated, error)

func (*TSAClient) SetTransport

func (c *TSAClient) SetTransport(_ runtime.ClientTransport)

type TSAClientOptions

type TSAClientOptions struct {
	// Time is an optional timestamp. Default is time.Now().
	Time time.Time
	// Message is the pre-hashed message to sign over, typically a raw signature.
	Message []byte
	// Signer is an optional signer created out of band. Client creates one if not set.
	Signer crypto.Signer
}

TSAClientOptions provide customization for the mock TSA client.

Jump to

Keyboard shortcuts

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