您的位置:首页 > 其它

数字签名.sys文件的步骤

2015-09-28 18:03 281 查看
------------------------------------------------------------------------------

1. 双击MSCrossCert.crt文件,然后点击install certificat,一路安装到底

2. 安装Windows6.1-KB3033929-x64补丁(不清楚是否必须,反正我安装了)

3. 注意使用/t 增加时间戳(估计是那个白痴在证书生成的时候,没有使用RFC 3161标准),时间参数DLL里,有没有tim(e)的这个e都可以

------------------------------------------------------------------------------

1. 其它碰到的问题,VS在QT大项目里导入调用InstallDriver函数的时候,死活编译通不过,而新建VS的QT项目调用这个函数就没有任何问题。估计是.vcxproj里的内容太旧了,有些设置无法通过VS的菜单改变,因此死活不行(因为抬头就是iso-1052,另外还留下许多qt4的信息)。必须重新生成新项目,然后导入现有的类,但是又产生了一个新问题。算了,放弃!不得不换到Qt Creator,一切顺利编译通过。

2. 调用sys里的函数时,在createfile之前,要installdriver

3. installdriver时,一定要有admin权限

4. 注意注册码必须是unicode的问题

5. 安装只需一次,最好做在安装包里

6. 出了问题,可以使用eventvwr.exe查看Windows/System日志

7. 设备名称必须以\\开头,可以用WinObj查看

8. SERVICE_STATUS.dwCurrentState必须等于4(处于启动状态)

------------------------------------------------------------------------------

疑团:安装驱动必须有admin权限,但是安装完调用普通函数还需要admin权限吗?

------------------------------------------------------------------------------

查看Windows的证书:certmgr.msc

使用“证书管理器”的提示

证书存储在“证书 - 当前用户”下的文件夹中。可能需要在文件夹中搜索才能找到正在查找的证书。

打开证书文件夹时,将在右窗格中显示证书以及有关这些证书的某些详细信息。“预期目的”栏会告诉您每个证书的用途。

可以使用同一密钥或不同密钥申请新证书,也可以导出或导入证书。若要执行其中任一操作,请单击证书,单击“操作”菜单,指向“所有任务”,然后单击与要执行的操作对应的命令。

------------------------------------------------------------------------------

数字证书原理(详细):http://www.cnblogs.com/jeffreysun/archive/2010/06/24/1627247.html

------------------------------------------------------------------------------

开发的时候,可以屏蔽数字签名:
https://support.globalsign.com/customer/en/portal/articles/1491089
下载 Kernel-Mode Code Signing Walkthrough:

How to Disable Signature Enforcement during Development

During the early stages of development, developers can disable enforcement in Windows so that driver signing is unnecessary. The following options are available for developers to temporarily disable kernel-mode code-signing enforcement so that Windows Vista will load an unsigned driver.

Attaching a kernel debugger. Attaching an active kernel debugger to the target computer disables the enforcement of kernel-mode signatures in Windows Vista and allows the driver to load.

Using the F8 option. An F8 Advanced Boot Option introduced with Windows Vista—“Disable Driver Signature Enforcement”—is available to disable the kernel-signing enforcement only for the current boot session. This setting does not persist across boot sessions.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: