diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2015-05-06 22:22:41 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2015-05-06 22:22:41 +0300 |
commit | 116d1ede0cc0d5d57f593264251668531252c74b (patch) | |
tree | ab4618829e4ab95e231e059133b8b7d1533ab6c2 /sign.bat | |
download | windows7-drivers-116d1ede0cc0d5d57f593264251668531252c74b.tar.gz windows7-drivers-116d1ede0cc0d5d57f593264251668531252c74b.zip |
initial commit
Diffstat (limited to '')
-rw-r--r-- | sign.bat | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sign.bat b/sign.bat new file mode 100644 index 0000000..a49bc39 --- /dev/null +++ b/sign.bat @@ -0,0 +1,29 @@ +@setlocal enabledelayedexpansion +@echo off + +set cert_store=Test Certificate Store +set cert_name=Test Certificate + +if [%1] == [] ( + echo Usage: %0 SYS_PATH + exit /b 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 ============================= +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 verify /pa "%sys_path%" +signtool.exe verify /pa "%sys_path%" >nul || goto :signing_failure +echo ========================= SIGNING SUCCESS ========================= +exit /b 0 + +:signing_failure +echo ========================= SIGNING FAILURE ========================= +exit /b %errorlevel% |