Search code examples
windowswinapikernelusbdriver

How to sign Windows 10 Device Drivers?


I've written a custom device driver for Windows 10, and have correctly signed the driver with an EV certificate issued to my company, following the build + signing directions issued by Microsoft.

Drivers are correctly signed.

I recently upgraded to the latest Windows 10 build, and in the process, Driver Signature Enforcement has been re-enabled.

However, even with the EV-cert signed drivers still being installed, I get the following error in Device Manager:

Device manager error

What is strange is I can install the driver just fine. Windows 10 doesn't prompt me with any warning that the driver is dangerous, has a bad signature, or is unsigned. However, the Device Manager still disables the device with the Error Code 52, noted in the picture.

Am I not doing something correctly? Does Windows 10/Microsoft require something beyond signing with a valid EV certificate? Do I need to actually send the drivers to Microsoft to get them approved or something? And if so, how do I do this?

The only way I can get these drivers to work in the device manager is to disable driver signature enforcement, but that's not a tenable solution for when I attempt to distribute the driver to customers.


Solution

  • As you noticed, the signature requirements that Windows checks when you install a driver package are different than the requirement it checks for loading a .sys file (kernel module) into the kernel. If your driver includes a .sys files, you will generally have to submit it to Microsoft's Windows Hardware Developer Center Dashboard portal to get it signed. Here's the announcement from Microsoft about that:

    https://techcommunity.microsoft.com/t5/windows-hardware-certification/driver-signing-changes-in-windows-10/ba-p/364859

    If you can just use drivers that come with Windows (e.g. WinUSB), that would be preferred, because those use kernel modules that are already signed by Windows, so all you have to do is meet the requirements for getting the driver package installed.

    I wrote a lot more about driver signing here:

    https://www.davidegrayson.com/signing/