diff options
Diffstat (limited to '')
-rw-r--r-- | add_cert.bat | 10 | ||||
-rw-r--r-- | check_ddk.bat | 5 | ||||
-rw-r--r-- | sign.bat | 8 |
3 files changed, 6 insertions, 17 deletions
diff --git a/add_cert.bat b/add_cert.bat index ed42e52..e58bd63 100644 --- a/add_cert.bat +++ b/add_cert.bat @@ -5,20 +5,16 @@ @setlocal enabledelayedexpansion @echo off -set cert_store=Test Certificate Store -set cert_name=Test Certificate +set cert_name=windows_drivers echo ============================ CERT INFO ============================ -echo Certificate store: "%cert_store%" echo Certificate name: "%cert_name%" echo ========================== END CERT INFO ========================== echo. echo ======================= ADDING CERTIFICATE ======================== call check_ddk.bat || goto :add_cert_failure -echo makecert.exe -$ individual -r -pe -ss "%cert_store%" -n CN="%cert_name%" "%cert_name%.cer" -makecert.exe -$ individual -r -pe -ss "%cert_store%" -n CN="%cert_name%" "%cert_name%.cer" >nul || goto :add_cert_failure -echo certmgr.exe /add "%cert_name%.cer" /s /r localMachine root -certmgr.exe /add "%cert_name%.cer" /s /r localMachine root >nul || goto :add_cert_failure +echo makecert.exe -r -pe -ss root -n CN="%cert_name%" "%cert_name%.cer" +makecert.exe -r -pe -ss root -n CN="%cert_name%" "%cert_name%.cer" >nul || goto :add_cert_failure echo del "%cert_name%.cer" del "%cert_name%.cer" >nul || goto :add_cert_failure echo =================== ADDING CERTIFICATE SUCCESS ==================== diff --git a/check_ddk.bat b/check_ddk.bat index 2ddc666..00d5bfb 100644 --- a/check_ddk.bat +++ b/check_ddk.bat @@ -18,7 +18,6 @@ if not exist %root%\sign.bat ( where build.exe >nul 2>&1 || goto :build_not_found where signtool.exe >nul 2>&1 || goto :signtool_not_found where makecert.exe >nul 2>&1 || goto :makecert_not_found -where certmgr.exe >nul 2>&1 || goto :certmgr_not_found exit /b 0 :ddk_not_set @@ -36,7 +35,3 @@ exit /b 1 :makecert_not_found echo Error: makecert.exe not found ^(perhaps you forgot to set up the WinDDK environment^) exit /b 1 - -:certmgr_not_found -echo Error: certmgr.exe not found ^(perhaps you forgot to set up the WinDDK environment^) -exit /b 1 @@ -5,8 +5,7 @@ @setlocal enabledelayedexpansion @echo off -set cert_store=Test Certificate Store -set cert_name=Test Certificate +set cert_name=windows_drivers if [%1] == [] ( echo Usage: %0 SYS_PATH @@ -16,14 +15,13 @@ if [%1] == [] ( set sys_path=%~f1 echo ============================ CERT INFO ============================ -echo Certificate store: "%cert_store%" echo Certificate name: "%cert_name%" echo ========================== END CERT INFO ========================== echo. echo ============================= SIGNING ============================= call check_ddk.bat || goto :signing_failure -echo signtool.exe sign /s "%cert_store%" /n "%cert_name%" "%sys_path%" -signtool.exe sign /s "%cert_store%" /n "%cert_name%" "%sys_path%" >nul || goto :signing_failure +echo signtool.exe sign /s root /n "%cert_name%" "%sys_path%" +signtool.exe sign /s root /n "%cert_name%" "%sys_path%" >nul || goto :signing_failure echo signtool.exe verify /pa "%sys_path%" signtool.exe verify /pa "%sys_path%" >nul || goto :signing_failure echo ========================= SIGNING SUCCESS ========================= |