Class SignatureTrustPacks
Loads trust anchors for signature validation: certificate files from a directory, and the two public trust programs document viewers rely on, the Adobe Approved Trust List (AATL) and the EU trusted lists (LOTL). Feed the results into TrustedRoots.
public static class SignatureTrustPacks
- Inheritance
-
SignatureTrustPacks
- Inherited Members
Examples
var options = new PdfSignatureValidationOptions { TrustSystemRoots = false };
foreach (var anchor in await SignatureTrustPacks.DownloadAdobeTrustListAsync(cacheDir))
{
options.TrustedRoots.Add(anchor);
}
Remarks
The download helpers fetch on demand and cache the raw lists in a directory you choose; nothing ships inside the package and nothing is fetched unless you call them. Parsing is tolerant by design: certificates are recognized by content, so schema drift in the published lists does not break loading.
Fields
- AdobeTrustListUri
The Adobe Approved Trust List's published security-settings document.
- EuTrustListUri
The EU list of trusted lists (LOTL).
Methods
- DownloadAdobeTrustListAsync(string, CancellationToken)
Downloads the Adobe Approved Trust List, caches the raw document in
cacheDirectory, and returns its certificates. When the cached copy exists it is used without touching the network.
- DownloadEuTrustListAsync(string, CancellationToken)
Downloads the EU list of trusted lists, follows every member list it names, caches the raw documents in
cacheDirectory, and returns the certificates of the listed services. Member lists that fail to download or parse are skipped, so one unavailable state does not lose the rest. Cached copies are used without touching the network.
- LoadFromDirectory(string)
Loads every certificate file in a directory:
.pem,.crt,.cer, and.der, PEM or raw DER. Files that do not parse are skipped.
- ParseAdobeTrustList(byte[])
Parses the Adobe Approved Trust List from its published form: the security-settings PDF carrying the list as an embedded file, or the embedded XML itself.
- ParseEuTrustList(byte[])
Parses one trusted-list XML document (the LOTL or a member list) and returns every certificate it carries.