内容简介:前段时间写了个Windows平台的使用openssl生成一张自签证书通过以上命令生成一张名为 alert.pfx 的证书,在生成pfx文件时会要求你输入一些信息以及一个密码,改密码会在下面的签名过程中使用到。
前段时间写了个Windows平台的 自动报时程序 ,由于未添加签名所以在启动时总是会被提示为不被信任的程序,所以给程序添加了一个数字签名,这里记录下操作步骤。
使用openssl生成一张自签证书
openssl genrsa -out alert.key 2048 openssl req -new -x509 -days 365 -key alert.key -out alert.crt openssl pkcs12 -export -in alert.crt -inkey ca.key -out alert.pfx
通过以上命令生成一张名为 alert.pfx 的证书,在生成pfx文件时会要求你输入一些信息以及一个密码,改密码会在下面的签名过程中使用到。
下载微软的签名工具,地址: https://pan.baidu.com/s/1rBE2HDodwM4qa6gLX8RwNA ,密码为 tnsb 。
把签名 工具 和之前生成的签名文件,以及生成的可执行文件放到同一个文件夹中,之后进行签名
signtool.exe sign /f alert.pfx /p 上一步中的密码 /t http
://timestamp.verisign.com/scripts/timstamp.dll TimeAlert.exe
Done Adding Additional Store
Successfully signed and timestamped: TimeAlert.exe
至此我们就成功的给一个Windows程序添加了数字签名。
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Web Design Handbook
Baeck, Philippe de 编 / 2009-12 / $ 22.54
This non-technical book brings together contemporary web design's latest and most original creative examples in the areas of services, media, blogs, contacts, links and jobs. It also traces the latest......一起来看看 《Web Design Handbook》 这本书的介绍吧!