XdCertificateStatus Enumeration
The XdCertificateStatus enumeration is used to determine the status of a digital certificate.
Namespace: Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly: Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)
Syntax
'Declaration
Public Enumeration XdCertificateStatus
'Usage
Dim instance As XdCertificateStatus
public enum XdCertificateStatus
Members
Member name | Description | |
---|---|---|
xdCertificateStatusError | The status of the specified digital certificate cannot be determined. | |
xdCertificateStatusValid | The specified digital certificate is valid. | |
xdCertificateStatusExpired | The specified digital certificate has expired. | |
xdCertificateStatusNotTrusted | The specified digital certificate is not trusted. | |
xdCertificateStatusRevoked | The specified digital certificate has been revoked. |
Remarks
These enumerated values are returned by the Status property.
Examples
public void CertificatePropertiesAlert()
{
Certificate certificate = thisXDocument.SignedDataBlocks[0].Signatures[0].Certificate;
string status = "UNKNOWN";
switch(certificate.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("Certificate Status = " + status);
}