All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

ICertificateStoreProvider Interface

Provides certificates used to build a certificate chain and register the signature in the Document Security Store (DSS).

Namespace: DevExpress.Office.DigitalSignatures

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

Declaration

public interface ICertificateStoreProvider
Public Interface ICertificateStoreProvider

Remarks

The CertificateStoreProvider is the default ICertificateStoreProvider implementation.

Use this class object as the PdfDocumentSigner.AddToDss method parameter to provide certificates used to build a certificate chain and add the signature to the DSS.

The code sample below retrieves the name of the first signature field, adds the related signature's information to the DSS, and applies a timestamp to the document.

using (var signer = new PdfDocumentSigner(@"signed.pdf"))
{
    ITsaClient tsaClient = new TsaClient(new Uri(@"https://freetsa.org/tsr"), HashAlgorithmType.SHA256);

    string signatureName = signer.GetSignatureFieldNames(false)[0];

   //Create a provider that retrieves certificates from a store:
    using (var certificateStoreProvider =
    new CertificateStoreProvider(new X509Store(StoreLocation.CurrentUser), true))
    {
        //Add the signature to the security store
        //And specify the CrlClient and OcspClient objects
        //Used to check the certificates' revocation status
        signer.AddToDss(signatureName, new CrlClient(), new OcspClient(), certificateStoreProvider);
    }
    signer.SaveDocument(@"signedLTV.pdf", new[] { new PdfSignatureBuilder(new PdfTimeStamp(tsaClient)) });
}
See Also