PdfLongTermValidationEnricher
OfficeIMO.Pdf
Creates append-only DSS/VRI revisions for cryptographically verified PDF signatures.
Inheritance
- object
- PdfLongTermValidationEnricher
Methods
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[]
- evidence OfficeIMO.Pdf.PdfLongTermValidationEvidence
- cryptographyProvider OfficeIMO.Pdf.IPdfSignatureCryptographyProvider
- readOptions OfficeIMO.Pdf.PdfLoadOptions? = null
public static PdfLongTermValidationEnrichmentResult Enrich(Stream input, PdfLongTermValidationEvidence evidence, IPdfSignatureCryptographyProvider cryptographyProvider, PdfLoadOptions? readOptions = null) #Enriches a readable PDF stream.
Parameters
- input System.IO.Stream
- evidence OfficeIMO.Pdf.PdfLongTermValidationEvidence
- cryptographyProvider OfficeIMO.Pdf.IPdfSignatureCryptographyProvider
- readOptions OfficeIMO.Pdf.PdfLoadOptions? = null
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
- outputPath string
- evidence OfficeIMO.Pdf.PdfLongTermValidationEvidence
- cryptographyProvider OfficeIMO.Pdf.IPdfSignatureCryptographyProvider
- readOptions OfficeIMO.Pdf.PdfLoadOptions? = null
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[]
- evidence OfficeIMO.Pdf.PdfLongTermValidationEvidence
- cryptographyProvider OfficeIMO.Pdf.IPdfSignatureCryptographyProvider
- fetchEvidence System.Func<OfficeIMO.Pdf.PdfSignatureValidationResult, System.Threading.CancellationToken, System.Threading.Tasks.Task<OfficeIMO.Pdf.PdfLongTermValidationEvidence>>? = null
- readOptions OfficeIMO.Pdf.PdfLoadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<PdfLongTermValidationEnrichmentResult>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[]
- signatureObjectNumber int
- cryptographyProvider OfficeIMO.Pdf.PdfCmsSignatureCryptographyProvider
- fetcher OfficeIMO.Security.ICertificateRevocationFetcher
- readOptions OfficeIMO.Pdf.PdfLoadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<PdfLongTermValidationEnrichmentResult>