# PdfTrustedList class

> 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...

Namespace: [PdfNetStack.Signing](https://www.jadev-corp.com/api/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.

```csharp
public sealed class PdfTrustedList
```

**Inheritance**

[object](https://learn.microsoft.com/dotnet/api/system.object) ← 
[PdfTrustedList](https://www.jadev-corp.com/api/pdfnetstack-signing/pdftrustedlist/)

## Remarks

The XML is read with DTDs prohibited, no external resolution, at most [MaxLength](https://www.jadev-corp.com/api/pdfnetstack-signing/pdftrustedlist/#PdfNetStack_Signing_PdfTrustedList_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](https://www.jadev-corp.com/api/pdfnetstack-signing/pdftrustedlist/#PdfNetStack_Signing_PdfTrustedList_Signature). Pass
the lists to [TrustedLists](https://www.jadev-corp.com/api/pdfnetstack-signing/pdfvalidationoptions/#PdfNetStack_Signing_PdfValidationOptions_TrustedLists) to confirm qualified status.

## Fields

### <a id="PdfNetStack_Signing_PdfTrustedList_MaxLength"></a> MaxLength

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

```csharp
public const int MaxLength = 33554432
```

#### Field Value

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

## Properties

### <a id="PdfNetStack_Signing_PdfTrustedList_IsListOfLists"></a> IsListOfLists

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

```csharp
public bool IsListOfLists { get; }
```

#### Property Value

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="PdfNetStack_Signing_PdfTrustedList_IssueDate"></a> IssueDate

When the list was issued.

```csharp
public DateTimeOffset IssueDate { get; }
```

#### Property Value

 [DateTimeOffset](https://learn.microsoft.com/dotnet/api/system.datetimeoffset)

### <a id="PdfNetStack_Signing_PdfTrustedList_NextUpdate"></a> 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.

```csharp
public DateTimeOffset? NextUpdate { get; }
```

#### Property Value

 [DateTimeOffset](https://learn.microsoft.com/dotnet/api/system.datetimeoffset)?

### <a id="PdfNetStack_Signing_PdfTrustedList_OperatorName"></a> OperatorName

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

```csharp
public string OperatorName { get; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="PdfNetStack_Signing_PdfTrustedList_Pointers"></a> Pointers

The pointers to other lists.

```csharp
public IReadOnlyList<PdfTrustedListPointer> Pointers { get; }
```

#### Property Value

 [IReadOnlyList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist\-1)<[PdfTrustedListPointer](https://www.jadev-corp.com/api/pdfnetstack-signing/pdftrustedlistpointer/)\>

### <a id="PdfNetStack_Signing_PdfTrustedList_Providers"></a> Providers

The trust service providers.

```csharp
public IReadOnlyList<PdfTrustServiceProvider> Providers { get; }
```

#### Property Value

 [IReadOnlyList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist\-1)<[PdfTrustServiceProvider](https://www.jadev-corp.com/api/pdfnetstack-signing/pdftrustserviceprovider/)\>

### <a id="PdfNetStack_Signing_PdfTrustedList_SequenceNumber"></a> SequenceNumber

The TSLSequenceNumber, which grows with each issue.

```csharp
public int SequenceNumber { get; }
```

#### Property Value

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="PdfNetStack_Signing_PdfTrustedList_Services"></a> Services

Every service of every provider.

```csharp
public IEnumerable<PdfTrustService> Services { get; }
```

#### Property Value

 [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable\-1)<[PdfTrustService](https://www.jadev-corp.com/api/pdfnetstack-signing/pdftrustservice/)\>

### <a id="PdfNetStack_Signing_PdfTrustedList_Signature"></a> 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.

```csharp
public PdfCheckStatus Signature { get; }
```

#### Property Value

 [PdfCheckStatus](https://www.jadev-corp.com/api/pdfnetstack-signing/pdfcheckstatus/)

### <a id="PdfNetStack_Signing_PdfTrustedList_SignatureProblem"></a> SignatureProblem

Why the signature did not pass, or null.

```csharp
public string? SignatureProblem { get; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="PdfNetStack_Signing_PdfTrustedList_SignerCertificate"></a> SignerCertificate

The supplied certificate the signature verified with, or null.

```csharp
public X509Certificate2? SignerCertificate { get; }
```

#### Property Value

 [X509Certificate2](https://learn.microsoft.com/dotnet/api/system.security.cryptography.x509certificates.x509certificate2)?

### <a id="PdfNetStack_Signing_PdfTrustedList_Territory"></a> Territory

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

```csharp
public string Territory { get; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="PdfNetStack_Signing_PdfTrustedList_Type"></a> Type

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

```csharp
public string Type { get; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="PdfNetStack_Signing_PdfTrustedList_Version"></a> Version

The TSLVersionIdentifier, 5 or 6 for the current specification.

```csharp
public int Version { get; }
```

#### Property Value

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

## Methods

### <a id="PdfNetStack_Signing_PdfTrustedList_Load_System_Byte___System_Collections_Generic_IEnumerable_System_Security_Cryptography_X509Certificates_X509Certificate2__"></a> Load\(byte\[\], IEnumerable&lt;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.

```csharp
public static PdfTrustedList Load(byte[] xml, IEnumerable<X509Certificate2> signingCertificates)
```

#### Parameters

`xml` [byte](https://learn.microsoft.com/dotnet/api/system.byte)\[\]

The list's XML.

`signingCertificates` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable\-1)<[X509Certificate2](https://learn.microsoft.com/dotnet/api/system.security.cryptography.x509certificates.x509certificate2)\>

The certificates that may sign the list.

#### Returns

 [PdfTrustedList](https://www.jadev-corp.com/api/pdfnetstack-signing/pdftrustedlist/)

#### Exceptions

 [FormatException](https://learn.microsoft.com/dotnet/api/system.formatexception)

The bytes are not a well formed trusted list, or larger than [MaxLength](https://www.jadev-corp.com/api/pdfnetstack-signing/pdftrustedlist/#PdfNetStack_Signing_PdfTrustedList_MaxLength).

### <a id="PdfNetStack_Signing_PdfTrustedList_Load_System_IO_Stream_System_Collections_Generic_IEnumerable_System_Security_Cryptography_X509Certificates_X509Certificate2__"></a> Load\(Stream, IEnumerable&lt;X509Certificate2\>\)

Reads a list from a stream and checks its signature against the certificates published for it.

```csharp
public static PdfTrustedList Load(Stream xml, IEnumerable<X509Certificate2> signingCertificates)
```

#### Parameters

`xml` [Stream](https://learn.microsoft.com/dotnet/api/system.io.stream)

The list's XML; read to its end, at most [MaxLength](https://www.jadev-corp.com/api/pdfnetstack-signing/pdftrustedlist/#PdfNetStack_Signing_PdfTrustedList_MaxLength) bytes.

`signingCertificates` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable\-1)<[X509Certificate2](https://learn.microsoft.com/dotnet/api/system.security.cryptography.x509certificates.x509certificate2)\>

The certificates that may sign the list.

#### Returns

 [PdfTrustedList](https://www.jadev-corp.com/api/pdfnetstack-signing/pdftrustedlist/)

#### Exceptions

 [FormatException](https://learn.microsoft.com/dotnet/api/system.formatexception)

The stream does not hold a well formed trusted list, or holds more than [MaxLength](https://www.jadev-corp.com/api/pdfnetstack-signing/pdftrustedlist/#PdfNetStack_Signing_PdfTrustedList_MaxLength) bytes.

### <a id="PdfNetStack_Signing_PdfTrustedList_Load_System_Byte___PdfNetStack_Signing_PdfTrustedList_"></a> 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.

```csharp
public static PdfTrustedList Load(byte[] xml, PdfTrustedList listOfLists)
```

#### Parameters

`xml` [byte](https://learn.microsoft.com/dotnet/api/system.byte)\[\]

The list's XML.

`listOfLists` [PdfTrustedList](https://www.jadev-corp.com/api/pdfnetstack-signing/pdftrustedlist/)

The list of lists that points to it.

#### Returns

 [PdfTrustedList](https://www.jadev-corp.com/api/pdfnetstack-signing/pdftrustedlist/)

#### Exceptions

 [FormatException](https://learn.microsoft.com/dotnet/api/system.formatexception)

The bytes are not a well formed trusted list, or larger than [MaxLength](https://www.jadev-corp.com/api/pdfnetstack-signing/pdftrustedlist/#PdfNetStack_Signing_PdfTrustedList_MaxLength).

### <a id="PdfNetStack_Signing_PdfTrustedList_Load_System_IO_Stream_PdfNetStack_Signing_PdfTrustedList_"></a> Load\(Stream, PdfTrustedList\)

Reads a list from a stream and checks its signature against the pointers of a list of lists.

```csharp
public static PdfTrustedList Load(Stream xml, PdfTrustedList listOfLists)
```

#### Parameters

`xml` [Stream](https://learn.microsoft.com/dotnet/api/system.io.stream)

The list's XML; read to its end, at most [MaxLength](https://www.jadev-corp.com/api/pdfnetstack-signing/pdftrustedlist/#PdfNetStack_Signing_PdfTrustedList_MaxLength) bytes.

`listOfLists` [PdfTrustedList](https://www.jadev-corp.com/api/pdfnetstack-signing/pdftrustedlist/)

The list of lists that points to it.

#### Returns

 [PdfTrustedList](https://www.jadev-corp.com/api/pdfnetstack-signing/pdftrustedlist/)

#### Exceptions

 [FormatException](https://learn.microsoft.com/dotnet/api/system.formatexception)

The stream does not hold a well formed trusted list, or holds more than [MaxLength](https://www.jadev-corp.com/api/pdfnetstack-signing/pdftrustedlist/#PdfNetStack_Signing_PdfTrustedList_MaxLength) bytes.

Source: https://www.jadev-corp.com/pdfnetstack/api/pdfnetstack-signing/pdftrustedlist/
