Question

Locked

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

By vincent.duvernet ·
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

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Wow I thought I'd broke google

by Tony Hopkinson In reply to [C#] [.NET] [SECURITY] Ho ...

Took a fair bit if f'ing about to ask the right question, but I did find this as starter

http://geekswithblogs.net/robp/archive/2007/05/04/112250.aspx

Interesting question, and I'm going to remember the answer.

PS eventually I googled WinverifyTrust C#. The first bit was far from obvious.....

Collapse -

That's a good way

by vincent.duvernet In reply to Wow I thought I'd broke ...

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

Back to Windows Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums