[ofw] [PATCH] winof - sign executables used during install/uninstall

Smith, Stan stan.smith at intel.com
Thu Nov 12 15:46:07 PST 2009


Revision: 2558
Author: stansmith
Date: 3:19:40 PM, Thursday, November 12, 2009
Message:
[WINOF] remove windows 7 existance check as it's now a default OS. Sign .exe files used during a WinOF install to eliminate win7 popup notifiers asking to proceed. ndinstall.exe, installsp.exe for install, devman.exe on uninstall.
----
Modified : /gen1/trunk/WinOF/WIX/sign-all-drivers.bat

Signed-off-by: stan smith <stan.smith at intel.com>

--- a/WinOF/WIX/sign-all-drivers.bat
+++ b/WinOF/WIX/sign-all-drivers.bat    Thu Nov 12 11:09:36 2009
@@ -27,53 +27,95 @@
 rem set TS=noTimeStamp

 for %%p in ( win7 wlh wnet wxp ) do (
-       if exist %%p\bin\HCA (
-           echo %0 - Signing %%p drivers
-           pushd %%p
-           if ERRORLEVEL 1 (
-               echo %0 - Error Bad cd to %%p folder ?
-               exit /B 1
-           )
-           rem Sign free HCA drivers
-           call signDrivers %1 %2 bin\HCA %TS%
-           if ERRORLEVEL 1 (
-               echo %0 - Error signing %%p\bin\HCA drivers?
-               exit /B 1
-           )
-           rem Sign checked HCA drivers
-           call signDrivers %1 %2 bin\Chk\HCA %TS%
-           if ERRORLEVEL 1 (
-               echo %0 - Error signing %%p\bin\Chk\HCA drivers?
-               exit /B 1
-           )
+    echo %0 - Signing %%p drivers
+    pushd %%p
+    if ERRORLEVEL 1 (
+        echo %0 - Error in pushd %%p folder ?
+        exit /B 1
+    )
+    rem Sign free HCA drivers
+    call signDrivers %1 %2 bin\HCA %TS%
+    if ERRORLEVEL 1 (
+        echo %0 - Error signing %%p\bin\HCA drivers?
+        exit /B 1
+    )
+    rem Sign checked HCA drivers
+    call signDrivers %1 %2 bin\Chk\HCA %TS%
+    if ERRORLEVEL 1 (
+        echo %0 - Error signing %%p\bin\Chk\HCA drivers?
+        exit /B 1
+    )

-           rem Sign free: IPoIB & VNIC drivers
-           call signDrivers %1 %2 bin\net %TS%
-           if ERRORLEVEL 1 (
-               echo %0 - Error signing %%p\bin\net drivers?
-               exit /B 1
-           )
-           rem Sign checked: IPoIB & VNIC drivers
-           call signDrivers %1 %2 bin\Chk\net %TS%
-           if ERRORLEVEL 1 (
-               echo %0 - Error signing %%p\bin\Chk\net drivers?
-               exit /B 1
-           )
+    rem Sign free: IPoIB & VNIC drivers
+    call signDrivers %1 %2 bin\net %TS%
+    if ERRORLEVEL 1 (
+        echo %0 - Error signing %%p\bin\net drivers?
+        exit /B 1
+    )
+    rem Sign checked: IPoIB & VNIC drivers
+    call signDrivers %1 %2 bin\Chk\net %TS%
+    if ERRORLEVEL 1 (
+        echo %0 - Error signing %%p\bin\Chk\net drivers?
+        exit /B 1
+    )

-           rem Sign free SRP drivers
-           call signDrivers %1 %2 bin\storage %TS%
-           if ERRORLEVEL 1 (
-               echo %0 - Error signing %%p\bin\storage drivers?
-               exit /B 1
-           )
-           rem Sign checked SRP drivers
-           call signDrivers %1 %2 bin\Chk\storage %TS%
-           if ERRORLEVEL 1 (
-               echo %0 - Error signing %%p\bin\Chk\storage drivers?
-               exit /B 1
-           )
-           popd
+    rem Sign free SRP drivers
+    call signDrivers %1 %2 bin\storage %TS%
+    if ERRORLEVEL 1 (
+        echo %0 - Error signing %%p\bin\storage drivers?
+        exit /B 1
+    )
+    rem Sign checked SRP drivers
+    call signDrivers %1 %2 bin\Chk\storage %TS%
+    if ERRORLEVEL 1 (
+        echo %0 - Error signing %%p\bin\Chk\storage drivers?
+        exit /B 1
+    )
+       popd
+)
+
+rem sign executables used in installation so Win7 doesn't complain
+
+set TISTMP=/t http://timestamp.verisign.com/scripts/timstamp.dll
+set DU=/du http://www.openfabrics.org
+
+for %%p in ( win7 wlh wnet wxp ) do (
+       pushd %%p
+       echo.
+       echo Sign %%p Executables
+    for %%a in ( amd64 x86 ia64 ) do (
+               for %%f in ( bin\net\%%a\ndinstall.exe bin\net\%%a\installsp.exe ) do (
+                       if exist %%f (
+               signtool sign /ac %1 /n %2 %TISTMP% %DU% %%f
+               if ERRORLEVEL 1 (
+                       echo %0 signtool sign %%a\%%f failed?
+                                       popd
+                       exit /B 1
+               )
+               signtool verify /pa %%f
+               if ERRORLEVEL 1 (
+                       echo %0 signtool verify %%a\%%f failed?
+                                       popd
+                       exit /B 1
+               )
+                       )
+               )
+       )
+       popd
+)
+
+rem Sign devman.exe for win7 device cleanup operation.
+
+for %%a in ( x64 x86 ia64 ) do (
+       signtool verify /q /pa %%a\devman.exe
+       if ERRORLEVEL 1 (
+               signtool sign /ac %1 /n %2 %TISTMP% %DU% %%a\devman.exe
+               if ERRORLEVEL 1 (
+                       echo %0 signtool sign %%a\devman.exe failed?
+                       exit /B 1
+               )
        )
 )
+
 endlocal
 echo Done %0 %1





More information about the ofw mailing list