How to check if a file is signed in C#? [closed]
Assuming you want to check if a file is Authenticode signed and that the certificate is trusted you can pinvoke to WinVerifyTrust in Wintrust.dll. Below is a wrapper (more or less reproduced from here) that can be called as follows: AuthenticodeTools.IsTrusted(@”path\to\some\signed\file.exe”) Where AuthenticodeTools is defined as follows: internal static class AuthenticodeTools { [DllImport(“Wintrust.dll”, PreserveSig = … Read more