How to verify .exe file digital signature?
I have a scenario where I should verify a .exe file digital signature through vbscript or QTP?
I tried using VerifyFile() function with "Scripting.Signer", WSH object whereas this function verifies only script files, not .exe files.
I came across three other ways:
1 - Install SignTool.exe & verify the digital signature at command prompt.
2 - Make use of the CryptoAPI - CRL & CTL functions (given in WSH help)
1- not feasible since I am not authorized to install Signtool.exe/any other tools on the test machine and not sure about the tool compatibility in Vista OS,
2- CryptoAPI functions, lotz of functions are available but not sure what and all functions I should use and how to use.
3 - DotNetFactory, excellent feature in QTP...where you can instantiate COM objects and make use the functions. Same problem, not getting what an all functions I should use and how to use.
My idea is... Get the file properties,if you have property which says digitally certified then thats great for me or get the file properties and input to cryptoapi functions thru DotNetFactory and get the details.
Appreciate for your thoughts/suggestions in this regard.