0

We have a .pfx and use the windows signtool to sign a DLL with it. I want to programmatically verify that the DLL is signed with our certificate when I load it. I use WinVerifyTrust, but that just verifies that is signed by a trusted publisher (I think). To verify that it is signed with our certificate, I think I should use CryptVerifyCertificateSignature. How do I create the "BLOB" of "CERT_SIGNED_CONTENT_INFO" from my DLL to pass to this function?

Or... is there a better or easier way to verify that the DLL is signed with our cert?

1 Answers1

0

Have a look at this answer: C# implementation to get SignedCms from signed file

If you would provide some more details - for instance programming language - the community would be able to help you further and answer more accurate :-)

Daniel Fisher lennybacon
  • 3,865
  • 1
  • 30
  • 38
  • Thanks, Daniel. Any language... Windows managed or unmanaged. I've been around a long, long time, but this whole trust, signing, etc. is a mystery to me – ElKabong Dec 01 '19 at 22:18
  • There is a Microsoft Support page illustration the WinAPI: https://support.microsoft.com/en-us/help/323809/how-to-get-information-from-authenticode-signed-executables – Daniel Fisher lennybacon Dec 05 '19 at 14:09