Skip to content

Commit 277f2e1

Browse files
author
Felipe Zimmerle
committed
iis: adds openssl to the build scripts
openssl is necessary to have curl talking in https.
1 parent 9fe72b7 commit 277f2e1

File tree

4 files changed

+118
-2
lines changed

4 files changed

+118
-2
lines changed

iis/build_dependencies.bat

+10
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
@set YAJL=lloyd-yajl-f4b2b1a.zip
2121
@set SSDEEP=ssdeep-2.10.tar.gz
2222
@set SSDEEP_BIN=ssdeep-2.10.zip
23+
@set OPENSSL=openssl-1.0.1j.tar.gz
2324

2425
:: @set VCARGS32="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\vcvars32.bat"
2526
:: @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"
7071
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_lua
7172
@cd "%CURRENT_DIR%"
7273

74+
@echo # openssl - %OPENSSL%
75+
@call dependencies/build_openssl.bat
76+
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_openssl
77+
@cd "%CURRENT_DIR%"
78+
7379
@echo # curl - %CURL%
7480
@call dependencies/build_curl.bat
7581
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_curl
@@ -121,6 +127,10 @@ call cl 2>&1 | findstr /C:"x64"
121127
@echo Failed to setup %CURL%...
122128
@goto failed
123129

130+
:build_failed_openssl
131+
@echo Failed to setup %OPENSSL%...
132+
@goto failed
133+
124134
:build_failed_yajl
125135
@echo Failed to setup %YAJL%...
126136
@goto failed

iis/build_release.bat

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ copy "%OUTPUT_DIR%\pcre.dll" "%AMD64%"
3535
copy "%OUTPUT_DIR%\zlib1.dll" "%AMD64%"
3636
copy "%OUTPUT_DIR%\yajl.dll" "%AMD64%"
3737
copy "%OUTPUT_DIR%\fuzzy.dll" "%AMD64%"
38+
copy "%OUTPUT_DIR%\libeay32.dll" "%AMD64%"
39+
copy "%OUTPUT_DIR%\ssleay32.dll" "%AMD64%"
3840

3941
set SSDEEP_ARCH="x86"
4042
call build_dependencies.bat %VCARGS32%
@@ -54,6 +56,8 @@ copy "%OUTPUT_DIR%\pcre.dll" "%X86%"
5456
copy "%OUTPUT_DIR%\zlib1.dll" "%X86%"
5557
copy "%OUTPUT_DIR%\yajl.dll" "%X86%"
5658
copy "%OUTPUT_DIR%\fuzzy.dll" "%X86%"
59+
copy "%OUTPUT_DIR%\libeay32.dll" "%X86%"
60+
copy "%OUTPUT_DIR%\ssleay32.dll" "%X86%"
5761

5862

5963
:: copy %OUTPUT_DIR%\Installer.exe %RELEASE_DIR%

iis/dependencies/build_openssl.bat

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
::set WORK_DIR=C:\buildbot\win-local_-_Release\build\ModSecurity\iis\dependencies\build_dir
2+
::set SOURCE_DIR=C:\Users\fcosta\Downloads
3+
::set OPENSSL=openssl-1.0.1j.tar.gz
4+
::set OUTPUT_DIR=C:\buildbot\win-local_-_Release\build\ModSecurity\iis\release_files
5+
6+
cd "%WORK_DIR%"
7+
@if NOT EXIST "%SOURCE_DIR%\%OPENSSL%" goto file_not_found_bin
8+
9+
echo "7z..."
10+
@7z.exe x "%SOURCE_DIR%\%OPENSSL%" -so | 7z.exe x -aoa -si -ttar
11+
12+
echo "Timeout..."
13+
timeout 5
14+
15+
echo "OpenSSL..."
16+
set OPENSSL_DIR=%OPENSSL:~0,-7%
17+
18+
echo "Move..."
19+
move "%OPENSSL_DIR%" "openssl"
20+
21+
echo "Cd..."
22+
cd "openssl"
23+
24+
25+
@set ARCH=x86
26+
@call cl 2>&1 | findstr /C:"x64"
27+
@if (%ERRORLEVEL%) == (0) set ARCH=x64
28+
29+
echo "Starting to build"
30+
31+
if "%ARCH%" == "x64" ( goto first ) else ( goto second )
32+
goto end
33+
34+
:first
35+
echo "Building x64"
36+
perl Configure VC-WIN64A --prefix=%WORK_DIR%/openssl_inst
37+
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
38+
call ms\do_win64a
39+
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
40+
nmake -f ms\ntdll.mak
41+
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
42+
nmake -f ms\ntdll.mak install
43+
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
44+
45+
copy /y "%WORK_DIR%\openssl\out32dll\libeay32.dll" "%OUTPUT_DIR%"
46+
copy /y "%WORK_DIR%\openssl\out32dll\ssleay32.dll" "%OUTPUT_DIR%"
47+
copy /y "%WORK_DIR%\openssl\out32dll\libeay32.lib" "%OUTPUT_DIR%"
48+
copy /y "%WORK_DIR%\openssl\out32dll\ssleay32.lib" "%OUTPUT_DIR%"
49+
goto end
50+
51+
:second
52+
echo "Building x86"
53+
perl Configure VC-WIN32 no-asm --prefix=%WORK_DIR%/openssl_inst
54+
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
55+
:: call ms\do_nasm
56+
call ms\do_ms
57+
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
58+
nmake -f ms\ntdll.mak
59+
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
60+
nmake -f ms\ntdll.mak install
61+
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
62+
63+
copy /y "%WORK_DIR%\openssl\out32dll\libeay32.dll" "%OUTPUT_DIR%"
64+
copy /y "%WORK_DIR%\openssl\out32dll\ssleay32.dll" "%OUTPUT_DIR%"
65+
copy /y "%WORK_DIR%\openssl\out32dll\libeay32.lib" "%OUTPUT_DIR%"
66+
copy /y "%WORK_DIR%\openssl\out32dll\ssleay32.lib" "%OUTPUT_DIR%"
67+
goto end
68+
69+
70+
:end
71+
exit /B 0
72+
73+
:file_not_found_bin
74+
@echo File not found: "%SOURCE_DIR%\%OPENSSL%"
75+
@goto failed
76+
77+
:: :build_failed
78+
:: @echo Problems during the building phase
79+
:: @goto failed
80+
81+
:failed
82+
@exit /B 1
83+

iis/installer.wxs

+21-2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,16 @@
8686
<DirectorySearch Id="CheckFileDir19" Path="C:\Windows\System32\inetsrv" Depth="0">
8787
<FileSearch Id="CheckFile19" Name="fuzzy.dll" />
8888
</DirectorySearch>
89+
<DirectorySearch Id="CheckFileDir20" Path="C:\Windows\System32\inetsrv" Depth="0">
90+
<FileSearch Id="CheckFile20" Name="libeay32.dll" />
91+
</DirectorySearch>
92+
<DirectorySearch Id="CheckFileDir21" Path="C:\Windows\System32\inetsrv" Depth="0">
93+
<FileSearch Id="CheckFile21" Name="ssleay32.dll" />
94+
</DirectorySearch>
95+
<DirectorySearch Id="CheckFileDir22" Path="C:\Windows\System32\inetsrv" Depth="0">
96+
<FileSearch Id="CheckFile22" Name="curl-ca-bundle.crt" />
97+
</DirectorySearch>
98+
8999
</Property>
90100
<Property Id="WWWROOT">
91101
<RegistrySearch Id="FindInetPubFolder" Root="HKLM" Key="SOFTWARE\Microsoft\InetStp" Name="PathWWWRoot" Type="directory" />
@@ -326,9 +336,9 @@
326336
<Shortcut Id="EULA" Name="EULA" Description="EULA" Target="[INSTALLFOLDER]EULA.rtf" WorkingDirectory="INSTALLFOLDER" />
327337
<Shortcut Id="Readme" Name="EULA" Description="EULA" Target="[INSTALLFOLDER]README.TXT" WorkingDirectory="INSTALLFOLDER" />
328338
<?if $(var.Win64) = "yes" ?>
329-
<Shortcut Id="List_Dependencies" Name="List Dependencies (Debug)" Description="Check for missing dependencies" Target="[INSTALLFOLDER]list_dependencies.bat" Arguments="&quot;[inetsrv64]libapr-1.dll&quot; &quot;[inetsrv64]libapriconv-1.dll&quot; &quot;[inetsrv64]libaprutil-1.dll&quot; &quot;[inetsrv64]libcurl.dll&quot; &quot;[inetsrv64]libxml2.dll&quot; &quot;[inetsrv64]lua5.1.dll&quot; &quot;[inetsrv64]mlogc.exe&quot; &quot;[inetsrv64]ModSecurityIIS.dll&quot; &quot;[inetsrv64]pcre.dll&quot; &quot;[inetsrv64]zlib1.dll&quot; &quot;[inetsrv64]fuzzy.dll&quot; &quot;[inetsrv32]libapr-1.dll&quot; &quot;[inetsrv32]libapriconv-1.dll&quot; &quot;[inetsrv32]libaprutil-1.dll&quot; &quot;[inetsrv32]libcurl.dll&quot; &quot;[inetsrv32]libxml2.dll&quot; &quot;[inetsrv32]lua5.1.dll&quot; &quot;[inetsrv32]mlogc.exe&quot; &quot;[inetsrv32]ModSecurityIIS.dll&quot; &quot;[inetsrv32]pcre.dll&quot; &quot;[inetsrv32]zlib1.dll&quot; &quot;[inetsrv32]fuzzy.dll&quot;" WorkingDirectory="INSTALLFOLDER" />
339+
<Shortcut Id="List_Dependencies" Name="List Dependencies (Debug)" Description="Check for missing dependencies" Target="[INSTALLFOLDER]list_dependencies.bat" Arguments="&quot;[inetsrv64]libapr-1.dll&quot; &quot;[inetsrv64]libapriconv-1.dll&quot; &quot;[inetsrv64]libaprutil-1.dll&quot; &quot;[inetsrv64]libcurl.dll&quot; &quot;[inetsrv64]libxml2.dll&quot; &quot;[inetsrv64]lua5.1.dll&quot; &quot;[inetsrv64]mlogc.exe&quot; &quot;[inetsrv64]ModSecurityIIS.dll&quot; &quot;[inetsrv64]pcre.dll&quot; &quot;[inetsrv64]zlib1.dll&quot; &quot;[inetsrv64]fuzzy.dll&quot; &quot;[inetsrv64]libeay32.dll&quot; &quot;[inetsrv64]ssleay32.dll&quot; &quot;[inetsrv32]libapr-1.dll&quot; &quot;[inetsrv32]libapriconv-1.dll&quot; &quot;[inetsrv32]libaprutil-1.dll&quot; &quot;[inetsrv32]libcurl.dll&quot; &quot;[inetsrv32]libxml2.dll&quot; &quot;[inetsrv32]lua5.1.dll&quot; &quot;[inetsrv32]mlogc.exe&quot; &quot;[inetsrv32]ModSecurityIIS.dll&quot; &quot;[inetsrv32]pcre.dll&quot; &quot;[inetsrv32]zlib1.dll&quot; &quot;[inetsrv32]fuzzy.dll&quot; &quot;[inetsrv32]libeay32.dll&quot; &quot;[inetsrv32]ssleay32.dll&quot;" WorkingDirectory="INSTALLFOLDER" />
330340
<?else ?>
331-
<Shortcut Id="List_Dependencies" Name="List Dependencies (Debug)" Description="Check for missing dependencies" Target="[INSTALLFOLDER]list_dependencies.bat" Arguments="&quot;[inetsrv32]libapr-1.dll&quot; &quot;[inetsrv32]libapriconv-1.dll&quot; &quot;[inetsrv32]libaprutil-1.dll&quot; &quot;[inetsrv32]libcurl.dll&quot; &quot;[inetsrv32]libxml2.dll&quot; &quot;[inetsrv32]lua5.1.dll&quot; &quot;[inetsrv32]mlogc.exe&quot; &quot;[inetsrv32]ModSecurityIIS.dll&quot; &quot;[inetsrv32]pcre.dll&quot; &quot;[inetsrv32]zlib1.dll&quot; &quot;[inetsrv32]fuzzy.dll&quot;" WorkingDirectory="INSTALLFOLDER" />
341+
<Shortcut Id="List_Dependencies" Name="List Dependencies (Debug)" Description="Check for missing dependencies" Target="[INSTALLFOLDER]list_dependencies.bat" Arguments="&quot;[inetsrv32]libapr-1.dll&quot; &quot;[inetsrv32]libapriconv-1.dll&quot; &quot;[inetsrv32]libaprutil-1.dll&quot; &quot;[inetsrv32]libcurl.dll&quot; &quot;[inetsrv32]libxml2.dll&quot; &quot;[inetsrv32]lua5.1.dll&quot; &quot;[inetsrv32]mlogc.exe&quot; &quot;[inetsrv32]ModSecurityIIS.dll&quot; &quot;[inetsrv32]pcre.dll&quot; &quot;[inetsrv32]zlib1.dll&quot; &quot;[inetsrv32]fuzzy.dll&quot; &quot;[inetsrv32]libeay32.dll&quot; &quot;[inetsrv32]ssleay32.dll&quot;" WorkingDirectory="INSTALLFOLDER" />
332342
<?endif ?>
333343
</Component>
334344
</Directory>
@@ -370,6 +380,9 @@
370380
<File Id="_64_PCRE" Name="pcre.dll" Source="Release\amd64\pcre.dll" />
371381
<File Id="_64_ZLIB1" Name="zlib1.dll" Source="Release\amd64\zlib1.dll" />
372382
<File Id="_64_FUZZY" Name="fuzzy.dll" Source="Release\amd64\fuzzy.dll" />
383+
<File Id="_64_LIBEAY" Name="libeay32.dll" Source="Release\amd64\libeay32.dll" />
384+
<File Id="_64_SSLEAY" Name="ssleay32.dll" Source="Release\amd64\ssleay32.dll" />
385+
<File Id="_64_CA_BUNDLE" Name="curl-ca-bundle.crt" Source="curl-ca-bundle.crt" />
373386
</Component>
374387
</DirectoryRef>
375388
<DirectoryRef Id="inetsrv32">
@@ -386,6 +399,9 @@
386399
<File Id="_32_PCRE" Name="pcre.dll" Source="Release\x86\pcre.dll" />
387400
<File Id="_32_ZLIB1" Name="zlib1.dll" Source="Release\x86\zlib1.dll" />
388401
<File Id="_32_FUZZY" Name="fuzzy.dll" Source="Release\x86\fuzzy.dll" />
402+
<File Id="_32_LIBEAY" Name="libeay32.dll" Source="Release\x86\libeay32.dll" />
403+
<File Id="_32_SSLEAY" Name="ssleay32.dll" Source="Release\x86\ssleay32.dll" />
404+
<File Id="_32_CA_BUNDLE" Name="curl-ca-bundle.crt" Source="curl-ca-bundle.crt" />
389405
</Component>
390406
</DirectoryRef>
391407
<DirectoryRef Id="SystemFolderConfigSchema32">
@@ -413,6 +429,9 @@
413429
<File Id="_32_PCRE" Name="pcre.dll" Source="Release\x86\pcre.dll" />
414430
<File Id="_32_ZLIB1" Name="zlib1.dll" Source="Release\x86\zlib1.dll" />
415431
<File Id="_32_FUZZY" Name="fuzzy.dll" Source="Release\x86\fuzzy.dll" />
432+
<File Id="_32_LIBEAY" Name="libeay32.dll" Source="Release\x86\libeay32.dll" />
433+
<File Id="_32_SSLEAY" Name="ssleay32.dll" Source="Release\x86\ssleay32.dll" />
434+
<File Id="_32_CA_BUNDLE" Name="curl-ca-bundle.crt" Source="curl-ca-bundle.crt" />
416435
</Component>
417436
</DirectoryRef>
418437
<DirectoryRef Id="SystemFolderConfigSchema32">

0 commit comments

Comments
 (0)