对程序进行数字签名以减少被安全软件屏蔽的几率

signtool

微软出品的signtool.exe是一个不足1M的命令行工具,自己制作代码签名证书或者购买,生成pfx/p12格式后,执行下面的命令行即可对自己开发的dll/exe等程序进行签名。购买证书也是挺贵的,一年几千块,如果是自己做的证书,需要把根证书加入系统的受信任的根证书列表。

signtool sign /f mycert.p12 /p 12345 /t http://timestamp.verisign.com/scripts/timstamp.dll myprogram.exe
输出:
Done Adding Additional Store
Successfully signed and timestamped: myprogram.exe

其中/t后面的时间戳服务器,表示由第三方来提供数字签名的时间,证明签名时间不是伪造。
以下这些都可用:
– http://timestamp.verisign.com/scripts/timstamp.dll
– http://timestamp.globalsign.com/scripts/timstamp.dll
– http://timestamp.comodoca.com/authenticode