SignedCms.ComputeSignature Method (CmsSigner, Boolean)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Creates a signature using the specified signer and adds the signature to the CMS/PKCS #7 message. If the value of the silent parameter is false and the Certificate property of the CmsSigner object specified by the signer parameter is not set to a valid certificate, this method prompts the user to select a signing certificate.

Namespace:   System.Security.Cryptography.Pkcs
Assembly:  System.Security (in System.Security.dll)

public void ComputeSignature(
	CmsSigner signer,
	bool silent
)

Parameters

signer
Type: System.Security.Cryptography.Pkcs.CmsSigner

A CmsSigner object that represents the signer.

silent
Type: System.Boolean

false to prompt the user to select a signing certificate.

Exception Condition
ArgumentNullException

A null reference was passed to a method that does not accept it as a valid argument.

CryptographicException

A cryptographic operation could not be completed.

InvalidOperationException

The value of the silent parameter is true and a signing certificate is not specified.

The following permissions are required to display the user interface:

The following permissions are required to access the signature key:

.NET Framework
Available since 2.0
Return to top
Show: