WinVerifyTrust fails rarely

4k views Asked by At

I use winverifytrust to validate signature.

I am verifying using WINTRUST_ACTION_GENERIC_VERIFY_V2. But rarely it has returned "NO SIGNATURE FOUND". I am unable to simulate the issue.

I am getting feedback that this is happening in some users. One feedback has a log which indicates that the 1st call to WinVerifyTrust for a file succeeds and the second call to the same file has failed.

The code i used is exactly

http://msdn.microsoft.com/en-us/library/aa382384%28v=VS.85%29.aspx

Any idea what may have caused the failure. Same call to the same file has succeeded once and failed next.

3

There are 3 answers

0
dockd On

This happens when calling WinVerifyTrust on Windows Server 2008 with a file signed with only SHA-256,

which isn't supported by default on Server 2008, it expects signatures that use SHA-1.

0
Alex K. On

Looking at the MS example you linked if you encounter TRUST_E_NOSIGNATURE then you need to examine GetLastError() for a further TRUST_E_ error code.

Their logic for TRUST_E_NOSIGNATURE also includes;

 else 
 {
   // The signature was not valid or there was an error 
   // opening the file.

So it seems that an IO error could also cause this (a locked file could explain the intermittency) either way GetLastError() should elucidate.

0
shaoheng On

http://winwiki.org/wiki/wikimeta.php?kw=Error+Trust_e_nosignature%280x800b0100%29

The Error Trust_e_nosignature(0x800b0100) error may be caused by windows system files damage.

This article contains information that shows you how to fix Error Trust_e_nosignature(0x800b0100) both (manually) and (automatically).