Question Locked

[C#] [.NET] [SECURITY] How to extract application (EXE, DLL...) certificate

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,

When looking in Windows Explorer for a specific file properties some of those have a new tab for digital certificate.
In this tab, we can see the detail of this certificate.

Is there a way to to the same thing using .NET 2.0 ?

Thanks,

Vincent

2 replies

by vincent.duvernet

Hi and thanks for the answer.
I'm going to have a look to this code.

During my searches, I've learned that Digital signature is just a bit more complicated.
There's digital certificate which is attached to file (PE) and I've got some code working on it and the security catalog of Windows.

Have a look to notepad.exe, it's a signed file using the security catalog. IE the digital certificate is not embbeded into file to save space & footprints.

Edit 1:
C Sample give more informations :
http://msdn.microsoft.com/en-us/library/aa382384.aspx
but certificate details is not shown.

Many functions are not documented in Wintrust.dll :
http://source.winehq.org/WineAPI/wintrust.html

Edit 2:
After trying this, same conclusion. It works only if certificate is attached to file.
(IE don't work with notepad.exe)

++
Vince

This discussion is closed to new replies.