CertificateHolder Class

Wordize.DigitalSignatures.CertificateHolder class. Represents a holder of X509Certificate2 instance.

CertificateHolder class

Represents a holder of X509Certificate2 instance.

public class CertificateHolder

Properties

NameDescription
Certificate { get; }Returns the instance of X509Certificate2 which holds private, public keys and certificate chain.

Methods

NameDescription
static Create(byte[], SecureString)Creates CertificateHolder object using byte array of PKCS12 store and its password.
static Create(byte[], string)Creates CertificateHolder object using byte array of PKCS12 store and its password.
static Create(string, string)Creates CertificateHolder object using path to PKCS12 store and its password.
static Create(string, string, string)Creates CertificateHolder object using path to PKCS12 store, its password and the alias by using which private key and certificate will be found.

Remarks

CertificateHolder can be created by static factory methods only. It contains an instance of X509Certificate2 which is used to introduce private, public keys and certificate chains into the system.

Examples

Demonstrates how to sign document.

CertificateHolder certHolder = CertificateHolder.Create(MyDir + "morzal.pfx", "aw");

SignOptions signOptions = new SignOptions();
signOptions.Comments = "Test Signing";
signOptions.SignTime = DateTime.Now;

Signer.Sign(MyDir + "Simple.docx", ArtifactsDir + "Signed.docx", certHolder, signOptions);

See Also