 | 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.BuiltInAssembly: PdfTools (in PdfTools.dll) Version: 1.8.0+c1110cafb37403de0188424e1c97e84e318ca892
Syntaxpublic 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
ExceptionsException | Condition |
---|
CorruptException | The PFX (PKCS#12) archive is corrupt and cannot be read. |
PasswordException | The password is invalid. |
ArgumentException | The certificate is not a valid signing certificate |
ArgumentNullException | if stream is . |
See Also