windows 生成数字证书

 1、创建一个自我签署的X.509证书(.cer)和一个.pvk私钥文件,用到makecert工具,命令如下:

makecert -r -n "CN=DKSOFT" -b 02/26/2014 -e 02/26/2014 -sv MyKey.pvk MyKey.cer

 2、 按提示设置私钥密码(也可以不使用密码)即可在当前目录生成相关文件

 3、利用X.509证书(.cer)创建发行者证书 (.spc),用到cert2spc工具,命令如下:

cert2spc MyKey.cer MyKey.spc

4、从.pvk和.spc格式转换成.pfx格式,用到pvk2pfx(C:/Program Files/Microsoft Visual Studio 10/vc/bin/),命令如下:

pvk2pfx -pvk MyKey.pvk -spc MyKey.spc -pfx MyKey.pfx -pi Password -f

 

 

/*****************************windows 64位驱动签名******************************/

 

windows vister X64系统开始,windows开始采用强制数字签名模式,在进行驱动测试过程中,提示windows无法验证此文件的数字签名。

 

测试过程中可采用两种方式

1、启用windows测试模式

命令:

bcdedit -set testsigning off  //windows测试模式

bcdedit -set testsigning on  //开启windows测试模式

 

2、可尝试使用64Signer V1.2.exe 对要测试驱动进行自身加签名,需注意,仅对本机有效

 

3、如果有正式签名,可使用签名进行对等校验签名认证(注,下方方式为代码演示)

 

C:\Users\*********\Desktop\c>signtool sign /v /ac MS_xs_UTN.crt /t http://timest
amp.wosign.com/timestamp Klogfor64.sys

The following certificates have been found to be suitable for signing:
Issued to: DKSOFT
Issued by: DKSOFT
Expires: Fri Jan 01 00:00:00 2010
SHA1 hash: E85441E1370BE07E8C1DB88F54F00CD80F01EF07

Issued to: DriverDevelop.com Signtools Test cert
Issued by: DriverDevelop.com CA
Expires: Tue Aug 13 11:02:01 2019
SHA1 hash: CED95F63BEBEF2CCC4E8AB9B3EA0883F41101415

Issued to: 53fb4eef7f78fc40e47ce5b06f57c106
Issued by: Alipay.com Corporation Machine CA
Expires: Fri Oct 23 15:08:17 2015
SHA1 hash: 4A602620157D1C966D40ADD713AA2C3230E7670F

SignTool Error: Multiple certificates were found that meet all the given
criteria. Use the /a option to allow SignTool to choose the best
certificate automatically or use the /sha1 option with the hash of the
desired certificate.
The following certificates meet all given criteria:
Issued to: DKSOFT
Issued by: DKSOFT
Expires: Fri Jan 01 00:00:00 2010
SHA1 hash: E85441E1370BE07E8C1DB88F54F00CD80F01EF07

Issued to: DriverDevelop.com Signtools Test cert
Issued by: DriverDevelop.com CA
Expires: Tue Aug 13 11:02:01 2019
SHA1 hash: CED95F63BEBEF2CCC4E8AB9B3EA0883F41101415

Issued to: 53fb4eef7f78fc40e47ce5b06f57c106
Issued by: Alipay.com Corporation Machine CA
Expires: Fri Oct 23 15:08:17 2015
SHA1 hash: 4A602620157D1C966D40ADD713AA2C3230E7670F

windows 生成数字证书,布布扣,bubuko.com

windows 生成数字证书

上一篇:cad怎么导入excel表格?把excel表格导入cad的教程


下一篇:windows常用操作按键