Cms |
public CmsSigner( string fileName, string password, SubjectIdentifierType signerIdentifierType = SubjectIdentifierType.IssuerAndSerialNumber )
Exception | Condition |
---|---|
ArgumentNullException | fileName is null. -or- password is null. |
ArgumentException | fileName is a zero-length string, contains only white space, or contains one or more invalid characters. -or- fileName does not contain a private key. -or- fileName does not contain a certificate that could be used for signing. |
DirectoryNotFoundException | fileName is an invalid file path. |
FileNotFoundException | The specified file path could not be found. |
UnauthorizedAccessException | The user does not have access to read the specified file. |
IOException | An I/O error occurred. |
Creates a new CmsSigner, loading the X.509 certificate and private key from the specified file.
The initial value of the DigestAlgorithm will be set to Sha256 and both the SignedAttributes and UnsignedAttributes properties will be initialized to empty tables.