Skip to content

Commit 4f9cf32

Browse files
committed
feat: sign idd driver
1 parent ba2fefd commit 4f9cf32

6 files changed

Lines changed: 84 additions & 3 deletions

File tree

-2.12 KB
Binary file not shown.
Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
11
# Prebuilt Virtual Display Driver
22

3-
Place the following files here after building locally with `scripts\build_vdd_win.bat Release`:
3+
Place the following files here after building and signing:
44

5-
- `quickdesk_display.dll` — UMDF IDD driver binary
5+
- `quickdesk_display.dll` — UMDF IDD driver binary (EV signed)
66
- `quickdesk_display.inf` — Driver installation information file
7-
- `quickdesk_display.cat` — Driver catalog (signed)
7+
- `quickdesk_display.cat` — Driver catalog (EV signed, generated from signed DLL + INF)
88
- `nefconw.exe` — Nefarius device node management tool
99

1010
These files are bundled into the Windows installer by `publish_qd_win.bat`.
1111

1212
## How to update
1313

1414
```bat
15+
REM 1. Build the driver
1516
scripts\build_vdd_win.bat Release
1617
xcopy /Y output\x64\Release\drivers\vdd\* quickdesk-virtual-display\prebuilt\x64\
18+
19+
REM 2. Sign the DLL with your EV certificate
20+
signtool sign /fd sha256 /tr http://timestamp.digicert.com /td sha256 /sha1 <thumbprint> quickdesk-virtual-display\prebuilt\x64\quickdesk_display.dll
21+
22+
REM 3. Regenerate .cat (must be done AFTER signing DLL)
23+
scripts\gen_vdd_cat.bat
24+
25+
REM 4. Sign the .cat with the same EV certificate
26+
signtool sign /fd sha256 /tr http://timestamp.digicert.com /td sha256 /sha1 <thumbprint> quickdesk-virtual-display\prebuilt\x64\quickdesk_display.cat
1727
```
1828

1929
Then commit the updated binaries.
11.7 KB
Binary file not shown.
12 KB
Binary file not shown.
-2.08 KB
Binary file not shown.

scripts/gen_vdd_cat.bat

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
@echo off
2+
REM ---------------------------------------------------------------
3+
REM Generate .cat catalog for signed VDD driver
4+
REM
5+
REM Run this AFTER signing quickdesk_display.dll with your EV cert.
6+
REM The generated .cat must then also be signed with the same cert.
7+
REM
8+
REM Usage: gen_vdd_cat.bat [prebuilt dir]
9+
REM Default dir: quickdesk-virtual-display\prebuilt\x64
10+
REM
11+
REM Requires: WDK (inf2cat.exe)
12+
REM ---------------------------------------------------------------
13+
14+
echo=
15+
echo ---------------------------------------------------------------
16+
echo Generate VDD Catalog (.cat)
17+
echo ---------------------------------------------------------------
18+
19+
set script_path=%~dp0
20+
set driver_dir=%~1
21+
if "%driver_dir%"=="" set driver_dir=%script_path%..\quickdesk-virtual-display\prebuilt\x64
22+
23+
echo [*] driver dir: %driver_dir%
24+
25+
:: check required files exist
26+
if not exist "%driver_dir%\quickdesk_display.dll" (
27+
echo [!] error: quickdesk_display.dll not found in %driver_dir%
28+
exit /b 1
29+
)
30+
if not exist "%driver_dir%\quickdesk_display.inf" (
31+
echo [!] error: quickdesk_display.inf not found in %driver_dir%
32+
exit /b 1
33+
)
34+
35+
:: find inf2cat.exe
36+
set INF2CAT=
37+
for /f "delims=" %%i in ('where inf2cat.exe 2^>nul') do set INF2CAT=%%i
38+
if "%INF2CAT%"=="" (
39+
if exist "C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x86\inf2cat.exe" (
40+
set "INF2CAT=C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x86\inf2cat.exe"
41+
)
42+
)
43+
if "%INF2CAT%"=="" (
44+
echo [!] error: inf2cat.exe not found. Install WDK first.
45+
exit /b 1
46+
)
47+
echo [*] inf2cat: %INF2CAT%
48+
49+
:: delete old .cat
50+
if exist "%driver_dir%\quickdesk_display.cat" (
51+
del /q "%driver_dir%\quickdesk_display.cat"
52+
echo [*] removed old .cat
53+
)
54+
55+
:: generate catalog
56+
echo [*] generating catalog...
57+
"%INF2CAT%" /os:10_x64 /driver:"%driver_dir%"
58+
if %errorlevel% neq 0 (
59+
echo [!] inf2cat failed with error %errorlevel%
60+
exit /b 1
61+
)
62+
63+
if exist "%driver_dir%\quickdesk_display.cat" (
64+
echo [*] catalog generated: %driver_dir%\quickdesk_display.cat
65+
echo=
66+
echo [!] IMPORTANT: Now sign the .cat with your EV certificate:
67+
echo signtool sign /fd sha256 /tr http://timestamp.digicert.com /td sha256 /sha1 ^<thumbprint^> "%driver_dir%\quickdesk_display.cat"
68+
) else (
69+
echo [!] error: .cat file was not generated
70+
exit /b 1
71+
)

0 commit comments

Comments
 (0)