WinVerifyTrust 很少失败
我使用 winverifytrust 来验证签名。
我正在使用 WINTRUST_ACTION_GENERIC_VERIFY_V2 进行验证。但很少会返回“NO SIGNATURE FOUND”。我无法模拟这个问题。
我收到的反馈表明某些用户正在发生这种情况。一个反馈有一个日志,该日志指示对文件的第一次调用 WinVerifyTrust 成功,而对同一文件的第二次调用失败。
我使用的代码正是
http://msdn .microsoft.com/en-us/library/aa382384%28v=VS.85%29.aspx
知道是什么原因导致了失败。对同一文件的相同调用已经成功一次,然后又失败了。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
查看您链接的 MS 示例,如果您遇到
TRUST_E_NOSIGNATURE
,那么您需要检查GetLastError()
是否有进一步的TRUST_E_
错误代码。他们的
TRUST_E_NOSIGNATURE
逻辑还包括:因此,IO 错误似乎也可能导致这种情况(锁定的文件可以解释间歇性),无论哪种方式
GetLastError()
都应该阐明。Looking at the MS example you linked if you encounter
TRUST_E_NOSIGNATURE
then you need to examineGetLastError()
for a furtherTRUST_E_
error code.Their logic for
TRUST_E_NOSIGNATURE
also includes;So it seems that an IO error could also cause this (a locked file could explain the intermittency) either way
GetLastError()
should elucidate.当在 Windows Server 2008 上使用仅使用 SHA-256 签名的文件调用 WinVerifyTrust 时,会发生这种情况,
默认情况下,Server 2008 不支持该签名,它需要使用 SHA-1 的签名。
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.
http://winwiki.org/wiki/wikimeta.php? kw=Error+Trust_e_nosignature%280x800b0100%29
错误Trust_e_nosignature(0x800b0100)错误可能是由于Windows系统文件损坏引起的。
本文包含的信息向您展示如何(手动)和(自动)修复错误 Trust_e_nosignature(0x800b0100)。
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).