package
0.2.0
Repository: https://github.com/github/smimesign.git
Documentation: pkg.go.dev

# Functions

GenerateNonce generates a new nonce for this TSR.
NewMessageImprint creates a new MessageImprint, digesting all bytes from the provided reader using the specified hash.
ParseInfo parses an Info out of a CMS EncapsulatedContentInfo.
ParseResponse parses a BER encoded TimeStampResp.

# Variables

DefaultHTTPClient is the HTTP client used for fetching timestamps.

# Structs

Accuracy ::= SEQUENCE { seconds INTEGER OPTIONAL, millis [0] INTEGER (1..999) OPTIONAL, micros [1] INTEGER (1..999) OPTIONAL }.
Info is a TSTInfo TSTInfo ::= SEQUENCE { version INTEGER { v1(1) }, policy TSAPolicyId, messageImprint MessageImprint, -- MUST have the same value as the similar field in -- TimeStampReq serialNumber INTEGER, -- Time-Stamping users MUST be ready to accommodate integers -- up to 160 bits.
MessageImprint ::= SEQUENCE { hashAlgorithm AlgorithmIdentifier, hashedMessage OCTET STRING }.
PKIStatusInfo ::= SEQUENCE { status PKIStatus, statusString PKIFreeText OPTIONAL, failInfo PKIFailureInfo OPTIONAL } PKIStatus ::= INTEGER { granted (0), -- when the PKIStatus contains the value zero a TimeStampToken, as requested, is present.
Request is a TimeStampReq TimeStampReq ::= SEQUENCE { version INTEGER { v1(1) }, messageImprint MessageImprint, --a hash algorithm OID and the hash value of the data to be --time-stamped reqPolicy TSAPolicyId OPTIONAL, nonce INTEGER OPTIONAL, certReq BOOLEAN DEFAULT FALSE, extensions [0] IMPLICIT Extensions OPTIONAL }.
Response is a TimeStampResp TimeStampResp ::= SEQUENCE { status PKIStatusInfo, timeStampToken TimeStampToken OPTIONAL } TimeStampToken ::= ContentInfo.

# Interfaces

HTTPClient is an interface for *http.Client, allowing callers to customize HTTP behavior.

# Type aliases

PKIFreeText ::= SEQUENCE SIZE (1..MAX) OF UTF8String.