Click or drag to resize
Pdf Library for .NET

PdfDigitalCertificatesCollection Class

Represents a collection of digital certificates that can be used to sign a pdf document. Returned by the PdfDigitalCertificatesStore factory methods.
Inheritance Hierarchy
SystemObject
  SelectPdf.UniversalPdfDigitalCertificatesCollection

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.5
Syntax
public class PdfDigitalCertificatesCollection : IEnumerable, 
	IDisposable

The PdfDigitalCertificatesCollection type exposes the following members.

Properties
 NameDescription
Public propertyCount Gets the number of certificates in the collection.
Public propertyItem Gets the certificate at the specified zero based index from collection.
Top
Methods
 NameDescription
Public methodDispose Releases every certificate in the collection, the private keys they carry included, and empties it. A certificate taken from the collection can no longer be used afterwards, so dispose of the collection only after the documents signed with it are saved. Calling it more than once does nothing.
Public methodGetCertByIssuer Searches for a certificate with a specified issuer name.
Public methodGetCertBySerialNumber Searches for a certificate with a specified serial number.
Public methodGetCertBySubject Searches for a certificate with a specified subject name.
Public methodGetEnumerator Gets the collection enumerator.
Top
Example
using PdfDigitalCertificatesCollection certs =
    PdfDigitalCertificatesStore.GetCertificates();
System.Console.WriteLine(certs.Count);
PdfDigitalCertificate cert = certs.GetCertBySubject("Acme Signer");
foreach (PdfDigitalCertificate c in certs)
    System.Console.WriteLine(c.Subject);
See Also