Click or drag to resize
Pdftools logo

ProviderCreateSignatureFromCertificate Method

Create a configuration to sign with a PFX (PKCS#12) soft certificate

The file must contain the certificate itself, all certificates of the trust chain, and the private key.

Namespace: PdfTools.Crypto.Providers.BuiltIn
Assembly: PdfTools (in PdfTools.dll) Version: 1.6.0+e1db8f4bf6125495a2d29513486ea3e61205c81b
Syntax
C#
public SignatureConfiguration CreateSignatureFromCertificate(
	Stream stream,
	string password
)

Parameters

stream  Stream
The signing certificate in PKCS#12 format (.p12, .pfx).
password  String
The password required to decrypt the private key of the archive.

Return Value

SignatureConfiguration
Exceptions
ExceptionCondition
CorruptExceptionThe PFX (PKCS#12) archive is corrupt and cannot be read.
PasswordExceptionThe password is invalid.
ArgumentExceptionThe certificate is not a valid signing certificate
ArgumentNullExceptionif stream is .
See Also