Neh*_*eha 4 64-bit drivers kernel digital-signature
我有一个内核模式驱动程序,我必须在 64 位 win 7 上安装它。它需要进行数字签名。我使用 dseo13b.exe 对其进行了数字签名。但是当我加载驱动程序时,我在系统事件日志中收到错误消息
由于以下错误,驱动程序无法启动:Windows 无法验证此文件的数字签名。最近的硬件或软件更改可能安装了签名不正确或损坏的文件,或者可能是来自未知来源的恶意软件。
我不想使用测试签名模式。我该如何解决?我需要从 Microsoft 获得证书吗?
我已经开发了驱动程序,现在让它在 64 位机器上工作。
我的公司可能会从 verisign 购买证书,但是我获得证书后该怎么办。如何将驱动程序文件与我获得的证书相关联?以及如何将从 Internet 下载的交叉证书与我从 verisign 获得的证书相关联?我阅读了文档 KMSC_WalkThru (How to Release-Sign a Kernel Module),但这些内容并不清楚。你能帮忙吗。
另外我如何获得以下信息:
mySPCfile.spc Your public key certificate file.
myPVKfile.pvk Your private key certificate file.
myPVKpassword
Run Code Online (Sandbox Code Playgroud)
私钥证书文件的密码。在这里提到
是的,您需要从受信任的证书颁发机构购买证书。如果有人能做一个证书,那自称是“微软公司”的证书会数不胜数,简直就是病毒天堂。
你提到的那个文件是我用来学习如何签署驱动程序的文件。我强烈建议您留出几天时间,从头到尾完成它。我花了一周的大部分时间来完成它。
除此之外,我只能提供以下批处理文件,我在构建后从 VS2010 执行该批处理文件。它使用来自计算机证书存储区的证书,而不是文件。它如此复杂的原因是我在许多不同的项目中在许多不同的情况下使用它。
签到.bat
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Signs the project output.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Usage
::
:: Post-build event command line:
:: Call "$(ProjectDir)..\..\Sign.bat" "$(ConfigurationName)" "$(TargetPath)"
::
:: Run the post-build event:
:: When the build updates the project output
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Input Parameters
::
:: %~1 $(ConfigurationName) The file's configuration. This function will
:: use a different certificate for "Debug"
:: configurations.
:: %~2 $(TargetPath) The full path of the first file to sign.
:: %~3+ FileName The names of the remaining files to sign.
:: These files must reside in the same directory
:: as %2.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Validate the parameters.
If "%~1"=="Debug" Exit /B 0
If "%~1"=="" Goto Error
If "%~2"=="" Goto Error
Goto Valid
:Error
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Report that the syntax is incorrect.
Echo One or more parameters are missing.
Echo.
Echo %~nx0 configuration filename1 [filename2 ...]
Echo.
Echo configuration The project configuration. Usually "Debug" or "Release".
Echo filename1 The full path of the first file to sign.
Echo filename2 The names of addition files to sign. These files must
Echo reside in the same folder as "filename1".
Echo.
Exit /B 1
:Valid
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Change to the assembly's folder.
%~d2
CD %~dp2
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Prepare the list of files to sign.
Set FileList=
:CreateFileList
Set FileList=%FileList% %~snx2
Shift /2
If Not "%~2"=="" Goto CreateFileList
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Sign the assembly files.
Set Store=my
Set Certificate=type the name of your certificate here
Set TimeStampUrl=http://timestamp.verisign.com/scripts/timestamp.dll
C:\WinDDK\7600.16385.1\bin\x86\SignTool.exe Sign /s "%Store%" /n "%Certificate%" /t "%TimeStampUrl%" %FileList%
If %ErrorLevel%==1 Exit /B 1
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Verify the digital signature is valid.
C:\WinDDK\7600.16385.1\bin\x86\SignTool.exe Verify /pa %FileList%
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1689 次 |
| 最近记录: |