PdfTrustedList class
Namespace: PdfNetStack.Signing
Assembly: PdfNetStack.dll
Package: PdfNetStack
A trusted list of ETSI TS 119 612: the EU list of trusted lists or a national list, read from XML the application supplies, with its signature checked against certificates the application supplies. The library never downloads a list.
public sealed class PdfTrustedListInheritance
Remarks
Section titled “Remarks”The XML is read with DTDs prohibited, no external resolution, at most MaxLength bytes and 64 levels of nesting. The signature is checked as XMLDSig with the rules of ETSI TS 119 612 (an enveloped signature on the whole list); see Signature. Pass the lists to TrustedLists to confirm qualified status.
Fields
Section titled “Fields”MaxLength
Section titled “ MaxLength”The largest list read, in bytes. National lists are a few megabytes at most.
public const int MaxLength = 33554432Field Value
Section titled “Field Value”Properties
Section titled “Properties”IsListOfLists
Section titled “ IsListOfLists”Whether this is a list of lists, such as the EU list of trusted lists.
public bool IsListOfLists { get; }Property Value
Section titled “Property Value”IssueDate
Section titled “ IssueDate”When the list was issued.
public DateTimeOffset IssueDate { get; }Property Value
Section titled “Property Value”NextUpdate
Section titled “ NextUpdate”When the next list is due at the latest; null for a closed list. A list past this time is expired and not used.
public DateTimeOffset? NextUpdate { get; }Property Value
Section titled “Property Value”OperatorName
Section titled “ OperatorName”The scheme operator’s name, in English when the list gives it.
public string OperatorName { get; }Property Value
Section titled “Property Value”Pointers
Section titled “ Pointers”The pointers to other lists.
public IReadOnlyList<PdfTrustedListPointer> Pointers { get; }Property Value
Section titled “Property Value”IReadOnlyList<PdfTrustedListPointer>
Providers
Section titled “ Providers”The trust service providers.
public IReadOnlyList<PdfTrustServiceProvider> Providers { get; }Property Value
Section titled “Property Value”IReadOnlyList<PdfTrustServiceProvider>
SequenceNumber
Section titled “ SequenceNumber”The TSLSequenceNumber, which grows with each issue.
public int SequenceNumber { get; }Property Value
Section titled “Property Value”Services
Section titled “ Services”Every service of every provider.
public IEnumerable<PdfTrustService> Services { get; }Property Value
Section titled “Property Value”Signature
Section titled “ Signature”Passed when the list’s XML signature verifies with one of the certificates supplied for it and was made within that certificate’s validity (at the signing time of the signed XAdES properties, or else at the list’s issue date); Failed otherwise; NotChecked when no certificate was supplied. Only a list whose signature passed is used for validation.
public PdfCheckStatus Signature { get; }Property Value
Section titled “Property Value”SignatureProblem
Section titled “ SignatureProblem”Why the signature did not pass, or null.
public string? SignatureProblem { get; }Property Value
Section titled “Property Value”SignerCertificate
Section titled “ SignerCertificate”The supplied certificate the signature verified with, or null.
public X509Certificate2? SignerCertificate { get; }Property Value
Section titled “Property Value”Territory
Section titled “ Territory”The scheme territory, such as BE, or EU for the list of lists.
public string Territory { get; }Property Value
Section titled “Property Value”The TSLType URI, such as http://uri.etsi.org/TrstSvc/TrustedList/TSLType/EUgeneric.
public string Type { get; }Property Value
Section titled “Property Value”Version
Section titled “ Version”The TSLVersionIdentifier, 5 or 6 for the current specification.
public int Version { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Load(byte[], IEnumerable<X509Certificate2>)
Section titled “ Load(byte[], IEnumerable<X509Certificate2>)”Reads a list and checks its signature against the certificates published for it, such as those the Official Journal gives for the EU list of trusted lists.
public static PdfTrustedList Load(byte[] xml, IEnumerable<X509Certificate2> signingCertificates)Parameters
Section titled “Parameters”xml byte[]
The list’s XML.
signingCertificates IEnumerable<X509Certificate2>
The certificates that may sign the list.
Returns
Section titled “Returns”Exceptions
Section titled “Exceptions”The bytes are not a well formed trusted list, or larger than MaxLength.
Load(Stream, IEnumerable<X509Certificate2>)
Section titled “ Load(Stream, IEnumerable<X509Certificate2>)”Reads a list from a stream and checks its signature against the certificates published for it.
public static PdfTrustedList Load(Stream xml, IEnumerable<X509Certificate2> signingCertificates)Parameters
Section titled “Parameters”xml Stream
The list’s XML; read to its end, at most MaxLength bytes.
signingCertificates IEnumerable<X509Certificate2>
The certificates that may sign the list.
Returns
Section titled “Returns”Exceptions
Section titled “Exceptions”The stream does not hold a well formed trusted list, or holds more than MaxLength bytes.
Load(byte[], PdfTrustedList)
Section titled “ Load(byte[], PdfTrustedList)”Reads a list a list of lists points to, such as a national list from the EU list of trusted lists, and checks its signature against the certificates the pointers for its territory and type give. The list of lists must itself have passed its signature check.
public static PdfTrustedList Load(byte[] xml, PdfTrustedList listOfLists)Parameters
Section titled “Parameters”xml byte[]
The list’s XML.
listOfLists PdfTrustedList
The list of lists that points to it.
Returns
Section titled “Returns”Exceptions
Section titled “Exceptions”The bytes are not a well formed trusted list, or larger than MaxLength.
Load(Stream, PdfTrustedList)
Section titled “ Load(Stream, PdfTrustedList)”Reads a list from a stream and checks its signature against the pointers of a list of lists.
public static PdfTrustedList Load(Stream xml, PdfTrustedList listOfLists)Parameters
Section titled “Parameters”xml Stream
The list’s XML; read to its end, at most MaxLength bytes.
listOfLists PdfTrustedList
The list of lists that points to it.
Returns
Section titled “Returns”Exceptions
Section titled “Exceptions”The stream does not hold a well formed trusted list, or holds more than MaxLength bytes.