wodCrypt ActiveX Control - VerifyEXE Method
      
 

Description

Verifies signature of the signed executable.


Return Type

A Certificate object. If signature is correct, Certificate object will be returned.


Syntax

object.VerifyEXE Data


The VerifyEXE Method syntax has these parts:

Part Description
object An expression evaluating to an object of type wodCrypt.
Data Required. A Blob object. Contains signed executable.

Remarks

The VerifyEXE method checks if valid digital signature exists in Data blob. If such signature is found, VerifyEXE will try to perform various tests to make sure data has not been tampered with, signer's certificate has not expired, etc.. If signature is valid, this method will successfully return Certificate object containing reference to signer's certificate.

Performing verification is easy since there are no requirements for it - you should just load the file and call VerifyEXE on it. Like this:

Dim inblob As New FileBlob
inblob.FileName = "path.to.signed.dll"

Dim Crypt1 As New wodCryptCom
Dim cert As Certificate
Set cert = Crypt1.VerifyEXE(inblob)
If Not cert Is Nothing Then cert.Show "Signer's certificate"

Above code would produce an error if certificate is invalid.

You can use SignEXE method to sign the data, or any other external tool such as 'signcode.exe' program.