Edit

Share via


Certificate Class

Definition

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

public ref class Certificate abstract
public abstract class Certificate
type Certificate = class
Public MustInherit Class Certificate
Inheritance
Certificate

Examples

In the following example, the Status property of the Certificate class is used to determine the status and other information about the digital certificate used for the first signature on the first set of signed data (or for the entire form, if the entire form is configured to be signed), and display that information in a message box.

public void CertificateStatusAlert()
{
    Certificate myCertificate = 
       this.SignedDataBlocks[0].Signatures[0].Certificate;
    MessageBox.Show("IssuedTo: " + myCertificate.IssuedTo + 
        "\nIssuedBy: " + myCertificate.IssuedBy + 
        "\nExpirationDate: " + myCertificate.ExpirationDate + 
        "\nStatus: " + myCertificate.Status.ToString());
}
Imports Microsoft.VisualBasic.ControlChars
Public Sub CertificateStatusAlert()
    Dim myCertificate As Certificate = _
       Me.SignedDataBlocks(0).Signatures(0).Certificate
    MessageBox.Show("IssuedTo: " & myCertificate.IssuedTo & _
        NewLine & "IssuedBy: " & myCertificate.IssuedBy & _
        NewLine & "ExpirationDate: " & myCertificate.ExpirationDate & _
        NewLine & "Status: " + myCertificate.Status.ToString())
End Sub

Remarks

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

This type or member can be accessed only from code running in forms opened in Microsoft InfoPath Filler.

Constructors

Certificate()

Properties

ExpirationDate

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

IssuedBy

Gets the name of the issuer of the digital certificate.

IssuedTo

Gets the name of the user to whom the digital certificate was issued.

Status

Gets the status of the digital certificate as a CertificateStatus enumerated constant.

Applies to