Skip to main content
A newer version of this page is available. .
All docs
V20.2
.NET Framework 4.5.2+

ICrlClient Interface

Allows you to send a CLR request for specific a certificate.

Namespace: DevExpress.Office.DigitalSignatures

Assembly: DevExpress.Pdf.v20.2.Core.dll

NuGet Package: DevExpress.Pdf.Core

Declaration

public interface ICrlClient

Remarks

The CrlClient class is the default ICrlClient interface implementation.

Pass the ICrlClient instance to the Pkcs7Signer object constructor, as shown below:

using DevExpress.Pdf;
using DevExpress.Office.DigitalSignatures;
using DevExpress.Office.Tsp;

using (var signer = new PdfDocumentSigner("Document.pdf"))
{
    IOcspClient ocspClient = new PdfOcspClient();
    ICrlClient crlClient = new CrlClient();

    ITsaClient tsaClient = new TsaClient(new Uri(@"https://freetsa.org/tsr"), PdfHashAlgorithm.SHA256);

    //Create a PKCS#7 signature:
    Pkcs7Signer pkcs7Signature = new Pkcs7Signer("Signing Documents//testcert.pfx", "123",
     HashAlgorithmType.SHA256, tsaClient, ocspClient, crlClient, PdfSignatureProfile.PAdES_BES);

    //Create a new signature field:
    var signatureFieldInfo = new PdfSignatureFieldInfo(1);
    signatureFieldInfo.Name = "SignatureField";
    signatureFieldInfo.SignatureBounds = new PdfRectangle(10, 10, 150, 150);

    //Apply a signature with a new signature:
    var signature =
    new PdfSignatureBuilder(pkcs7Signature, signatureFieldInfo);

    //Sign and save the document:
    signer.SaveDocument("SignedDocument.pdf", signature);
}
See Also