Chinaunix首页 | 论坛 | 博客
  • 博客访问: 26771
  • 博文数量: 10
  • 博客积分: 245
  • 博客等级: 二等列兵
  • 技术积分: 120
  • 用 户 组: 普通用户
  • 注册时间: 2012-08-08 09:38
文章分类

全部博文(10)

文章存档

2012年(10)

我的朋友

分类: WINDOWS

2012-09-06 09:10:22

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. 1 :
  2. C:\_passthru_pp_sign>makecert -r -pe -ss passthru_pp_CertStore -n CN=passthru_pp.com(zc) passthru_pp.cer
  3. Succeeded

  4. ==> 看到 passthru_pp.cer 生成


  5. 2:
  6. C:\_passthru_pp_sign>Inf2cat.exe /driver:C:\_passthru_pp_sign /os:Server2008_x64

  7. .................................
  8. Signability test complete.

  9. Errors:
  10. None

  11. Warnings:
  12. None

  13. Catalog generation complete.
  14. C:\_passthru_pp_sign\zcpassthru_amd64.cat

  15. ==> 看到 zcpassthru_amd64.cat 生成


  16. 3:
  17. 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
  18. The following certificate was selected:
  19.     Issued to: passthru_pp.com(zc)
  20.     Issued by: passthru_pp.com(zc)
  21.     Expires: Sun Jan 01 07:59:59 2040
  22.     SHA1 hash: 131AB6B4CB81AC37F3DA7C3760B062494D87BBAE

  23. Done Adding Additional Store
  24. Successfully signed and timestamped: zcpassthru_amd64.cat

  25. Number of files successfully Signed: 1
  26. Number of warnings: 0
  27. Number of errors: 0


  28. 4:
  29. C:\_passthru_pp_sign>certmgr.exe /add passthru_pp.cer /s /r localMachine root
  30. CertMgr Succeeded


  31. 5:
  32. 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
  33. The following certificate was selected:
  34.     Issued to: passthru_pp.com(zc)
  35.     Issued by: passthru_pp.com(zc)
  36.     Expires: Sun Jan 01 07:59:59 2040
  37.     SHA1 hash: 131AB6B4CB81AC37F3DA7C3760B062494D87BBAE

  38. Done Adding Additional Store
  39. Successfully signed and timestamped: passthru.sys

  40. Number of files successfully Signed: 1
  41. Number of warnings: 0
  42. Number of errors: 0


  43. // --> --> --> --> --> --> --> --> --> --> --> --> --> --> --> --> --> --> --> --> -->

  44. Client :

  45. 1):
  46. C:\_passthru_cert>certmgr.exe /add passthru_pp.cer /s /r localMachine root
  47. CertMgr Succeeded


  48. 2):
  49. C:\_passthru_cert>certmgr.exe /add passthru_pp.cer /s /r localMachine trustedpublisher
  50. CertMgr Succeeded

阅读(1622) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~