Status Property


Gets the status of the certificate upon verifying the message's signature.


Value Type: Long
Parameters: None 
Remarks:

MailBee supports the following status codes:

  • 0 - no errors
  • 1 - the certificate has an incorrect digital signature
  • 2 - the certificate is revoked
  • 3 - the certificate is signed by an untrusted authority
  • 4 - the certificate is expired
  • 5 - a chain of certificates was not correctly created
  • 6 - the revocation function was unable to check revocation because the revocation server was offline
  • 7 - another error.

The developer can get the Win32 code the certificate validation status using the Win32Status property. This property is especially usesful if you're getting Status = 7 ("another error").


Usage example:

' This example loads the message from file and verifies it.

Dim objSMIME, objMsg

' Using Visual Basic to create the objects
Set objMsg = CreateObject("MailBee.Message")
Set objSMIME = CreateObject("MailBee.SMIME")

' Using ASP to create the objects
'Set objMsg = Server.CreateObject("MailBee.Message")
'Set objSMIME = Server.CreateObject("MailBee.SMIME")

' Specify MailBee license key
objSMIME.LicenseKey = "put your license key here"

' Load the message from file
objMsg.ImportFromFile "mail_src.eml"

' Specify the message for the further processing
Set objSMIME.Message = objMsg

' Verify the message
objSMIME.Verify

' Check if any errors occurred
If (objSMIME.SMIMEError <> 0) Or (objSMIME.SMIMESpecificError <> 0) Then
    ' Display the code of the last occured 
    ' In ASP use Response.Write instead of MsgBox
    MsgBox "Status = " & objSMIME.SignerCert.Status & "   Win32Status = " & _
      objSMIME.SignerCert.Win32Status
End If

' Check if the message was verified successfully
If objSMIME.Verified Then
    MsgBox "This message is verified."
End If

See Also:

CertInfo Object

Win32Status Property


Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.