mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
iis: adds openssl to the build scripts
openssl is necessary to have curl talking in https.
This commit is contained in:
parent
9fe72b72de
commit
277f2e1e6f
@ -20,6 +20,7 @@
|
||||
@set YAJL=lloyd-yajl-f4b2b1a.zip
|
||||
@set SSDEEP=ssdeep-2.10.tar.gz
|
||||
@set SSDEEP_BIN=ssdeep-2.10.zip
|
||||
@set OPENSSL=openssl-1.0.1j.tar.gz
|
||||
|
||||
:: @set VCARGS32="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\vcvars32.bat"
|
||||
:: @set VCARGS64="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\vcvarsx86_amd64.bat"
|
||||
@ -70,6 +71,11 @@ call cl 2>&1 | findstr /C:"x64"
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_lua
|
||||
@cd "%CURRENT_DIR%"
|
||||
|
||||
@echo # openssl - %OPENSSL%
|
||||
@call dependencies/build_openssl.bat
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_openssl
|
||||
@cd "%CURRENT_DIR%"
|
||||
|
||||
@echo # curl - %CURL%
|
||||
@call dependencies/build_curl.bat
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_curl
|
||||
@ -121,6 +127,10 @@ call cl 2>&1 | findstr /C:"x64"
|
||||
@echo Failed to setup %CURL%...
|
||||
@goto failed
|
||||
|
||||
:build_failed_openssl
|
||||
@echo Failed to setup %OPENSSL%...
|
||||
@goto failed
|
||||
|
||||
:build_failed_yajl
|
||||
@echo Failed to setup %YAJL%...
|
||||
@goto failed
|
||||
|
@ -35,6 +35,8 @@ copy "%OUTPUT_DIR%\pcre.dll" "%AMD64%"
|
||||
copy "%OUTPUT_DIR%\zlib1.dll" "%AMD64%"
|
||||
copy "%OUTPUT_DIR%\yajl.dll" "%AMD64%"
|
||||
copy "%OUTPUT_DIR%\fuzzy.dll" "%AMD64%"
|
||||
copy "%OUTPUT_DIR%\libeay32.dll" "%AMD64%"
|
||||
copy "%OUTPUT_DIR%\ssleay32.dll" "%AMD64%"
|
||||
|
||||
set SSDEEP_ARCH="x86"
|
||||
call build_dependencies.bat %VCARGS32%
|
||||
@ -54,6 +56,8 @@ copy "%OUTPUT_DIR%\pcre.dll" "%X86%"
|
||||
copy "%OUTPUT_DIR%\zlib1.dll" "%X86%"
|
||||
copy "%OUTPUT_DIR%\yajl.dll" "%X86%"
|
||||
copy "%OUTPUT_DIR%\fuzzy.dll" "%X86%"
|
||||
copy "%OUTPUT_DIR%\libeay32.dll" "%X86%"
|
||||
copy "%OUTPUT_DIR%\ssleay32.dll" "%X86%"
|
||||
|
||||
|
||||
:: copy %OUTPUT_DIR%\Installer.exe %RELEASE_DIR%
|
||||
|
83
iis/dependencies/build_openssl.bat
Normal file
83
iis/dependencies/build_openssl.bat
Normal file
@ -0,0 +1,83 @@
|
||||
::set WORK_DIR=C:\buildbot\win-local_-_Release\build\ModSecurity\iis\dependencies\build_dir
|
||||
::set SOURCE_DIR=C:\Users\fcosta\Downloads
|
||||
::set OPENSSL=openssl-1.0.1j.tar.gz
|
||||
::set OUTPUT_DIR=C:\buildbot\win-local_-_Release\build\ModSecurity\iis\release_files
|
||||
|
||||
cd "%WORK_DIR%"
|
||||
@if NOT EXIST "%SOURCE_DIR%\%OPENSSL%" goto file_not_found_bin
|
||||
|
||||
echo "7z..."
|
||||
@7z.exe x "%SOURCE_DIR%\%OPENSSL%" -so | 7z.exe x -aoa -si -ttar
|
||||
|
||||
echo "Timeout..."
|
||||
timeout 5
|
||||
|
||||
echo "OpenSSL..."
|
||||
set OPENSSL_DIR=%OPENSSL:~0,-7%
|
||||
|
||||
echo "Move..."
|
||||
move "%OPENSSL_DIR%" "openssl"
|
||||
|
||||
echo "Cd..."
|
||||
cd "openssl"
|
||||
|
||||
|
||||
@set ARCH=x86
|
||||
@call cl 2>&1 | findstr /C:"x64"
|
||||
@if (%ERRORLEVEL%) == (0) set ARCH=x64
|
||||
|
||||
echo "Starting to build"
|
||||
|
||||
if "%ARCH%" == "x64" ( goto first ) else ( goto second )
|
||||
goto end
|
||||
|
||||
:first
|
||||
echo "Building x64"
|
||||
perl Configure VC-WIN64A --prefix=%WORK_DIR%/openssl_inst
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
call ms\do_win64a
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
nmake -f ms\ntdll.mak
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
nmake -f ms\ntdll.mak install
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
|
||||
copy /y "%WORK_DIR%\openssl\out32dll\libeay32.dll" "%OUTPUT_DIR%"
|
||||
copy /y "%WORK_DIR%\openssl\out32dll\ssleay32.dll" "%OUTPUT_DIR%"
|
||||
copy /y "%WORK_DIR%\openssl\out32dll\libeay32.lib" "%OUTPUT_DIR%"
|
||||
copy /y "%WORK_DIR%\openssl\out32dll\ssleay32.lib" "%OUTPUT_DIR%"
|
||||
goto end
|
||||
|
||||
:second
|
||||
echo "Building x86"
|
||||
perl Configure VC-WIN32 no-asm --prefix=%WORK_DIR%/openssl_inst
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
:: call ms\do_nasm
|
||||
call ms\do_ms
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
nmake -f ms\ntdll.mak
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
nmake -f ms\ntdll.mak install
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
|
||||
copy /y "%WORK_DIR%\openssl\out32dll\libeay32.dll" "%OUTPUT_DIR%"
|
||||
copy /y "%WORK_DIR%\openssl\out32dll\ssleay32.dll" "%OUTPUT_DIR%"
|
||||
copy /y "%WORK_DIR%\openssl\out32dll\libeay32.lib" "%OUTPUT_DIR%"
|
||||
copy /y "%WORK_DIR%\openssl\out32dll\ssleay32.lib" "%OUTPUT_DIR%"
|
||||
goto end
|
||||
|
||||
|
||||
:end
|
||||
exit /B 0
|
||||
|
||||
:file_not_found_bin
|
||||
@echo File not found: "%SOURCE_DIR%\%OPENSSL%"
|
||||
@goto failed
|
||||
|
||||
:: :build_failed
|
||||
:: @echo Problems during the building phase
|
||||
:: @goto failed
|
||||
|
||||
:failed
|
||||
@exit /B 1
|
||||
|
@ -86,6 +86,16 @@
|
||||
<DirectorySearch Id="CheckFileDir19" Path="C:\Windows\System32\inetsrv" Depth="0">
|
||||
<FileSearch Id="CheckFile19" Name="fuzzy.dll" />
|
||||
</DirectorySearch>
|
||||
<DirectorySearch Id="CheckFileDir20" Path="C:\Windows\System32\inetsrv" Depth="0">
|
||||
<FileSearch Id="CheckFile20" Name="libeay32.dll" />
|
||||
</DirectorySearch>
|
||||
<DirectorySearch Id="CheckFileDir21" Path="C:\Windows\System32\inetsrv" Depth="0">
|
||||
<FileSearch Id="CheckFile21" Name="ssleay32.dll" />
|
||||
</DirectorySearch>
|
||||
<DirectorySearch Id="CheckFileDir22" Path="C:\Windows\System32\inetsrv" Depth="0">
|
||||
<FileSearch Id="CheckFile22" Name="curl-ca-bundle.crt" />
|
||||
</DirectorySearch>
|
||||
|
||||
</Property>
|
||||
<Property Id="WWWROOT">
|
||||
<RegistrySearch Id="FindInetPubFolder" Root="HKLM" Key="SOFTWARE\Microsoft\InetStp" Name="PathWWWRoot" Type="directory" />
|
||||
@ -326,9 +336,9 @@
|
||||
<Shortcut Id="EULA" Name="EULA" Description="EULA" Target="[INSTALLFOLDER]EULA.rtf" WorkingDirectory="INSTALLFOLDER" />
|
||||
<Shortcut Id="Readme" Name="EULA" Description="EULA" Target="[INSTALLFOLDER]README.TXT" WorkingDirectory="INSTALLFOLDER" />
|
||||
<?if $(var.Win64) = "yes" ?>
|
||||
<Shortcut Id="List_Dependencies" Name="List Dependencies (Debug)" Description="Check for missing dependencies" Target="[INSTALLFOLDER]list_dependencies.bat" Arguments=""[inetsrv64]libapr-1.dll" "[inetsrv64]libapriconv-1.dll" "[inetsrv64]libaprutil-1.dll" "[inetsrv64]libcurl.dll" "[inetsrv64]libxml2.dll" "[inetsrv64]lua5.1.dll" "[inetsrv64]mlogc.exe" "[inetsrv64]ModSecurityIIS.dll" "[inetsrv64]pcre.dll" "[inetsrv64]zlib1.dll" "[inetsrv64]fuzzy.dll" "[inetsrv32]libapr-1.dll" "[inetsrv32]libapriconv-1.dll" "[inetsrv32]libaprutil-1.dll" "[inetsrv32]libcurl.dll" "[inetsrv32]libxml2.dll" "[inetsrv32]lua5.1.dll" "[inetsrv32]mlogc.exe" "[inetsrv32]ModSecurityIIS.dll" "[inetsrv32]pcre.dll" "[inetsrv32]zlib1.dll" "[inetsrv32]fuzzy.dll"" WorkingDirectory="INSTALLFOLDER" />
|
||||
<Shortcut Id="List_Dependencies" Name="List Dependencies (Debug)" Description="Check for missing dependencies" Target="[INSTALLFOLDER]list_dependencies.bat" Arguments=""[inetsrv64]libapr-1.dll" "[inetsrv64]libapriconv-1.dll" "[inetsrv64]libaprutil-1.dll" "[inetsrv64]libcurl.dll" "[inetsrv64]libxml2.dll" "[inetsrv64]lua5.1.dll" "[inetsrv64]mlogc.exe" "[inetsrv64]ModSecurityIIS.dll" "[inetsrv64]pcre.dll" "[inetsrv64]zlib1.dll" "[inetsrv64]fuzzy.dll" "[inetsrv64]libeay32.dll" "[inetsrv64]ssleay32.dll" "[inetsrv32]libapr-1.dll" "[inetsrv32]libapriconv-1.dll" "[inetsrv32]libaprutil-1.dll" "[inetsrv32]libcurl.dll" "[inetsrv32]libxml2.dll" "[inetsrv32]lua5.1.dll" "[inetsrv32]mlogc.exe" "[inetsrv32]ModSecurityIIS.dll" "[inetsrv32]pcre.dll" "[inetsrv32]zlib1.dll" "[inetsrv32]fuzzy.dll" "[inetsrv32]libeay32.dll" "[inetsrv32]ssleay32.dll"" WorkingDirectory="INSTALLFOLDER" />
|
||||
<?else ?>
|
||||
<Shortcut Id="List_Dependencies" Name="List Dependencies (Debug)" Description="Check for missing dependencies" Target="[INSTALLFOLDER]list_dependencies.bat" Arguments=""[inetsrv32]libapr-1.dll" "[inetsrv32]libapriconv-1.dll" "[inetsrv32]libaprutil-1.dll" "[inetsrv32]libcurl.dll" "[inetsrv32]libxml2.dll" "[inetsrv32]lua5.1.dll" "[inetsrv32]mlogc.exe" "[inetsrv32]ModSecurityIIS.dll" "[inetsrv32]pcre.dll" "[inetsrv32]zlib1.dll" "[inetsrv32]fuzzy.dll"" WorkingDirectory="INSTALLFOLDER" />
|
||||
<Shortcut Id="List_Dependencies" Name="List Dependencies (Debug)" Description="Check for missing dependencies" Target="[INSTALLFOLDER]list_dependencies.bat" Arguments=""[inetsrv32]libapr-1.dll" "[inetsrv32]libapriconv-1.dll" "[inetsrv32]libaprutil-1.dll" "[inetsrv32]libcurl.dll" "[inetsrv32]libxml2.dll" "[inetsrv32]lua5.1.dll" "[inetsrv32]mlogc.exe" "[inetsrv32]ModSecurityIIS.dll" "[inetsrv32]pcre.dll" "[inetsrv32]zlib1.dll" "[inetsrv32]fuzzy.dll" "[inetsrv32]libeay32.dll" "[inetsrv32]ssleay32.dll"" WorkingDirectory="INSTALLFOLDER" />
|
||||
<?endif ?>
|
||||
</Component>
|
||||
</Directory>
|
||||
@ -370,6 +380,9 @@
|
||||
<File Id="_64_PCRE" Name="pcre.dll" Source="Release\amd64\pcre.dll" />
|
||||
<File Id="_64_ZLIB1" Name="zlib1.dll" Source="Release\amd64\zlib1.dll" />
|
||||
<File Id="_64_FUZZY" Name="fuzzy.dll" Source="Release\amd64\fuzzy.dll" />
|
||||
<File Id="_64_LIBEAY" Name="libeay32.dll" Source="Release\amd64\libeay32.dll" />
|
||||
<File Id="_64_SSLEAY" Name="ssleay32.dll" Source="Release\amd64\ssleay32.dll" />
|
||||
<File Id="_64_CA_BUNDLE" Name="curl-ca-bundle.crt" Source="curl-ca-bundle.crt" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
<DirectoryRef Id="inetsrv32">
|
||||
@ -386,6 +399,9 @@
|
||||
<File Id="_32_PCRE" Name="pcre.dll" Source="Release\x86\pcre.dll" />
|
||||
<File Id="_32_ZLIB1" Name="zlib1.dll" Source="Release\x86\zlib1.dll" />
|
||||
<File Id="_32_FUZZY" Name="fuzzy.dll" Source="Release\x86\fuzzy.dll" />
|
||||
<File Id="_32_LIBEAY" Name="libeay32.dll" Source="Release\x86\libeay32.dll" />
|
||||
<File Id="_32_SSLEAY" Name="ssleay32.dll" Source="Release\x86\ssleay32.dll" />
|
||||
<File Id="_32_CA_BUNDLE" Name="curl-ca-bundle.crt" Source="curl-ca-bundle.crt" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
<DirectoryRef Id="SystemFolderConfigSchema32">
|
||||
@ -413,6 +429,9 @@
|
||||
<File Id="_32_PCRE" Name="pcre.dll" Source="Release\x86\pcre.dll" />
|
||||
<File Id="_32_ZLIB1" Name="zlib1.dll" Source="Release\x86\zlib1.dll" />
|
||||
<File Id="_32_FUZZY" Name="fuzzy.dll" Source="Release\x86\fuzzy.dll" />
|
||||
<File Id="_32_LIBEAY" Name="libeay32.dll" Source="Release\x86\libeay32.dll" />
|
||||
<File Id="_32_SSLEAY" Name="ssleay32.dll" Source="Release\x86\ssleay32.dll" />
|
||||
<File Id="_32_CA_BUNDLE" Name="curl-ca-bundle.crt" Source="curl-ca-bundle.crt" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
<DirectoryRef Id="SystemFolderConfigSchema32">
|
||||
|
Loading…
x
Reference in New Issue
Block a user