OSRLogo
OSRLogoOSRLogoOSRLogo x Subscribe to The NT Insider
OSRLogo
x

Everything Windows Driver Development

x
x
x
GoToHomePage xLoginx
 
 

    Thu, 14 Mar 2019     118020 members

   Login
   Join


 
 
Contents
  Online Dump Analyzer
OSR Dev Blog
The NT Insider
The Basics
File Systems
Downloads
ListServer / Forum
  Express Links
  · The NT Insider Digital Edition - May-June 2016 Now Available!
  · Windows 8.1 Update: VS Express Now Supported
  · HCK Client install on Windows N versions
  · There's a WDFSTRING?
  · When CAN You Call WdfIoQueueP...ously

Test Signing Made Simple

Like so many things to do with writing drivers for WIndows, test signing drivers used to suck.  A lot.  But with the advent of the Win8 WDK, not only is it not so bad... it's pretty easy.

When you build your driver and Driver Package in the Win8 WDK, by default it signs your driver and package using a test certificate (that it actually generates for you) and spits out a nice package directory like this one:

package

It turns out this is some very handy stuff.

Grab *both* certificates and the Package and copy them over to your test machine.

On the test machine, add *both* certificates to:

  • The machine’s Trusted Root Certification Authority cert store
  • The machine’s Trusted Publishers cert store

Do this by right selecting *both* .cer files, and selecting “Install Certificate” – This runs the Certificate Import Wizard.  Select “Local Machine”, click next, agree to the request to elevate, select “Place all certificates in the following store” and select Browse to select the store you want.  You’ll need to do this twice, once for each cert store you want to add the certificates to.  Don’t forget to select *both* .cer files when you do this.

On the test machine, enable test signing using the BCDEDIT command (from an elevated command prompt window):

BCDEDIT /set TESTSIGNING ON

Reboot the test machine.

After rebooting, verify that the test machine has test signing enabled by issuing the BCDEDIT command and looking for “Testsigning Yes” in the output.  It’ll be buried in the list of stuff, NOT at the bottom of the list of stuff like it seems to be in all the MSFT examples.

Install the driver in the usual way – Use devcon, or select the device from Device Manager and right click and select “Update Driver” or run the Hardware Wizard (hdwwiz.exe) and do what it says.

Done.

bottom nav links