Class FailoverTimestampClient
- Namespace
- MiPdf.Signatures
- Assembly
- MiPdf.dll
Tries several time-stamp authorities in order and returns the first token obtained.
public sealed class FailoverTimestampClient : ITimestampClient
- Inheritance
-
FailoverTimestampClient
- Implements
- Inherited Members
Constructors
FailoverTimestampClient(params ITimestampClient[])
Creates a failover client that tries the given clients in this order.
public FailoverTimestampClient(params ITimestampClient[] clients)
Parameters
clientsITimestampClient[]
Exceptions
- ArgumentException
No client was given.
FailoverTimestampClient(IEnumerable<ITimestampClient>)
Creates a failover client that tries the given clients in this order.
public FailoverTimestampClient(IEnumerable<ITimestampClient> clients)
Parameters
clientsIEnumerable<ITimestampClient>
Exceptions
- ArgumentException
No client was given.
Properties
LastErrors
Errors of the failed attempts of the last call (empty if the first TSA succeeded).
public IReadOnlyList<string> LastErrors { get; }
Property Value
Methods
FromUrls(IEnumerable<string>, string?, string?)
Creates a failover client for a list of TSA URLs (optionally with the same basic-auth credentials).
public static FailoverTimestampClient FromUrls(IEnumerable<string> urls, string? userName = null, string? password = null)
Parameters
urlsIEnumerable<string>userNamestringpasswordstring
Returns
GetTimestampToken(byte[], HashAlgorithmName)
Returns the token of the first client that succeeds; network, HTTP and cryptographic errors of a client are recorded in LastErrors and the next client is tried.
public byte[] GetTimestampToken(byte[] hash, HashAlgorithmName hashAlgorithm)
Parameters
hashbyte[]hashAlgorithmHashAlgorithmName
Returns
- byte[]
Exceptions
- PdfException
No client returned a token.