CertificateStoreSigner Class |
An
IExternalSigner that signs with a certificate of the system certificate store - one whose key is
in the store itself, or on a smart card or USB token whose middleware the store reaches.
Inheritance HierarchySystemObject
ExpertPdf.Anywhere.PDFSecurityCertificateStoreSigner
Namespace: ExpertPdf.Anywhere.PDFSecurityAssembly: ExpertPdf.Anywhere (in ExpertPdf.Anywhere.dll) Version: 22.0
Syntaxpublic sealed class CertificateStoreSigner : IExternalSigner,
IDisposable
Public NotInheritable Class CertificateStoreSigner
Implements IExternalSigner, IDisposable
The CertificateStoreSigner type exposes the following members.
Constructors
Properties| | Name | Description |
|---|
 | Certificate |
Gets the signing certificate.
|
 | Certificates |
Gets the signing certificate and its issuers, each DER-encoded.
|
Top
Methods| | Name | Description |
|---|
 | Dispose |
Releases the certificate.
|
 | Sign |
Signs the request's digest with the certificate's private key (RSA PKCS#1 v1.5, or ECDSA).
|
Top
RemarksThe certificate is found by its thumbprint in the current user's store, then in the local machine's, and
must have a private key. A token's middleware asks for the PIN when the first signature is made. The issuer
certificates are added from the system stores.
The certificate stays open until the signer is disposed. Signing happens when the document is saved, so
dispose of the signer after the save.
Exampleusing (CertificateStoreSigner signer = new CertificateStoreSigner("3F8A...C2"))
{
PdfSecurityManager manager = new PdfSecurityManager();
manager.Sign("input.pdf", "signed.pdf", signer, "Signature1", "Approved", "Office", "",
0, new RectangleF(40, 40, 220, 70), null);
}Using signer As New CertificateStoreSigner("3F8A...C2")
Dim manager As New PdfSecurityManager()
manager.Sign("input.pdf", "signed.pdf", signer, "Signature1", "Approved", "Office", "",
0, New RectangleF(40, 40, 220, 70), Nothing)
End Using
See Also