问题
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