Export (0) Print
Expand All

Signature.Status Property (Microsoft.Office.Interop.InfoPath)

Gets the status of the specified digital signature.

Namespace: Microsoft.Office.Interop.InfoPath
Assembly: Microsoft.Office.Interop.InfoPath (in microsoft.office.interop.infopath.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.

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);

Community Additions

© 2015 Microsoft