How can I verify SHA-2 signature of PE file?

0

I would like to verify SHA-2 authenticode digital signature of PE file on Windows platform.

I tried to verify a SHA-2 signature by using WinVerifyTrustEx(). WinVerifyTrustEx works fine on Windows 7. But WinVerifyTrustEx does not work on Windows Vista.

I used same codes on both Windows 7 and Windows Vista.

How can I verify SHA-2 signature on Window Vista?

[UPDATE]

WinVerifyTrustEx returns TRUST_E_NOSIGNATURE(0x800B0100) on Windows Vista.

WinVerifyTrustEx returns ERROR_SUCCESS on Windows 7.

I used same sample codes and verified the same executable file which is signed. The signed executable file has SHA-256 signature.

The difference is only OS (vista and 7).

When I tried to verify another executable file which is signed by SHA-1, WinVerifyTrustEx returns ERROR_SUCCESS on both Vista and 7.

winapi
signature
sha2
winverifytrust
asked on Stack Overflow Jun 29, 2015 by 橋本敬 • edited Jun 30, 2015 by Alex K.

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0