Signature.Status Property

Gets the status of the specified digital signature.

Namespace:  Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly:  Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)

Syntax

'Declaration
ReadOnly Property Status As XdSignatureStatus
    Get
'Usage
Dim instance As Signature
Dim value As XdSignatureStatus

value = instance.Status
XdSignatureStatus Status { get; }

Property Value

Type: Microsoft.Office.Interop.InfoPath.SemiTrust.XdSignatureStatus

Remarks

The status that is returned is based on the XdSignatureStatus enumeration.

The Status property only verifies whether the hash of the digital signature is valid. It does not verify the chain of trust of the digital certificate, nor does it verify that the image of the view captured at the time the signature was added matches the current view of the signed form.

Important

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

Examples

In the following example, the Status property of the Signature object is used to determine the status of the signature, and is displayed in a message box:

public void DisplaySignatureProperties()
{
SignatureObject mySignature = thisXDocument.SignedDataBlocks[0].Signatures[0];
string signatureStatus = "Unknown";
switch(mySignature.Status)
{
 case XdSignatureStatus.xdSignatureStatusValid : 
  signatureStatus = "Valid";
  break;
 case XdSignatureStatus.xdSignatureStatusInvalid : 
  signatureStatus = "Invalid";
  break;
 case XdSignatureStatus.xdSignatureStatusError :
  signatureStatus = "Error";
  break;
 case XdSignatureStatus.xdSignatureStatusUnsupported :
  signatureStatus = "Unsupported";
  break;
}
thisXDocument.UI.Alert("Signature Status = " + signatureStatus);
}

See Also

Reference

Signature Interface

Signature Members

Microsoft.Office.Interop.InfoPath.SemiTrust Namespace