Documentation ¶
Index ¶
- func NewTSAClient(o TSAClientOptions) (*client.TimestampAuthority, error)
- type TSAClient
- func (c *TSAClient) GetTimestampCertChain(_ *ts.GetTimestampCertChainParams, _ ...ts.ClientOption) (*ts.GetTimestampCertChainOK, error)
- func (c *TSAClient) GetTimestampResponse(params *ts.GetTimestampResponseParams, w io.Writer, _ ...ts.ClientOption) (*ts.GetTimestampResponseCreated, error)
- func (c *TSAClient) SetTransport(transport runtime.ClientTransport)
- type TSAClientOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTSAClient ¶
func NewTSAClient(o TSAClientOptions) (*client.TimestampAuthority, error)
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(transport 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.
Click to show internal directories.
Click to hide internal directories.