Skip to main content

Overview

Windows requires all drivers to be digitally signed before installation. This page covers signing requirements for development, testing, and production distribution.
Driver signing is a critical security feature. Never disable driver signature enforcement on production systems or distribute unsigned drivers.

Signing Methods

There are two main approaches to driver signing:
MethodUse CaseCertificate RequiredCost
Test SigningDevelopment and testingSelf-signed certificateFree
Production SigningPublic distributionEV Code Signing Certificate$$$

Test Signing for Development

When to Use Test Signing

Test signing is appropriate for:
  • Local development and debugging
  • Internal testing
  • Non-production environments
  • Learning driver development

Creating a Test Certificate

Use the Windows SDK tool MakeCert to create a test certificate:
# Open Developer Command Prompt for Visual Studio as Administrator

# Create a test certificate
makecert -r -pe -ss PrivateCertStore -n "CN=VDD Test Certificate" TestCert.cer
Parameters:
  • -r - Create self-signed certificate
  • -pe - Mark private key as exportable
  • -ss PrivateCertStore - Certificate store name
  • -n "CN=..." - Certificate subject name

Installing the Test Certificate

Install the certificate to the Trusted Root Certification Authorities store:
# Run as Administrator
certmgr.exe /add TestCert.cer /s /r localMachine root
certmgr.exe /add TestCert.cer /s /r localMachine trustedpublisher
Or use the Certificate Manager GUI:
  1. Run certmgr.msc as Administrator
  2. Right-click Trusted Root Certification Authorities → Certificates
  3. Select All TasksImport
  4. Browse to your .cer file and import
  5. Repeat for Trusted Publishers

Enabling Test Signing Mode

Test signing mode reduces system security. Only enable it on development/test machines, never on production systems.
Enable test signing on Windows:
# Run as Administrator
bcdedit /set testsigning on
Reboot your computer. After reboot, you’ll see “Test Mode” watermark on the desktop. To disable test signing:
bcdedit /set testsigning off
# Reboot required

Signing the Driver Package

Sign your compiled driver:
# Navigate to your build output directory
cd "Virtual Display Driver (HDR)\MttVDD\x64\Debug\MttVDD"

# Sign the catalog file
signtool sign /v /s PrivateCertStore /n "VDD Test Certificate" /t http://timestamp.digicert.com MttVDD.cat

# Sign the driver binary
signtool sign /v /s PrivateCertStore /n "VDD Test Certificate" /t http://timestamp.digicert.com MttVDD.dll
Parameters:
  • /v - Verbose output
  • /s PrivateCertStore - Certificate store name
  • /n "..." - Certificate subject name
  • /t http://... - Timestamp server URL

Verifying Signature

Check if signing was successful:
signtool verify /v /pa MttVDD.cat
signtool verify /v /pa MttVDD.dll

Production Signing

Requirements for Public Distribution

For publicly distributed drivers, you need:
  1. Extended Validation (EV) Code Signing Certificate
    • Must be from a Microsoft-trusted Certificate Authority
    • Hardware token (USB) required for EV certificates
    • Costs typically 200200-400/year
  2. Windows Hardware Compatibility Program
    • Submit driver to Microsoft Hardware Dev Center
    • Driver tested and signed by Microsoft (attestation signing)
    • Free but requires approval

Getting an EV Code Signing Certificate

Trusted certificate authorities include:
  • DigiCert
  • Sectigo (formerly Comodo)
  • GlobalSign
  • Entrust
Steps:
  1. Purchase EV Code Signing Certificate from CA
  2. Complete identity verification (requires legal business documents)
  3. Receive hardware token with certificate
  4. Install certificate on development machine

SignPath.io for Open Source Projects

The Virtual Display Driver project uses SignPath.io:
Free code signing on Windows is provided by SignPath.io, certificate by SignPath Foundation.
For open source projects:
  • Free code signing service
  • Integrates with GitHub Actions
  • Provides trusted certificates
  • See SignPath documentation for setup

Microsoft Hardware Dev Center Signing

Attestation Signing Process:
  1. Register:
  2. Prepare Driver Package:
    # Create .cab file for submission
    makecab MttVDD.inf MttVDD.cab
    
  3. Submit for Attestation:
    • Upload .cab file to Dev Center
    • Microsoft validates and signs the driver
    • Download signed package
  4. Distribution:
    • Microsoft-signed drivers install without test mode
    • Compatible with all Windows versions
Attestation-signed drivers work on Windows 10 version 1607 and later. For earlier versions, WHQL signing is required.

Signing in Visual Studio Build Process

Automatic Signing Configuration

Configure Visual Studio to automatically sign during build:
  1. Right-click project → Properties
  2. Navigate to Driver SigningGeneral
  3. Set Sign Mode to “Test Sign”
  4. Set Test Certificate to your certificate
  5. Apply and rebuild

Project File Configuration

The MttVDD project includes signing configuration:
<DriverSign>
  <FileDigestAlgorithm>SHA256</FileDigestAlgorithm>
</DriverSign>
  • Debug builds: SHA1 (faster, test signing)
  • Release builds: SHA256 (production standard)

ARM64 Signing Considerations

ARM64 drivers on Windows 11 24H2 or later may require test signing mode enabled, even with valid signatures.
For ARM64 Windows devices:
  1. Enable test signing mode (as described above)
  2. Sign driver with test certificate
  3. Alternatively, obtain Microsoft attestation signature

Signature Verification

Manual Verification

Check driver signature before installation:
# Verify catalog signature
signtool verify /v /pa MttVDD.cat

# Verify driver binary signature
signtool verify /v /pa MttVDD.dll

# Check signature details
signtool verify /v /pa /all MttVDD.dll

Windows UI Verification

  1. Right-click MttVDD.dllProperties
  2. Navigate to Digital Signatures tab
  3. Select signature and click Details
  4. Verify certificate chain and validity

Driver Installation Verification

After installation:
# Check driver signature status
pnputil /enum-drivers
Look for your driver and verify “Signed by” field.

Security Best Practices

Certificate Protection

Protect your code signing certificates like passwords. Compromised certificates can be used to sign malicious drivers.
Best practices:
  • Store EV certificates on hardware tokens only
  • Never share certificate private keys
  • Use certificate password protection
  • Limit certificate access to trusted build systems
  • Revoke compromised certificates immediately

Test Signing Security

  • Only enable test signing on isolated development machines
  • Disable test signing when not actively developing
  • Never distribute drivers signed with test certificates
  • Remove test certificates when development is complete

Timestamp Servers

Always use timestamp servers when signing: Recommended timestamp servers:
  • DigiCert: http://timestamp.digicert.com
  • Sectigo: http://timestamp.sectigo.com
  • GlobalSign: http://timestamp.globalsign.com
Why timestamp?
  • Signature remains valid after certificate expires
  • Proves signing time
  • Required for long-term validity

Troubleshooting

Error: “The signature is invalid”

Cause: Corrupted signature or certificate issue Solution:
  1. Re-sign with correct certificate
  2. Verify certificate is in Trusted Root
  3. Check timestamp server connectivity

Error: “Windows cannot verify the digital signature”

Cause: Test signing mode not enabled or untrusted certificate Solution:
  1. Enable test signing: bcdedit /set testsigning on
  2. Install certificate to Trusted Root and Trusted Publishers
  3. Reboot

Error: “The specified store to be opened cannot be found”

Cause: Certificate store name incorrect Solution: Verify certificate store name matches MakeCert command

Driver Installation Fails with Code 52

Cause: Signature verification failure Solution:
  1. Check Device Manager → Driver Properties → Events
  2. Verify signature with signtool verify
  3. Ensure all required certificates are installed
  4. Enable test signing if using test certificate

Next Steps

Building from Source

Build the driver before signing

Testing

Test your signed driver safely

Additional Resources

Build docs developers (and LLMs) love