Modifica

Condividi tramite


Signature.Status Property

Definition

Gets the status of the specified digital signature.

public:
 property Microsoft::Office::Interop::InfoPath::XdSignatureStatus Status { Microsoft::Office::Interop::InfoPath::XdSignatureStatus get(); };
public Microsoft.Office.Interop.InfoPath.XdSignatureStatus Status { get; }
member this.Status : Microsoft.Office.Interop.InfoPath.XdSignatureStatus
Public ReadOnly Property Status As XdSignatureStatus

Property Value

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.<span class="label">Status</span>)
{
 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);
}

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.

Applies to