Search Results for

    Show / Hide Table of Contents

    Interface IExternalSignatureProvider

    Supplies the certificate and the signing operation for an ExternalSigner. Implement this to sign with a key held by an external service, such as Azure Key Vault or a cloud HSM. The private key is never required.

    Namespace: IronSoftware.Pdfium.Signing
    Assembly: IronPdf.dll
    Syntax
    public interface IExternalSignatureProvider

    Properties

    CertificateChain

    Optional intermediate certificates to embed in the signature. May be null or empty.

    Declaration
    IEnumerable<X509Certificate2> CertificateChain { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<System.Security.Cryptography.X509Certificates.X509Certificate2>

    SigningCertificate

    The signing certificate. Only the public certificate is required. RSA and ECDSA keys are supported.

    Declaration
    X509Certificate2 SigningCertificate { get; }
    Property Value
    Type Description
    System.Security.Cryptography.X509Certificates.X509Certificate2

    Methods

    SignHash(Byte[], SignatureHashAlgorithms)

    Signs a hash with the private key that belongs to SigningCertificate. Called once per signature on the calling thread, and may block.

    Declaration
    byte[] SignHash(byte[] hash, SignatureHashAlgorithms hashAlgorithm)
    Parameters
    Type Name Description
    System.Byte[] hash

    The hash to sign.

    SignatureHashAlgorithms hashAlgorithm

    The algorithm used to compute hash, as set on the ExternalSigner.

    Returns
    Type Description
    System.Byte[]

    For RSA keys, a complete RSASSA-PKCS1-v1_5 signature. The provider applies the DigestInfo encoding for hashAlgorithm, as Azure Key Vault RS256 and RSA.SignHash with PKCS#1 padding do. For ECDSA keys, the signature as raw r||s or DER-encoded.

    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget