What is the best way to check programatically if DLL/EXE file is signed with authenticode?

白昼怎懂夜的黑 提交于 2019-12-13 15:20:16

问题


I do not want to verify the certificate. I want to use this on a build server to check all files and list the one that we may have forgot to sign.


回答1:


How about using the Get-AuthenticodeSignature PowerShell cmdlet? The description says:

If the file is not signed, the information is retrieved, but the fields are blank.




回答2:


There is a way:

The WinVerifyTrust API can be used to verify the signature of a portable executable file.

(source)




回答3:


Also you can use node implementation of WinVerifyTrust API vid npm package sign-check:

npm install -g sign-check
sign-check 'path/to/file'


来源:https://stackoverflow.com/questions/5555214/what-is-the-best-way-to-check-programatically-if-dll-exe-file-is-signed-with-aut

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