GemBox.Pdf
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    PdfDocumentSecurityStore Class

    Namespace:
    GemBox.Pdf.Security
    Assembly:
    GemBox.Pdf.dll

    Represents a container that may contain:

    • a collection of all certificates used for the signatures, including timestamp signatures, that occur in the document. It shall also hold all the auxiliary certificates required to validate the certificates participating in certificate chain validations.
    • a collection of all Certificate Revocation Lists (CRLs) (see RFC 5280) used for some of the signatures, and
    • a collection of all Certificate Status Protocol (OCSP) responses (see RFC 6960) used for some of the signatures.
    • C#
    • VB.NET
    public sealed class PdfDocumentSecurityStore : PdfObject
    Public NotInheritable Class PdfDocumentSecurityStore
        Inherits PdfObject
    Inheritance:
    System.Object
    PdfObject
    PdfDocumentSecurityStore

    Properties

    CertificateRevocationLists

    Gets the X.509 Certificate Revocation Lists (CRLs) that may be used in the validation of the signatures in the document.

    • C#
    • VB.NET
    public PdfCollection<PdfCertificateRevocationList> CertificateRevocationLists { get; }
    Public ReadOnly Property CertificateRevocationLists As PdfCollection(Of PdfCertificateRevocationList)
    Property Value
    PdfCollection<PdfCertificateRevocationList>

    The X.509 Certificate Revocation Lists (CRLs) that may be used in the validation of the signatures in the document.

    Certificates

    Gets the X.509 certificates that maybe used in the validation of any signatures in the document.

    • C#
    • VB.NET
    public PdfCollection<PdfCertificate> Certificates { get; }
    Public ReadOnly Property Certificates As PdfCollection(Of PdfCertificate)
    Property Value
    PdfCollection<PdfCertificate>

    The X.509 certificates that maybe used in the validation of any signatures in the document.

    OnlineCertificateStatusProtocolResponses

    Gets the X.509 Online Certificate Status Protocol (OCSP) responses that may be used in the validation of the signatures in the document.

    • C#
    • VB.NET
    public PdfCollection<PdfOnlineCertificateStatusProtocolResponse> OnlineCertificateStatusProtocolResponses { get; }
    Public ReadOnly Property OnlineCertificateStatusProtocolResponses As PdfCollection(Of PdfOnlineCertificateStatusProtocolResponse)
    Property Value
    PdfCollection<PdfOnlineCertificateStatusProtocolResponse>

    The X.509 Online Certificate Status Protocol (OCSP) responses that may be used in the validation of the signatures in the document.

    Methods

    AddValidationInfo(PdfSignature)

    Adds certificates, certificate revocation lists and Online Certificate Status Protocol responses for the specified PdfSignature to this PdfDocumentSecurityStore.

    The full set of certificates, including the trust anchor when it is available in the form of a certificate, used to validate the signature and which are not already present in the signature are added to the security store. This set includes certificates required for validating the signing certificate, for validating any attribute certificate present in the signature, and for validating any time-stamp token's signing certificate (i.e. a TSA certificate) already incorporated to the signature.

    The full set of revocation data (CRL or OCSP responses) used in the validation of the signer and CA certificates used in signature are added to the security store. This set includes all certificate status information required for validating the signing certificate, for validating any attribute certificate present in the signature, and for validating any time-stamp token's signing certificate (i.e. a TSA certificate) already incorporated to the signature.

    • C#
    • VB.NET
    public void AddValidationInfo(PdfSignature signature)
    Public Sub AddValidationInfo(signature As PdfSignature)
    Parameters
    signature
    PdfSignature

    The signature whose certificates, certificate revocation lists and Online Certificate Status Protocol responses are added to this PdfDocumentSecurityStore.

    Exceptions
    System.ArgumentNullException

    signature is null.

    AddValidationInfo(PdfSignatureValidationInfo)

    Adds certificates, certificate revocation lists and Online Certificate Status Protocol responses from the specified PdfSignatureValidationInfo to this PdfDocumentSecurityStore.

    • C#
    • VB.NET
    public void AddValidationInfo(PdfSignatureValidationInfo signatureValidationInfo)
    Public Sub AddValidationInfo(signatureValidationInfo As PdfSignatureValidationInfo)
    Parameters
    signatureValidationInfo
    PdfSignatureValidationInfo

    The signature validation-related information whose certificates, certificate revocation lists and Online Certificate Status Protocol responses are added to this PdfDocumentSecurityStore.

    Remarks

    If certificate already exists in the PdfDocumentSecurityStore, it is not added.

    Exceptions
    System.ArgumentNullException

    signatureValidationInfo is null.

    Clear()

    Removes all certificates, certificate revocation lists and Online Certificate Status Protocol responses from this PdfDocumentSecurityStore.

    • C#
    • VB.NET
    public void Clear()
    Public Sub Clear

    GetValidationInfo(PdfCertificate)

    Gets the validation-related information (CA certificates, CRLs and/or OCSPs responses) used to validate the specified certificate.

    • C#
    • VB.NET
    public PdfSignatureValidationInfo GetValidationInfo(PdfCertificate certificate)
    Public Function GetValidationInfo(certificate As PdfCertificate) As PdfSignatureValidationInfo
    Parameters
    certificate
    PdfCertificate

    The certificate for which to retrieve the validation-related information.

    Returns
    PdfSignatureValidationInfo

    The validation-related information (CA certificates, CRLs and/or OCSPs responses) used to validate the specified certificate.

    ToString()

    Returns a System.String that represents this PdfDocumentSecurityStore instance.

    • C#
    • VB.NET
    public override string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this PdfDocumentSecurityStore instance.

    Overrides
    System.Object.ToString()
    Remarks

    This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).

    Inherited Properties

    Metadata

    (Optional; PDF 1.4) A metadata stream containing metadata for the component.

    (Inherited from PdfObject)

    Extension Methods

    PdfObjectExtensions.GetDictionary(PdfObject)
    PdfObjectExtensions.GetOrAddDictionary(PdfObject)
    PdfObjectExtensions.GetArray(PdfObject)

    Examples

    PAdES B-LT level example
    PAdES B-LTA level example

    See Also

    ETSI EN 319 142-1, section '5.4.2.2 DSS Dictionary'
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.