Class
Rfc3161TimestampClient
OfficeIMO.Security
RFC 3161 client with caller-owned HTTP transport, endpoint, credentials and trust policy.
Inheritance
- object
- Rfc3161TimestampClient
Constructors
public Rfc3161TimestampClient(Func<byte[], CancellationToken, Task<byte[]>> transport, CertificateValidationOptions? certificateValidation = null, int maximumResponseBytes = 1048576) #Creates a client. The transport must POST the request as application/timestamp-query and return the application/timestamp-reply body, enforcing an HTTP response-size limit before buffering it. The client checks the response again and verifies nonce, imprint, signature, TSA profile and trust.
Parameters
- transport System.Func<byte[], System.Threading.CancellationToken, System.Threading.Tasks.Task<byte[]>>
- certificateValidation OfficeIMO.Security.CertificateValidationOptions? = null
- maximumResponseBytes int = 1048576
Methods
public byte[] GetTimestamp(byte[] timestampedData) #Synchronous adapter for CMS signing's timestamp callback.
Parameters
- timestampedData byte[]
Returns
byte[]public async Task<byte[]> GetTimestampAsync(byte[] timestampedData, CancellationToken cancellationToken = default) #Requests a SHA-256 timestamp over the supplied bytes, returning a verified DER token.
Parameters
- timestampedData byte[]
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<byte[]>