Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Checking digital signature programmatically

I have the exe for the project im working on signed by a digital signature which means when it asks for admin rights it shows the company name. This works very well but if you modify the exe it will still work and show unknown there instead.

Is there a way to check the digital signature to see if it is valid when you run the exe to avoid modified versions running?

Visual studio 2008 windows 7

like image 802
Lodle Avatar asked Jul 15 '09 09:07

Lodle


People also ask

How do you check if a file is digitally signed?

Open the file that contains the certificate you want to view. Click File > Info > View Signatures. In the list, on a signature name, click the down-arrow, and then click Signature Details.

How do you check if DLL is digitally signed?

Open the properties sheet for the . dll from Windows Explorer. If a tab "Digital Signatures" is shown, it's a signed assembly. If the tab is missing, it's unsigned.

How can I check if a signature is valid?

You can check the validity of a signature at any time. To do so, open the document in Adobe Acrobat or Adobe Reader. Click the Signature Panel icon then click “Validate All” then “OK”. The software will run a validation check to see if the digital certificate used to sign the document is valid.


1 Answers

Here is a sample program(it uses WinVerifyTrust function) that verifies signature, but I'm not sure that it will work under Windows 7. You should try it.

like image 183
Kirill V. Lyadvinsky Avatar answered Oct 03 '22 07:10

Kirill V. Lyadvinsky