Asynchronous Signature Evidence Acquisition

THPDFSignatureEvidenceTask acquires timestamp tokens, OCSP responses, and CRLs on background workers without coupling HotPDF to a particular HTTP, proxy, or authentication stack

Requests and transport

Each THPDFSignatureEvidenceRequest identifies the evidence kind, URI, content type, request body, correlation identifier, and maximum accepted response size

The transport callback receives one request, a one-based attempt number, and a cancellation token, then returns a response, optional retry delay, diagnostic text, and one of setsSucceeded, setsRetry, setsPermanentFailure, or setsCancelled

The callback may use THTTPClient, Indy, WinHTTP, an enterprise proxy client, or an application-specific offline service

Retry and concurrency

THPDFSignatureEvidenceRetryPolicy.Default performs up to three attempts, starts at 250 milliseconds, doubles delays to a 10-second ceiling, and caps server-requested retry delays at 30 seconds

Worker count is bounded per task, request order remains stable in the result array, retry waits poll cancellation every 50 milliseconds, and transport exceptions enter the retry path with their diagnostic message retained

Results and cancellation

SnapshotResults returns a thread-safe deep copy while acquisition continues, WaitForResults waits for completion, and Cancel marks queued and active work as cancelled through a shared token

Results distinguish success, permanent failure, exhausted retries, cancellation, and oversized responses, and include the attempt count, response bytes, and last diagnostic text

Successful timestamp bytes can feed THPDFCMSSignOptions.GetSignatureTimeStamp, while OCSP and CRL bytes can populate signing revocation attributes, DSS entries, or THPDFCertificateValidationOptions