Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

PdfLongTermValidationEnricher

OfficeIMO.Pdf

Namespace
OfficeIMO.Pdf
Assembly
OfficeIMO.Pdf
Source revision
be6c300e4ab1 with working tree changes
Modifiers
static

Creates append-only DSS/VRI revisions for cryptographically verified PDF signatures.

Inheritance

  • object
  • PdfLongTermValidationEnricher

Methods

Enrich 3 overloads
public static PdfLongTermValidationEnrichmentResult Enrich(byte[] pdf, PdfLongTermValidationEvidence evidence, IPdfSignatureCryptographyProvider cryptographyProvider, PdfLoadOptions? readOptions = null) #

Appends DER-encoded validation material for one signature without changing any existing PDF byte. Signature math and the signed-content digest must first validate through cryptographyProvider.

Parameters

pdf byte[] required
evidence OfficeIMO.Pdf.PdfLongTermValidationEvidence required
cryptographyProvider OfficeIMO.Pdf.IPdfSignatureCryptographyProvider required
readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional
public static PdfLongTermValidationEnrichmentResult Enrich(Stream input, PdfLongTermValidationEvidence evidence, IPdfSignatureCryptographyProvider cryptographyProvider, PdfLoadOptions? readOptions = null) #

Enriches a readable PDF stream.

Parameters

input System.IO.Stream required
evidence OfficeIMO.Pdf.PdfLongTermValidationEvidence required
cryptographyProvider OfficeIMO.Pdf.IPdfSignatureCryptographyProvider required
readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional
public static PdfLongTermValidationEnrichmentResult Enrich(string inputPath, string outputPath, PdfLongTermValidationEvidence evidence, IPdfSignatureCryptographyProvider cryptographyProvider, PdfLoadOptions? readOptions = null) #

Enriches a PDF file and writes the verified append-only result.

Parameters

inputPath string required
outputPath string required
evidence OfficeIMO.Pdf.PdfLongTermValidationEvidence required
cryptographyProvider OfficeIMO.Pdf.IPdfSignatureCryptographyProvider required
readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional
public static async Task<PdfLongTermValidationEnrichmentResult> EnrichAsync(byte[] pdf, PdfLongTermValidationEvidence evidence, IPdfSignatureCryptographyProvider cryptographyProvider, Func<PdfSignatureValidationResult, CancellationToken, Task<PdfLongTermValidationEvidence>>? fetchEvidence = null, PdfLoadOptions? readOptions = null, CancellationToken cancellationToken = default) #

Resolves additional validation material using a caller-owned fetcher and appends it together with supplied evidence. Fetching is opt-in; endpoint selection, HTTP transport, validation and freshness belong to the caller. Embedding evidence does not by itself establish a complete trusted PAdES B-LT validation path.

Parameters

pdf byte[] required
evidence OfficeIMO.Pdf.PdfLongTermValidationEvidence required
cryptographyProvider OfficeIMO.Pdf.IPdfSignatureCryptographyProvider required
fetchEvidence System.Func<OfficeIMO.Pdf.PdfSignatureValidationResult, System.Threading.CancellationToken, System.Threading.Tasks.Task<OfficeIMO.Pdf.PdfLongTermValidationEvidence>>? = null optional
readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public static async Task<PdfLongTermValidationEnrichmentResult> FetchAndEnrichAsync(byte[] pdf, int signatureObjectNumber, PdfCmsSignatureCryptographyProvider cryptographyProvider, ICertificateRevocationFetcher fetcher, PdfLoadOptions? readOptions = null, CancellationToken cancellationToken = default) #

Fetches OCSP responses or CRLs for the signer and signature time-stamp authority paths of one signature and appends them, with the certificates of those paths, as a DSS/VRI revision for PAdES B-LT. Pass a document time-stamp's object number to gather data for its authority before adding the next time-stamp. Validating the result reports the level actually reached; fetch problems are in PdfLongTermValidationEnrichmentResult.FetchFindings.

Parameters

pdf byte[] required
signatureObjectNumber int required
cryptographyProvider OfficeIMO.Pdf.PdfCmsSignatureCryptographyProvider required
fetcher OfficeIMO.Security.ICertificateRevocationFetcher required
readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional