Status property
Collapse the table of content
Expand the table of content

Signature.Status property

Office 2013 and later

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)

XdSignatureStatus Status { get; }

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 noteImportant

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.

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";
 case XdSignatureStatus.xdSignatureStatusValid : 
  signatureStatus = "Valid";
 case XdSignatureStatus.xdSignatureStatusInvalid : 
  signatureStatus = "Invalid";
 case XdSignatureStatus.xdSignatureStatusError :
  signatureStatus = "Error";
 case XdSignatureStatus.xdSignatureStatusUnsupported :
  signatureStatus = "Unsupported";
thisXDocument.UI.Alert("Signature Status = " + signatureStatus);
© 2016 Microsoft