• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

C# check if a file is signed

EmperorIQ

Platinum Member
Hi,

Does anyone know how to check if a file is signed, and to also look for the timestamp of that file in C#?

I am trying to code the same functionality that sigcheck.exe has, but in C#.

Thanks in advance!
 
Signed by anything. I just want to be able to have some function check any file and be able to tell you "yes" this file is digitally signed, or "no" this file isn't digitally signed.
 
There are code signing certs for EXEs, .Net assemblies and java applets that work similarly to SSL certs.

If you right-click on a signed EXE in Windows Explorer and choose Properties, you'll see a Digital Signatures tab.

But without RTFDocs I don't know what APIs (if any exist for Win32 or .Net) can be used to extract this information. I've only ever used the command-line tools to sign installs at work.
 
Originally posted by: DaveSimmons
There are code signing certs for EXEs, .Net assemblies and java applets that work similarly to SSL certs.

If you right-click on a signed EXE in Windows Explorer and choose Properties, you'll see a Digital Signatures tab.

But without RTFDocs I don't know what APIs (if any exist for Win32 or .Net) can be used to extract this information. I've only ever used the command-line tools to sign installs at work.

bummer, I was afraid of that. But that's what I was looking for. Instead of right clicking every file, and seeing if its digitally signed via properties, I was hoping taht I can have a tool that browses a folder.

SigCheck works fine, and I love it, but at work here, some people were complaining that command line tools aren't easy enough to use, so i was assigned the task of writing one with a UI. I think I am going to just create a wrapper around sigcheck.exe instead then.

Thanks!
 
Check out the System.IO.FileInfo class. I'm pretty sure you can change the attributes of the file that way. Here is a link with more Info.
 
Back
Top