AddSignerToStore Method
Extracts the certificate of the entity which signed the message, and then places it into the storage which was specified earlier using the SelectSignerCertStore method.
[Visual Basic] blnResult = ObjectName.AddSignerToStore |
Parameters: | None | |
Return value As Boolean | True if successful, False if error has occurred. | |
Remarks: |
In the future (if the certificate of this sender is already available in the certificates storage), the authenticity of the sender which signed the message can be easily verified using the Verify method. |
Usage example:
' This example loads the signed message from file and adds the signer's certificate to the personal storage of the current user 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 ' Check if the message is signed and select the personal storage of the current user If objSMIME.Signed And (objSMIME.SelectSignerCertStore ("MY", REGISTRY_STORE)) Then ' Add the signer's certificate to the selected storage objSMIME.AddSignerToStore End If ' Check if any errors occurred If (objSMIME.SMIMEError <> 0) Or (objSMIME.SMIMESpecificError <> 0) Then ' Display the code of the last occurred error ' In ASP use Response.Write instead of MsgBox MsgBox "SMIMEError = " & objSMIME.SMIMEError & " SMIMESpecificError = " & _ objSMIME.SMIMESpecificError End If
See Also:
SelectSignerCertStore Method, Verify Method, AddRecipientCert Method
Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.