CertificateObject Interface

Definition

Represents the X.509 digital certificate that has been used to create a signature.

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

Examples

The following example uses several properties of the Certificate object to determine the status, and displays a message box with several Certificate object properties:

public void CertificatePropertiesAlert()
{
<span class="label">Certificate</span> myCertificate = thisXDocument.SignedDataBlocks[0].Signatures[0].<span class="label">Certificate</span>;
 string status = "Undefined";
 switch(myCertificate.Status)
 {
  case XdCertificateStatus.xdCertificateStatusValid :
   status = "Valid";
   break;
  case XdCertificateStatus.xdCertificateStatusError :
   status = "Error";
   break;
  case XdCertificateStatus.xdCertificateStatusExpired :
   status = "Expired";
    break;
  case XdCertificateStatus.xdCertificateStatusNotTrusted :
   status = "Not Trusted";
   break;
  case XdCertificateStatus.xdCertificateStatusRevoked :
   status = "Revoked";
   break;
  default:
   break;
  }
  thisXDocument.UI.Alert(" IssuedTo = " + myCertificate.IssuedTo + "\n IssuedBy = " + myCertificate.IssuedBy + "\n ExpirationDate = " + myCertificate.ExpirationDate + "\n Status = " + status);
}

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, seeCertificate.

Use the Certificate property of the SignatureObject object to return a Certificate object.

Properties

ExpirationDate

Returns the expiration date of a digital certificate in the localized 'SHORTDATE' format.

(Inherited from Certificate)
IssuedBy

Returns the issuer of the digital certificate.

(Inherited from Certificate)
IssuedTo

Returns to whom the digital certificate is issued.

(Inherited from Certificate)
Status

Returns the status of the digital certificate.

(Inherited from Certificate)

Applies to