Verifying Authenticode signed executables and DLLs using OpenSSL API

寵の児 提交于 2019-12-05 12:47:33

You should use the PKCS7_verify function to verify the whole PKCS #7 signedData block.

You need two steps to completely verify the signature (see Microsoft specs):

  1. Verify the integrity and identity of the PKCS #7 signature.
  2. Calculate the Message Digest and compare it to the one specified in the signature.

Note that the digest is not limited to SHA-1 in the specs. The digest algorithm is contained in digestAlgorithm field in the signature.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!