CmsSigner(X509Certificate2, SubjectIdentifierType) Constructor

Initialize a new instance of the CmsSigner class.

Definition

Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public CmsSigner(
	X509Certificate2 certificate,
	SubjectIdentifierType signerIdentifierType = SubjectIdentifierType.IssuerAndSerialNumber
)

Parameters

certificate  X509Certificate2
The signer's certificate.
signerIdentifierType  SubjectIdentifierType  (Optional)
The scheme used for identifying the signer certificate.

Remarks

The initial value of the DigestAlgorithm will be set to Sha256 and both the SignedAttributes and UnsignedAttributes properties will be initialized to empty tables.

Exceptions

ArgumentNullException certificate is .
ArgumentException certificate cannot be used for signing.

See Also