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.
Looking at the MS example you linked if you encounter
TRUST_E_NOSIGNATUREthen you need to examineGetLastError()for a furtherTRUST_E_error code.Their logic for
TRUST_E_NOSIGNATUREalso includes;So it seems that an IO error could also cause this (a locked file could explain the intermittency) either way
GetLastError()should elucidate.