Back to product page
VerifyEXE method
Verifies signature of the signed executable.
Type
A Certificate object. If signature is correct, Certificate object will be returned.Syntax
- Basic
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.You can use SignEXE method to sign the data, or any other external tool such as 'signcode.exe' program
Code sample
- Basic
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.
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.