Table of Contents

Class PdfPublicKeySecurityHandler

Namespace
PdfEngine.Vector.Security
Assembly
PdfEngine.Vector.dll

The public-key security handler (ISO 32000-2 7.6.5, /Filter /Adobe.PubSec, sub-filters adbe.pkcs7.s3, s4 and s5): each recipient's CMS envelope holds a 20-byte seed and the recipient's permissions; the file key is SHA-1 (SHA-256 for AES-256) of the seed, every /Recipients entry and — with /EncryptMetadata false — four 0xFF bytes.

public sealed class PdfPublicKeySecurityHandler : PdfSecurityHandler
Inheritance
PdfPublicKeySecurityHandler
Inherited Members

Properties

CertificateSource

Where certificates come from when a document is opened without an explicit list: by default the personal stores (StoreCertificates()). Hosts and tests may replace it.

public static Func<IEnumerable<X509Certificate2>> CertificateSource { get; set; }

Property Value

Func<IEnumerable<X509Certificate2>>

Methods

Authenticate(IEnumerable<X509Certificate2>)

Opens the document with the first certificate (holding its private key) that is a recipient.

public bool Authenticate(IEnumerable<X509Certificate2> certificates)

Parameters

certificates IEnumerable<X509Certificate2>

Returns

bool

StoreCertificates()

Certificates with private keys from the current user's and the machine's personal stores.

public static IEnumerable<X509Certificate2> StoreCertificates()

Returns

IEnumerable<X509Certificate2>