1、创建目录 C:\_passthru_pp_sign 。
2、WDK7 --> Win2008 --> x64 Checked Build Environment 进入上面目录,输入下面的命令 :
“
C:\_passthru_pp_sign>makecert -r -pe -ss passthru_pp_CertStore -n CN=passthru_pp.com(zc) passthru_pp.cer
”
此时生成了 passthru_pp.cer 。
(上面语句,执行多遍,会在 certmgr.msc 里面看到多个... 我这里对于多个重复的我是直接手动删掉的...)
3、copy两个inf过来,并修改。
4、将编译好的 passthru.sys 复制过来。
5、执行命令 :
“C:\_passthru_pp_sign>Inf2cat.exe /driver:C:\_passthru_pp_sign /os:Server2008_x64”
看到 zcpassthru_amd64.cat 生成 。
6、执行语句 :
“
C:\_passthru_pp_sign>Signtool sign /v /s passthru_pp_CertStore /n passthru_pp.com(zc) /t zcpassthru_amd64.cat
”
如果,上面的 步骤2 执行了多遍,产生了多个同名证书,这一步会因为证书有多个而不知道用哪个,从而报错..
7、“
C:\_passthru_pp_sign>certmgr.exe /add passthru_pp.cer /s /r localMachine root
”
8、“
C:\_passthru_pp_sign>Signtool sign /v /s passthru_pp_CertStore /n passthru_pp.com(zc) /t passthru.sys
”
// ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==>
client : (待测试机,创建文件夹 C:\_passthru_cert)
1)、将 passthru_pp.cer 和 64位的certmgr.exe 复制到文件夹 ;管理员cmd 进入目录。
2)、命令 :
“
certmgr.exe /add passthru_pp.cer /s /r localMachine root
”
然后 :
“
certmgr.exe /add passthru_pp.cer /s /r localMachine trustedpublisher
”
再然后 :
“
bcdedit.exe /set TESTSIGNING ON
” (这一步做过了的话就不要在做了,没做过的话 ,记得需要 机器重启)
3、装 passthru.sys
// <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <==
贴上命令效果 :
- 1 :
- C:\_passthru_pp_sign>makecert -r -pe -ss passthru_pp_CertStore -n CN=passthru_pp.com(zc) passthru_pp.cer
- Succeeded
- ==> 看到 passthru_pp.cer 生成
- 2:
- C:\_passthru_pp_sign>Inf2cat.exe /driver:C:\_passthru_pp_sign /os:Server2008_x64
- .................................
- Signability test complete.
- Errors:
- None
- Warnings:
- None
- Catalog generation complete.
- C:\_passthru_pp_sign\zcpassthru_amd64.cat
- ==> 看到 zcpassthru_amd64.cat 生成
- 3:
- C:\_passthru_pp_sign>Signtool sign /v /s passthru_pp_CertStore /n passthru_pp.com(zc) /t http://timestamp.verisign.com/scripts/timestamp.dll zcpassthru_amd64.cat
- The following certificate was selected:
- Issued to: passthru_pp.com(zc)
- Issued by: passthru_pp.com(zc)
- Expires: Sun Jan 01 07:59:59 2040
- SHA1 hash: 131AB6B4CB81AC37F3DA7C3760B062494D87BBAE
- Done Adding Additional Store
- Successfully signed and timestamped: zcpassthru_amd64.cat
- Number of files successfully Signed: 1
- Number of warnings: 0
- Number of errors: 0
- 4:
- C:\_passthru_pp_sign>certmgr.exe /add passthru_pp.cer /s /r localMachine root
- CertMgr Succeeded
- 5:
- C:\_passthru_pp_sign>Signtool sign /v /s passthru_pp_CertStore /n passthru_pp.com(zc) /t http://timestamp.verisign.com/scripts/timestamp.dll passthru.sys
- The following certificate was selected:
- Issued to: passthru_pp.com(zc)
- Issued by: passthru_pp.com(zc)
- Expires: Sun Jan 01 07:59:59 2040
- SHA1 hash: 131AB6B4CB81AC37F3DA7C3760B062494D87BBAE
- Done Adding Additional Store
- Successfully signed and timestamped: passthru.sys
- Number of files successfully Signed: 1
- Number of warnings: 0
- Number of errors: 0
- // --> --> --> --> --> --> --> --> --> --> --> --> --> --> --> --> --> --> --> --> -->
- Client :
- 1):
- C:\_passthru_cert>certmgr.exe /add passthru_pp.cer /s /r localMachine root
- CertMgr Succeeded
- 2):
- C:\_passthru_cert>certmgr.exe /add passthru_pp.cer /s /r localMachine trustedpublisher
- CertMgr Succeeded
阅读(1622) | 评论(0) | 转发(0) |