Skip to content

PdfTrustedList class

View as Markdown

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 PdfTrustedList

Inheritance

object ← PdfTrustedList

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.

The largest list read, in bytes. National lists are a few megabytes at most.

public const int MaxLength = 33554432

int

Whether this is a list of lists, such as the EU list of trusted lists.

public bool IsListOfLists { get; }

bool

When the list was issued.

public DateTimeOffset IssueDate { get; }

DateTimeOffset

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; }

DateTimeOffset?

The scheme operator’s name, in English when the list gives it.

public string OperatorName { get; }

string

The pointers to other lists.

public IReadOnlyList<PdfTrustedListPointer> Pointers { get; }

IReadOnlyList<PdfTrustedListPointer>

The trust service providers.

public IReadOnlyList<PdfTrustServiceProvider> Providers { get; }

IReadOnlyList<PdfTrustServiceProvider>

The TSLSequenceNumber, which grows with each issue.

public int SequenceNumber { get; }

int

Every service of every provider.

public IEnumerable<PdfTrustService> Services { get; }

IEnumerable<PdfTrustService>

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; }

PdfCheckStatus

Why the signature did not pass, or null.

public string? SignatureProblem { get; }

string?

The supplied certificate the signature verified with, or null.

public X509Certificate2? SignerCertificate { get; }

X509Certificate2?

The scheme territory, such as BE, or EU for the list of lists.

public string Territory { get; }

string

The TSLType URI, such as http://uri.etsi.org/TrstSvc/TrustedList/TSLType/EUgeneric.

public string Type { get; }

string

The TSLVersionIdentifier, 5 or 6 for the current specification.

public int Version { get; }

int

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)

xml byte[]

The list’s XML.

signingCertificates IEnumerable<X509Certificate2>

The certificates that may sign the list.

PdfTrustedList

FormatException

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)

xml Stream

The list’s XML; read to its end, at most MaxLength bytes.

signingCertificates IEnumerable<X509Certificate2>

The certificates that may sign the list.

PdfTrustedList

FormatException

The stream does not hold a well formed trusted list, or holds more than MaxLength bytes.

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)

xml byte[]

The list’s XML.

listOfLists PdfTrustedList

The list of lists that points to it.

PdfTrustedList

FormatException

The bytes are not a well formed trusted list, or larger than MaxLength.

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)

xml Stream

The list’s XML; read to its end, at most MaxLength bytes.

listOfLists PdfTrustedList

The list of lists that points to it.

PdfTrustedList

FormatException

The stream does not hold a well formed trusted list, or holds more than MaxLength bytes.