SignatureObject Interface

Definition

Represents a digital signature that has been added to a form or set of signed data in a form.

public interface class SignatureObject : Microsoft::Office::Interop::InfoPath::Signature
[System.Runtime.InteropServices.Guid("096CD718-0786-11D1-95FA-0080C78EE3BB")]
public interface SignatureObject : Microsoft.Office.Interop.InfoPath.Signature
type SignatureObject = interface
    interface Signature
Public Interface SignatureObject
Implements Signature
Derived
Attributes
Implements

Examples

In the following example, the Status property of the Signature object is used to determine the status of the signature, and several Signature object properties are displayed in message boxes:

public void DisplaySignatureProperties()
{
<span class="label">SignatureObject</span> mySignature = thisXDocument.SignedDataBlocks[0].Signatures[0];
CertificateObject signatureCertificate = mySignature.Certificate;
string signatureComment = mySignature.Comment;
IXMLDOMNode signatureNode = mySignature.SignatureBlockXmlNode;
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 properties:\n Status = " + signatureStatus + "\n Comment = " + signatureComment + "\n Certificate Issued To = " + signatureCertificate.IssuedTo);
thisXDocument.UI.Alert("Digital signature XML block: \n" + signatureNode.xml);
}

Remarks

This type is a wrapper for a coclass that is required by managed code for COM interoperability. Use this type to access the members of the COM interface implemented by this coclass. For information about the COM interface, including a link to descriptions of its members, seeSignature.

Use the Item[Object] property of the SignaturesCollection collection to return a Signature object.

Properties

Certificate

Gets the CertificateObject object for the X.509 digital certificate that was used to sign a form or a set of signed data in a form.

(Inherited from Signature)
Comment

Gets the text comment that was added to the digital signature associated with a form or a set of signed data in a form.

(Inherited from Signature)
SignatureBlockXmlNode

Gets the XML node corresponding a digital signature.

(Inherited from Signature)
Status

Gets the status of the specified digital signature.

(Inherited from Signature)

Methods

Sign()

Writes the XML digital signature block and computes the cryptographic hash for the signed data.

(Inherited from Signature)

Applies to