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

    Show / Hide Table of Contents

    PdfPkcs11DigitalId Class

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

    Represents a digital ID that is stored on a cryptographic device accessible through PKCS#11 application programming interface called "Cryptoki".

    • C#
    • VB.NET
    public sealed class PdfPkcs11DigitalId : PdfDigitalId
    Public NotInheritable Class PdfPkcs11DigitalId
        Inherits PdfDigitalId
    Inheritance:
    System.Object
    PdfDigitalId
    PdfPkcs11DigitalId

    Properties

    Id

    Gets the key identifier for public/private key pair (default empty) as hex encoded string.

    • C#
    • VB.NET
    public string Id { get; }
    Public ReadOnly Property Id As String
    Property Value
    System.String

    The key identifier for public/private key pair (default empty) as hex encoded string.

    Label

    Gets the optional label associated with either private key, public key, or certificate of the current PdfPkcs11DigitalId.

    • C#
    • VB.NET
    public string Label { get; }
    Public ReadOnly Property Label As String
    Property Value
    System.String

    The optional label associated with either private key, public key, or certificate of the current PdfPkcs11DigitalId.

    Methods

    CreateCertificate(String, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

    Creates a self-signed X.509 Public-Key certificate with a X.509 SubjectPublicKeyInfo structure to include in the certificate extracted from the PKCS#11 private key or public key associated with this GemBox.Cryptography.Pkcs11.Pkcs11DigitalId.

    • C#
    • VB.NET
    public PdfCertificate CreateCertificate(string subjectName = null, DateTimeOffset? notBefore = default(DateTimeOffset? ), DateTimeOffset? notAfter = default(DateTimeOffset? ))
    Public Function CreateCertificate(subjectName As String = Nothing, notBefore As DateTimeOffset? = Nothing, notAfter As DateTimeOffset? = Nothing) As PdfCertificate
    Parameters
    subjectName
    System.String

    The X.500 Distinguished Name to use as the Subject in a created certificate. If null, the value is extracted from the PKCS#11 private key or public key associated with this GemBox.Cryptography.Pkcs11.Pkcs11DigitalId or a predefined value is used.

    notBefore
    System.Nullable<System.DateTimeOffset>

    The oldest date and time when the certificate is considered valid. Typically System.DateTimeOffset.UtcNow, plus or minus a few seconds. If null, the value is extracted from the PKCS#11 private key or public key associated with this GemBox.Cryptography.Pkcs11.Pkcs11DigitalId or a predefined value is used.

    notAfter
    System.Nullable<System.DateTimeOffset>

    The date and time when the certificate is no longer considered valid. If null, the value is extracted from the PKCS#11 private key or public key associated with this GemBox.Cryptography.Pkcs11.Pkcs11DigitalId or a predefined value is used.

    Returns
    PdfCertificate

    A created PdfCertificate or null if the creation was not successful.

    Inherited Properties

    Certificate

    Gets or sets the certificate.

    (Inherited from PdfDigitalId)

    Inherited Methods

    ToString()

    Returns a System.String that represents this PdfDigitalId instance.

    (Inherited from PdfDigitalId)

    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.