如何签署我的驱动程序以便它可以安装在 Windows 7 64 位上? [英] How to sign my driver so it will install on Windows 7 64-bit?
问题描述
我有一个内核模式驱动程序,我必须在 64 位 Windows 7 上安装 t.它需要进行数字签名.我使用 dseo13b.exe
对其进行了数字签名.但是当我加载驱动程序时,我在系统事件日志中收到一条错误消息:
I have a kernel mode driver and I have to install t on 64 bit Windows 7. It needs to be digitally signed. I digitally signed it using the dseo13b.exe
. But when I load the driver I get an error in the system event log saying:
由于以下错误,驱动程序无法启动:
Windows 无法验证此文件的数字签名.最近的硬件或软件更改可能安装了签名错误或损坏的文件,或者可能是来自未知来源的恶意软件.
The driver failed to start due to the following error:
Windows cannot verify the digital signature for this file. A recent hardware or software change might have installed a file that is signed incorrectly or damaged, or that might be malicious software from an unknown source.
我不想使用测试签名模式.我该如何解决?我需要从 Microsoft 获得证书吗?
I don't want to use the testsigning mode. How do I resolve this? Do I need to get a certificate from Microsoft?
我已经开发了驱动程序,现在让它在 64 位机器上运行......
I have developed the driver and am now making it work on the 64 bit machine...
推荐答案
仅适用于 64 位版本:设置自签名
Only for 64 bit builds: setting up self signing
第 1 部分:创建和安装测试证书
Part 1: creating and installing the test certificate
- 启动提升的命令行 shell(Vista 及更高版本).
- makecert.exe -r -pe -ss my -n "CN=MyTestCertificate" mytestcert.cer
- certmgr.exe -add mytestcert.cer -s -r localMachine root
- 启动 certmgr.exe 并检查MyTestCertificate"是否列在Personal"和Trusted Root Certification Authorities"下.
- 将 mytestcert.cer 文件保存在安全的地方.
第 2 部分:配置系统以运行测试签名代码(Vista 及更高版本)
Part 2: configuring the system to run test signed code (Vista and later)
- 启动提升的命令行 shell(Vista 及更高版本).
- 在提升的 cmd.exe 提示符下运行 Bcdedit.exe -set TESTSIGNING ON.
- certmgr.exe -add mytestcert.cer -s -r localMachine root
- certmgr.exe -add mytestcert.cer -s -r localMachine trustpublisher
- 重新启动.
- Vista:测试模式"将出现在桌面的所有四个角,Microsoft (R) Windows (R) (Build 6000)"将出现在顶部.Windows 7:Test ModeWindows 7Build 7600"将出现在右下角.
这篇关于如何签署我的驱动程序以便它可以安装在 Windows 7 64 位上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!