Class PdfDocumentSecurityStore
- Namespace
- PdfSharp.Pdf.Signatures
- Assembly
- PdfSharp.dll
The document security store (DSS, ISO 32000-2 12.8.4.3; ETSI EN 319 142-1 5.4.2): validation data for the document's signatures — certificates, OCSP responses and CRLs — kept in the document so the signatures can be validated after their certificates expire or are revoked. With it, PAdES B-T signatures become B-LT; a document time-stamp after it makes them B-LTA.
public static class PdfDocumentSecurityStore
- Inheritance
-
objectPdfDocumentSecurityStore
Remarks
Open a signed document with Append, add the data and save: the update leaves the signed bytes as they are. Adding validation data is permitted at every certification level.
Methods
- Add(PdfDocument, IEnumerable<byte[]>?, IEnumerable<byte[]>?, IEnumerable<byte[]>?)
Adds validation data to the document's DSS, creating the DSS if the document has none. Each item is DER-encoded: an X.509 certificate, an OCSP response (RFC 6960 OCSPResponse) or a CRL (RFC 5280 CertificateList). Items the DSS already holds are not added again.
- AddValidationDataAsync(PdfDocument, PdfValidationDataOptions?, CancellationToken)
Collects validation data for the document's signatures and document time-stamps and adds it to the DSS (PAdES B-LT, ETSI EN 319 142-1): the certificates of their chains, and for each certificate below a root an OCSP response (RFC 6960) from the responder its certificate names, or else a CRL (RFC 5280) from each of its distribution points. The certificates come from the signatures, their signature time-stamps and ExtraCertificates. Open the document in Append mode and save it after. The responses are not verified: their signatures and the certificates' status are for the validator to judge. The addresses asked come from the certificates; see PdfValidationDataOptions.