From: stansmith Date: Tue, 9 Sep 2008 16:07:21 +0000 (+0000) Subject: [WinOF] Driver (.cat) & .msi signing is correctly working with OFA certificate &... X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=7b12f0903804d85bad3875a3a40e2f4003ad86a8;p=~shefty%2Frdma-win.git [WinOF] Driver (.cat) & .msi signing is correctly working with OFA certificate & MS CA cert. git-svn-id: svn://openib.tc.cornell.edu/gen1@1576 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/branches/WOF2-0/branches/WinOF/WIX/CustomActions.vbs b/branches/WOF2-0/branches/WinOF/WIX/CustomActions.vbs index 017c867e..150240c9 100644 --- a/branches/WOF2-0/branches/WinOF/WIX/CustomActions.vbs +++ b/branches/WOF2-0/branches/WinOF/WIX/CustomActions.vbs @@ -702,17 +702,8 @@ Function DriverInstall() ' rescan system buses Return = WshShell.Run (devman & "rescan", 0, true) - ' Display error number and description if applicable - If Err Then ShowError - If Return <> 0 Then - msgbox "Driver Install - failed device rescan? " & Return & " Err "_ - & Err - DriverInstall=ERROR_INSTALL_FAILURE - Exit Function - End if ' Install HCA (Host Channel Adapter) Driver(s) - DrvInstalled = false ' what HCAs are selected to install? diff --git a/branches/WOF2-0/branches/WinOF/WIX/build-all-MSI.bat b/branches/WOF2-0/branches/WinOF/WIX/build-all-MSI.bat index 651b6881..c6648f6b 100644 --- a/branches/WOF2-0/branches/WinOF/WIX/build-all-MSI.bat +++ b/branches/WOF2-0/branches/WinOF/WIX/build-all-MSI.bat @@ -3,16 +3,17 @@ setlocal rem Build WIX installers (.msi) for 'all' architectures & Operating environments rem rem usage: -rem %0 cmd Signing-Certificate-FileName CertPassword {dest-path-for-msi-files} +rem %0 cmd Signing-Certificate-FileName CertSubjectName {dest-path-for-msi-files} rem cmd - if 'msi' then assume drivers already signed, only sign .msi rem otherwise sign all drivers and installers (.msi files) rem CertFilename is indeed a filename only, we prefix ...\WIX before +rem CertName - see /n switch rem passing it down. rem *** REQUIRES nmake, common invocation from Visual C or WDK command window rem *** Assumes current folder is WIX\ -set USE=usage %0 all/msi Certificate-FileName CertPassword {dest-path-for-msi-files} +set USE=usage %0 all/msi Certificate-FileName CertSubjName[see signtool /n] {dest-path-for-msi-files} if "%1" == "" ( echo %0: %USE% @@ -37,8 +38,8 @@ if NOT EXIST %2 ( exit /B 1 ) -rem need a password -if "%3" == "" ( +rem need a Cert subject name string - name is passed in quoted! +if %3 == "" ( echo %0: %USE% exit /B 1 ) @@ -99,7 +100,7 @@ for %%o in ( wlh wnet wxp ) do ( if exist %DST%\WOF_%%o_%%a.msi ( echo Signing installer %DST%\WOF_%%o_%%a.msi - signtool sign /a /f %CD%\%2 /p %3 %TS% %DST%\WOF_%%o_%%a.msi + signtool sign /ac %CD%\%2 /n %3 %TS% %DST%\WOF_%%o_%%a.msi if ERRORLEVEL 1 ( echo %0 signtool sign %DST%\WOF_%%o_%%a.msi failed? exit /B 1 diff --git a/branches/WOF2-0/branches/WinOF/WIX/sign-all-drivers.bat b/branches/WOF2-0/branches/WinOF/WIX/sign-all-drivers.bat index f6e1bd74..2d8b2070 100644 --- a/branches/WOF2-0/branches/WinOF/WIX/sign-all-drivers.bat +++ b/branches/WOF2-0/branches/WinOF/WIX/sign-all-drivers.bat @@ -3,7 +3,7 @@ setlocal rem rem Digitally sign all drivers for all OSes & architectures. rem -rem example - sign-all-drivers CertFilename CertPassword {noTimeStamp} +rem example - sign-all-drivers CertFilename CertSubjName {noTimeStamp} rem see TS below. rem @@ -18,8 +18,8 @@ if not EXIST %1 ( exit /B 1 ) -if "%2" == "" ( - echo %0 - Missing Cert Password? +if %2 == "" ( + echo %0 - Missing Cert Subject name? exit /B 1 ) diff --git a/branches/WOF2-0/branches/WinOF/WIX/wlh/ia64/wof.wxs b/branches/WOF2-0/branches/WinOF/WIX/wlh/ia64/wof.wxs index bf3ca172..e1d9ab40 100644 --- a/branches/WOF2-0/branches/WinOF/WIX/wlh/ia64/wof.wxs +++ b/branches/WOF2-0/branches/WinOF/WIX/wlh/ia64/wof.wxs @@ -3,7 +3,7 @@ WinOF (Windows OpenFabrics) for IA64/IPF Itanium on Windows Server 2008 --> - - + System='yes' Part='last' Value='[INSTALLDIR]' /> + + + + DiskId="1" Name="TTCP.EXE" + Source="..\bin\tools\ia64\release\ttcp.exe" /> + DiskId="1" Name="CMTEST.EXE" + Source="..\bin\tools\ia64\release\cmtest.exe" /> + LongName="ib_limits.exe" Name="IB_LIMI.EXE" + Source="..\bin\tools\ia64\release\ib_limits.exe" /> + LongName="ib_read_bw.exe" Name="IB_READ.EXE" + Source="..\bin\tools\ia64\release\ib_read_bw.exe" /> + LongName="ib_read_lat.exe" Name="IB_READ1.EXE" + Source="..\bin\tools\ia64\release\ib_read_lat.exe" /> + LongName="ib_send_bw.exe" Name="IB_SEND.EXE" + Source="..\bin\tools\ia64\release\ib_send_bw.exe" /> + LongName="ib_send_lat.exe" Name="IB_SEND1.EXE" + Source="..\bin\tools\ia64\release\ib_send_lat.exe" /> + LongName="ib_write_bw.exe" Name="IB_WRIT.EXE" + Source="..\bin\tools\ia64\release\ib_write_bw.exe" /> + LongName="ib_write_lat.exe" Name="IB_WRIT1.EXE" + Source="..\bin\tools\ia64\release\ib_write_lat.exe" /> + LongName="ibtrapgen.exe" Name="IBTRAPG.EXE" + Source="..\bin\tools\ia64\release\ibtrapgen.exe" /> + LongName="osmtest.exe" Name="OSMTEST.EXE" + Source="..\bin\tools\ia64\release\osmtest.exe" /> + LongName="PrintIP.exe" Name="PRINTIP.EXE" + Source="..\bin\tools\ia64\release\PrintIP.exe" /> @@ -248,10 +253,10 @@ ---> +--> @@ -382,8 +387,6 @@ End Remove --> - @@ -459,6 +462,9 @@ End Remove --> Source="..\bin\bin\user\objchk_wlh_ia64\ia64\opensm.exe" /> + diff --git a/branches/WOF2-0/branches/WinOF/WIX/wlh/signDrivers.bat b/branches/WOF2-0/branches/WinOF/WIX/wlh/signDrivers.bat index 43218c31..8ed0d38c 100644 --- a/branches/WOF2-0/branches/WinOF/WIX/wlh/signDrivers.bat +++ b/branches/WOF2-0/branches/WinOF/WIX/wlh/signDrivers.bat @@ -3,9 +3,9 @@ setlocal rem Sign device drivers for architectures specified -rem usage: signDrivers CertFilename password path-2-drivers {noTimeStamp} +rem usage: signDrivers CertFilename CertSubjectName path-2-drivers {noTimeStamp} -rem example: signDirvers cse1CStore bin\hca +rem example: signDirvers cse1CStore TestCert bin\hca rem cmd.exe /V:on (delayed environment variable expansion) is required! @@ -22,7 +22,7 @@ set DU=/du www.openfabrics.org set Usage='usage: signDrivers CertFilename password path-2-drivers {noTimeStamp}' if "%1" == "" ( - echo %0 - missing CertName file? + echo %0 - missing CertFileName? echo %0 - %Usage% exit /B 1 ) @@ -33,18 +33,13 @@ if not EXIST %1 ( exit /B 1 ) -if "%2" == "" ( - echo %0 - missing Cert FileName password? +rem %2 is already quoted. +if %2 == "" ( + echo %0 - missing Cert Subject Name? echo %0 - %Usage% exit /B 1 ) -if "%2" == "nopassword" ( - set PWD= -) else ( - set PWD=/p %2 -) - if "%3" == "" ( echo %0 - missing path-2-driver files? echo %0 - %Usage% @@ -92,24 +87,6 @@ for %%d in (amd64 x86 ia64) do ( if "%%d" == "x86" set OEA=%OE%_X86,Vista_X86 if "%%d" == "ia64" set OEA=%OE%_IA64 - echo %0 - Signing %%d .sys driver files for !OEA! - - for %%f in ( *.sys ) do ( - echo %0 - Signing %%d\%%f - signtool sign /a /f %1 %PWD% %TS% %DU% %%f - if ERRORLEVEL 1 ( - echo %0 signtool sign %%f failed? - echo %0 file %CD%\%%f - exit /B 1 - ) - signtool verify /kp %%f - if ERRORLEVEL 1 ( - echo %0 signtool verify %%f failed? - echo %0 file %CD%\%%f - exit /B 1 - ) - ) - echo %0 - Generating %%d .cat files for !OEA! inf2cat /driver:%CD%\%%d /os:!OEA! if ERRORLEVEL 1 ( @@ -119,7 +96,7 @@ for %%d in (amd64 x86 ia64) do ( echo %0 - Signing %%d .cat files for %%f in ( *.cat ) do ( echo %0 - Signing %%d\%%f - signtool sign /a /f %1 %PWD% %TS% %DU% %%f + signtool sign /ac %1 /n %2 %TS% %DU% %%f if ERRORLEVEL 1 ( echo %0 signtool sign %%f failed? echo %0 file %CD%\%%f @@ -131,7 +108,6 @@ for %%d in (amd64 x86 ia64) do ( echo %0 file %CD%\%%f exit /B 1 ) -rem echo %0 - Successfully Signed %%d\%%f ) popd ) diff --git a/branches/WOF2-0/branches/WinOF/WIX/wlh/x64/wof.wxs b/branches/WOF2-0/branches/WinOF/WIX/wlh/x64/wof.wxs index ca3fba82..97103cd3 100644 --- a/branches/WOF2-0/branches/WinOF/WIX/wlh/x64/wof.wxs +++ b/branches/WOF2-0/branches/WinOF/WIX/wlh/x64/wof.wxs @@ -3,7 +3,7 @@ WinOF (Windows OpenFabrics) for x64 Windows Server 2008 or Vista --> - - + + + @@ -250,10 +255,10 @@ ---> +--> @@ -383,8 +388,6 @@ - @@ -505,6 +508,9 @@ + diff --git a/branches/WOF2-0/branches/WinOF/WIX/wlh/x86/wof.wxs b/branches/WOF2-0/branches/WinOF/WIX/wlh/x86/wof.wxs index 11ca170a..e5310a7d 100644 --- a/branches/WOF2-0/branches/WinOF/WIX/wlh/x86/wof.wxs +++ b/branches/WOF2-0/branches/WinOF/WIX/wlh/x86/wof.wxs @@ -4,7 +4,7 @@ --> - - - + + @@ -234,10 +236,10 @@ ---> +--> @@ -342,8 +344,6 @@ - @@ -461,6 +461,9 @@ + diff --git a/branches/WOF2-0/branches/WinOF/WIX/wnet/ia64/wof.wxs b/branches/WOF2-0/branches/WinOF/WIX/wnet/ia64/wof.wxs index af19fa99..319dbb0b 100644 --- a/branches/WOF2-0/branches/WinOF/WIX/wnet/ia64/wof.wxs +++ b/branches/WOF2-0/branches/WinOF/WIX/wnet/ia64/wof.wxs @@ -3,7 +3,7 @@ WinOF for IA64/IPF Itanium on Windown Server 2003 --> - - + + + @@ -249,10 +254,10 @@ ---> +--> @@ -388,8 +393,6 @@ End Remove --> - @@ -488,6 +491,9 @@ End ConnectX remove --> Source="..\bin\bin\user\objchk_wnet_ia64\ia64\opensm.exe" /> + diff --git a/branches/WOF2-0/branches/WinOF/WIX/wnet/signDrivers.bat b/branches/WOF2-0/branches/WinOF/WIX/wnet/signDrivers.bat index 81a9d8e9..78e7be4d 100644 --- a/branches/WOF2-0/branches/WinOF/WIX/wnet/signDrivers.bat +++ b/branches/WOF2-0/branches/WinOF/WIX/wnet/signDrivers.bat @@ -3,9 +3,9 @@ setlocal rem Sign device drivers for architectures specified -rem usage: signDrivers CertFilename password path-2-drivers {noTimeStamp} +rem usage: signDrivers CertFilename CertSubjectName path-2-drivers {noTimeStamp} -rem example: signDirvers cse1CStore bin\hca +rem example: signDirvers cse1CStore TestCert bin\hca rem cmd.exe /V:on (delayed environment variable expansion) is required! @@ -22,7 +22,7 @@ set DU=/du www.openfabrics.org set Usage='usage: signDrivers CertFilename password path-2-drivers {noTimeStamp}' if "%1" == "" ( - echo %0 - missing CertName file? + echo %0 - missing CertFileName? echo %0 - %Usage% exit /B 1 ) @@ -33,18 +33,13 @@ if not EXIST %1 ( exit /B 1 ) -if "%2" == "" ( - echo %0 - missing Cert FileName password? +rem %2 is already quoted +if %2 == "" ( + echo %0 - missing Cert Subject Name? echo %0 - %Usage% exit /B 1 ) -if "%2" == "nopassword" ( - set PWD= -) else ( - set PWD=/p %2 -) - if "%3" == "" ( echo %0 - missing path-2-driver files? echo %0 - %Usage% @@ -92,24 +87,6 @@ for %%d in (amd64 x86 ia64) do ( if "%%d" == "x86" set OEA=%OE%_X86 if "%%d" == "ia64" set OEA=%OE%_IA64 - echo %0 - Signing %%d .sys driver files for !OEA! - - for %%f in ( *.sys ) do ( - echo %0 - Signing %%d\%%f - signtool sign /a /f %1 %PWD% %TS% %DU% %%f - if ERRORLEVEL 1 ( - echo %0 signtool sign %%f failed? - echo %0 file %CD%\%%f - exit /B 1 - ) - signtool verify /kp %%f - if ERRORLEVEL 1 ( - echo %0 signtool verify %%f failed? - echo %0 file %CD%\%%f - exit /B 1 - ) - ) - echo %0 - Generating %%d .cat files for !OEA! inf2cat /driver:%CD%\%%d /os:!OEA! if ERRORLEVEL 1 ( @@ -119,7 +96,7 @@ for %%d in (amd64 x86 ia64) do ( echo %0 - Signing %%d .cat files for %%f in ( *.cat ) do ( echo %0 - Signing %%d\%%f - signtool sign /a /f %1 %PWD% %TS% %DU% %%f + signtool sign /ac %1 /n %2 %TS% %DU% %%f if ERRORLEVEL 1 ( echo %0 signtool sign %%f failed? echo %0 file %CD%\%%f @@ -131,7 +108,6 @@ for %%d in (amd64 x86 ia64) do ( echo %0 file %CD%\%%f exit /B 1 ) -rem echo %0 - Successfully Signed %%d\%%f ) popd ) diff --git a/branches/WOF2-0/branches/WinOF/WIX/wnet/x64/wof.wxs b/branches/WOF2-0/branches/WinOF/WIX/wnet/x64/wof.wxs index 85cc2022..31ec49cf 100644 --- a/branches/WOF2-0/branches/WinOF/WIX/wnet/x64/wof.wxs +++ b/branches/WOF2-0/branches/WinOF/WIX/wnet/x64/wof.wxs @@ -3,7 +3,7 @@ WinOF for x64 Windows Server 2003 or XP64 --> - - + + + @@ -268,10 +273,10 @@ ---> +--> @@ -380,8 +385,6 @@ - @@ -502,6 +505,9 @@ + diff --git a/branches/WOF2-0/branches/WinOF/WIX/wnet/x86/wof.wxs b/branches/WOF2-0/branches/WinOF/WIX/wnet/x86/wof.wxs index 0f445791..6fe0ef76 100644 --- a/branches/WOF2-0/branches/WinOF/WIX/wnet/x86/wof.wxs +++ b/branches/WOF2-0/branches/WinOF/WIX/wnet/x86/wof.wxs @@ -4,7 +4,7 @@ --> - - - + + @@ -239,10 +241,10 @@ + - - - + + @@ -234,10 +236,10 @@ ---> +--> @@ -343,8 +345,6 @@ - @@ -455,6 +455,9 @@ + diff --git a/branches/WOF2-0/trunk/BuildRelease.bat b/branches/WOF2-0/trunk/BuildRelease.bat index 7bdb58b9..be1a0845 100644 --- a/branches/WOF2-0/trunk/BuildRelease.bat +++ b/branches/WOF2-0/trunk/BuildRelease.bat @@ -81,15 +81,15 @@ if "%1" == "clean" ( exit /B 0 ) -rem Driver Signing Certificate filename, assumes %WIX%\%CERTNAME% is valid. -rem set CERTNAME=noCert -set CERTNAME=WinOF_Software_Pub.pfx -set CERTPWD=WinOF +rem Driver Signing Certificate filename, assumes %WIX%\%CERTFILE% is valid. +rem set CERTFILE=noCert +set CERTFILE=MSCV-VSClass3.cer +set CERTSNAME="OpenFabrics Alliance" rem A Digital driver signing certificate store name may be required. if "%1" == "all" ( - if "%CERTNAME%" == "noCert" set /P CERTNAME=[Enter Certificate FileName] - if "%CERTNAME%" == "" ( + if "%CERTFILE%" == "noCert" set /P CERTFILE=[Enter Certificate FileName] + if "%CERTFILE%" == "" ( echo %0 echo %0: Err - driver signing certificate filename required. echo %0: see certmgr.exe @@ -98,8 +98,8 @@ if "%1" == "all" ( ) if "%1" == "msi" ( - if "%CERTNAME%" == "noCert" set /P CERTNAME=[Enter Certificate FileName] - if "%CERTNAME%" == "" ( + if "%CERTFILE%" == "noCert" set /P CERTFILE=[Enter Certificate FileName] + if "%CERTFILE%" == "" ( echo %0 echo %0: Err - driver signing certificate filename required. echo %0: see certmgr.exe @@ -122,7 +122,7 @@ set _PSDK=%SystemDrive%\progra~1\mi2578~1 rem Special override case for WinOF 2.0 release. rem setup value for OPENIB_REV assignment. -set SVN=1535 +set SVN=1554 set LBL=_R2.0 rem assumes %CD% == '...\gen1\trunk' @@ -209,7 +209,7 @@ if "%1" == "msi-dir" ( echo %0 - Building with WDK @ %_DDK% echo Building for OPENIB_REV %SVN%, installer files @ %IDIR% -echo Drivers signed using Certificate '%CERTNAME%' +echo Drivers signed using Certificate '%CERTFILE%' rem pause thoughtfully. if exist %windir%\system32\timeout.exe ( @@ -371,7 +371,7 @@ if "%1" == "makebin" goto finito :mk_msi -echo %0 - Drivers Signed with %CERTNAME% +echo %0 - Drivers Signed with %CERTFILE% echo Binary releases created in echo %RBIN_WLH% echo %RBIN_WNET% @@ -379,7 +379,7 @@ echo %RBIN_WXP% rem build WIX installers --> see ..\branches\WinOF\WIX -%COMSPEC% /V:on /E:on /C "%_DDK%\bin\setenv.bat %_DDK% fre X64 WNET & cd /D %WIX% & build-all-MSI %MSI_CMD% %CERTNAME% %CERTPWD% %IDIR%" +%COMSPEC% /V:on /E:on /C "%_DDK%\bin\setenv.bat %_DDK% fre X64 WNET & cd /D %WIX% & build-all-MSI %MSI_CMD% %CERTFILE% %CERTSNAME% %IDIR%" :finito