mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Merging IIS and nginx code into M2 trunk.
This commit is contained in:
80
iis/Makefile.win
Normal file
80
iis/Makefile.win
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
###########################################################################
|
||||||
|
#
|
||||||
|
# Usage: NMAKE -f Makefile.win APACHE={httpd installion dir} PCRE={pcre dir} LIBXML2={LibXML2 dir} [ LUA={Lua dir} ]
|
||||||
|
#
|
||||||
|
!IF "$(APACHE)" == "" || "$(PCRE)" == "" || "$(LIBXML2)" == ""
|
||||||
|
!ERROR NMAKE arguments: APACHE=dir PCRE=dir LIBXML2=dir are required to build mod_security2 for Windows
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Linking libraries
|
||||||
|
LIBS = $(APACHE)\lib\libapr-1.lib \
|
||||||
|
$(APACHE)\lib\libaprutil-1.lib \
|
||||||
|
$(PCRE)\pcre.lib \
|
||||||
|
$(LIBXML2)\win32\bin.msvc\libxml2.lib \
|
||||||
|
"kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" \
|
||||||
|
"oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" "ws2_32.lib"
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
CC = CL
|
||||||
|
LINK = link.exe
|
||||||
|
|
||||||
|
MT = mt
|
||||||
|
|
||||||
|
DEFS = /nologo /O2 /LD /W3 /wd4244 /wd4018 -DWIN32 -DWINNT -Dinline=APR_INLINE -DAP_DECLARE_STATIC -D_MBCS -D$(VERSION)
|
||||||
|
|
||||||
|
DLL = ModSecurityIIS.dll
|
||||||
|
|
||||||
|
INCLUDES = -I. -I.. \
|
||||||
|
-I$(PCRE)\include -I$(PCRE) \
|
||||||
|
-I$(LIBXML2)\include \
|
||||||
|
-I$(APACHE)\include \
|
||||||
|
-I..\apache2 \
|
||||||
|
-I..\standalone
|
||||||
|
|
||||||
|
# Lua is optional
|
||||||
|
!IF "$(LUA)" != ""
|
||||||
|
LIBS = $(LIBS) $(LUA)\lua5.1.lib
|
||||||
|
DEFS=$(DEFS) -DWITH_LUA
|
||||||
|
INCLUDES = $(INCLUDES) -I$(LUA)\include -I$(LUA) \
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
CFLAGS= -MD /Zi $(INCLUDES) $(DEFS)
|
||||||
|
|
||||||
|
LDFLAGS = /DEF:"mymodule.def" /DEBUG /OPT:REF /OPT:ICF /MANIFEST /ManifestFile:"ModSecurityIIS.dll.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /TLBID:1 /DYNAMICBASE /NXCOMPAT
|
||||||
|
|
||||||
|
OBJS1 = mod_security2.obj apache2_config.obj apache2_io.obj apache2_util.obj \
|
||||||
|
re.obj re_operators.obj re_actions.obj re_tfns.obj re_variables.obj \
|
||||||
|
msc_logging.obj msc_xml.obj msc_multipart.obj modsecurity.obj \
|
||||||
|
msc_parsers.obj msc_util.obj msc_pcre.obj persist_dbm.obj \
|
||||||
|
msc_reqbody.obj msc_geo.obj msc_gsb.obj msc_unicode.obj acmp.obj msc_lua.obj \
|
||||||
|
msc_release.obj msc_crypt.obj msc_tree.obj
|
||||||
|
OBJS2 = api.obj buckets.obj config.obj filters.obj hooks.obj regex.obj server.obj
|
||||||
|
OBJS3 = main.obj moduleconfig.obj mymodule.obj
|
||||||
|
|
||||||
|
all: $(DLL)
|
||||||
|
|
||||||
|
dll: $(DLL)
|
||||||
|
|
||||||
|
..\apache2\mod_security2_config.h: ..\apache2\mod_security2_config.hw
|
||||||
|
@type ..\apache2\mod_security2_config.hw > ..\apache2\modsecurity_config.h
|
||||||
|
|
||||||
|
$(OBJS1): ..\apache2\$*.c
|
||||||
|
$(CC) $(CFLAGS) -c ..\apache2\$*.c -Fo$@
|
||||||
|
|
||||||
|
$(OBJS2): ..\standalone\$*.c
|
||||||
|
$(CC) $(CFLAGS) -c ..\standalone\$*.c -Fo$@
|
||||||
|
|
||||||
|
.cpp.obj:
|
||||||
|
$(CC) $(CFLAGS) -c $< -Fo$@
|
||||||
|
|
||||||
|
$(DLL): ..\apache2\mod_security2_config.h $(OBJS1) $(OBJS2) $(OBJS3)
|
||||||
|
$(LINK) $(LDFLAGS) $(OBJS1) $(OBJS2) $(OBJS3) $(LIBS)
|
||||||
|
IF EXIST $(DLL).manifest $(MT) -manifest $(DLL).manifest -outputresource:$(DLL);#1
|
||||||
|
|
||||||
|
clean:
|
||||||
|
del /f *.obj
|
||||||
|
del /f *.dll
|
||||||
|
del /f *.exp
|
||||||
|
del /f *.lib
|
13
iis/ModSecurity.xml
Normal file
13
iis/ModSecurity.xml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
ModSecurity configuration schema.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<configSchema>
|
||||||
|
|
||||||
|
<sectionSchema name="system.webServer/ModSecurity">
|
||||||
|
<attribute name="enabled" type="bool" defaultValue="false"/>
|
||||||
|
<attribute name="configFile" type="string" defaultValue="c:\inetpub\modsecurity.conf" validationType="nonEmptyString" />
|
||||||
|
</sectionSchema>
|
||||||
|
</configSchema>
|
37
iis/ModSecurityIIS.sln
Normal file
37
iis/ModSecurityIIS.sln
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
|
# Visual Studio 2010
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ModSecurityIIS", "ModSecurityIIS.vcxproj", "{D1F7201F-064B-48AB-868C-FED22464841C}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||||
|
Debug|Win32 = Debug|Win32
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|Mixed Platforms = Release|Mixed Platforms
|
||||||
|
Release|Win32 = Release|Win32
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{D1F7201F-064B-48AB-868C-FED22464841C}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
|
||||||
|
{D1F7201F-064B-48AB-868C-FED22464841C}.Debug|Mixed Platforms.Build.0 = Debug|x64
|
||||||
|
{D1F7201F-064B-48AB-868C-FED22464841C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{D1F7201F-064B-48AB-868C-FED22464841C}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{D1F7201F-064B-48AB-868C-FED22464841C}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{D1F7201F-064B-48AB-868C-FED22464841C}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{D1F7201F-064B-48AB-868C-FED22464841C}.Debug|x86.ActiveCfg = Debug|Win32
|
||||||
|
{D1F7201F-064B-48AB-868C-FED22464841C}.Release|Mixed Platforms.ActiveCfg = Release|x64
|
||||||
|
{D1F7201F-064B-48AB-868C-FED22464841C}.Release|Mixed Platforms.Build.0 = Release|x64
|
||||||
|
{D1F7201F-064B-48AB-868C-FED22464841C}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{D1F7201F-064B-48AB-868C-FED22464841C}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{D1F7201F-064B-48AB-868C-FED22464841C}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{D1F7201F-064B-48AB-868C-FED22464841C}.Release|x64.Build.0 = Release|x64
|
||||||
|
{D1F7201F-064B-48AB-868C-FED22464841C}.Release|x86.ActiveCfg = Release|Win32
|
||||||
|
{D1F7201F-064B-48AB-868C-FED22464841C}.Release|x86.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
233
iis/ModSecurityIIS.vcxproj
Normal file
233
iis/ModSecurityIIS.vcxproj
Normal file
@@ -0,0 +1,233 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{D1F7201F-064B-48AB-868C-FED22464841C}</ProjectGuid>
|
||||||
|
<RootNamespace>ModSecurityIIS</RootNamespace>
|
||||||
|
<ProjectName>ModSecurityIIS</ProjectName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||||
|
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.dll</TargetExt>
|
||||||
|
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.dll</TargetExt>
|
||||||
|
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.dll</TargetExt>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2;..\standalone</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);WIN32;WINNT;inline=APR_INLINE;AP_DECLARE_STATIC;VERSION_IIS</PreprocessorDefinitions>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
|
||||||
|
<PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<ModuleDefinitionFile>mymodule.def</ModuleDefinitionFile>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies);C:\apache22\lib\libapr-1.lib;C:\apache22\lib\libaprutil-1.lib;C:\work\pcre-8.30\pcre.lib;C:\work\libxml2-2.7.7\win32\bin.msvc\libxml2.lib</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>copy /y $(TargetPath) c:\drop\$(PlatformShortName)
|
||||||
|
copy /y $(TargetDir)$(TargetName).pdb c:\drop\$(PlatformShortName)
|
||||||
|
</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2;..\standalone</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);WIN32;WINNT;inline=APR_INLINE;AP_DECLARE_STATIC</PreprocessorDefinitions>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
|
||||||
|
<PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<ModuleDefinitionFile>mymodule.def</ModuleDefinitionFile>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies);libapr-1.lib;libaprutil-1.lib;pcre.lib;libxml2.lib</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>c:\drop\amd64</AdditionalLibraryDirectories>
|
||||||
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>copy /y $(TargetPath) c:\drop\$(PlatformShortName)
|
||||||
|
copy /y $(TargetDir)$(TargetName).pdb c:\drop\$(PlatformShortName)
|
||||||
|
</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);WIN32;WINNT;inline=APR_INLINE;AP_DECLARE_STATIC;VERSION_IIS</PreprocessorDefinitions>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<AdditionalIncludeDirectories>C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2;..\standalone</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<ModuleDefinitionFile>mymodule.def</ModuleDefinitionFile>
|
||||||
|
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies);C:\apache22\lib\libapr-1.lib;C:\apache22\lib\libaprutil-1.lib;C:\work\pcre-8.30\pcre.lib;C:\work\libxml2-2.7.7\win32\bin.msvc\libxml2.lib</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>copy /y $(TargetPath) c:\drop\$(PlatformShortName)
|
||||||
|
copy /y $(TargetDir)$(TargetName).pdb c:\drop\$(PlatformShortName)
|
||||||
|
</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);WIN32;WINNT;inline=APR_INLINE;AP_DECLARE_STATIC</PreprocessorDefinitions>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<AdditionalIncludeDirectories>C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2;..\standalone</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<ModuleDefinitionFile>mymodule.def</ModuleDefinitionFile>
|
||||||
|
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies);libapr-1.lib;libaprutil-1.lib;pcre.lib;libxml2.lib</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>c:\drop\amd64</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>copy /y $(TargetPath) c:\drop\$(PlatformShortName)
|
||||||
|
copy /y $(TargetDir)$(TargetName).pdb c:\drop\$(PlatformShortName)
|
||||||
|
</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\apache2\acmp.c" />
|
||||||
|
<ClCompile Include="..\apache2\apache2_config.c" />
|
||||||
|
<ClCompile Include="..\apache2\apache2_io.c" />
|
||||||
|
<ClCompile Include="..\apache2\apache2_util.c" />
|
||||||
|
<ClCompile Include="..\apache2\modsecurity.c" />
|
||||||
|
<ClCompile Include="..\apache2\mod_security2.c" />
|
||||||
|
<ClCompile Include="..\apache2\msc_crypt.c" />
|
||||||
|
<ClCompile Include="..\apache2\msc_geo.c" />
|
||||||
|
<ClCompile Include="..\apache2\msc_gsb.c" />
|
||||||
|
<ClCompile Include="..\apache2\msc_logging.c" />
|
||||||
|
<ClCompile Include="..\apache2\msc_lua.c" />
|
||||||
|
<ClCompile Include="..\apache2\msc_multipart.c" />
|
||||||
|
<ClCompile Include="..\apache2\msc_parsers.c" />
|
||||||
|
<ClCompile Include="..\apache2\msc_pcre.c" />
|
||||||
|
<ClCompile Include="..\apache2\msc_release.c" />
|
||||||
|
<ClCompile Include="..\apache2\msc_reqbody.c" />
|
||||||
|
<ClCompile Include="..\apache2\msc_tree.c" />
|
||||||
|
<ClCompile Include="..\apache2\msc_unicode.c" />
|
||||||
|
<ClCompile Include="..\apache2\msc_util.c" />
|
||||||
|
<ClCompile Include="..\apache2\msc_xml.c" />
|
||||||
|
<ClCompile Include="..\apache2\persist_dbm.c" />
|
||||||
|
<ClCompile Include="..\apache2\re.c" />
|
||||||
|
<ClCompile Include="..\apache2\re_actions.c" />
|
||||||
|
<ClCompile Include="..\apache2\re_operators.c" />
|
||||||
|
<ClCompile Include="..\apache2\re_tfns.c" />
|
||||||
|
<ClCompile Include="..\apache2\re_variables.c" />
|
||||||
|
<ClCompile Include="..\standalone\api.c" />
|
||||||
|
<ClCompile Include="..\standalone\buckets.c" />
|
||||||
|
<ClCompile Include="..\standalone\config.c" />
|
||||||
|
<ClCompile Include="..\standalone\filters.c" />
|
||||||
|
<ClCompile Include="..\standalone\hooks.c" />
|
||||||
|
<ClCompile Include="..\standalone\regex.c" />
|
||||||
|
<ClCompile Include="..\standalone\server.c" />
|
||||||
|
<ClCompile Include="main.cpp" />
|
||||||
|
<ClCompile Include="moduleconfig.cpp" />
|
||||||
|
<ClCompile Include="mymodule.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="ModSecurity.xml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</None>
|
||||||
|
<None Include="mymodule.def" />
|
||||||
|
<None Include="readme.htm">
|
||||||
|
<DeploymentContent>true</DeploymentContent>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\apache2\acmp.h" />
|
||||||
|
<ClInclude Include="..\apache2\apache2.h" />
|
||||||
|
<ClInclude Include="..\apache2\modsecurity.h" />
|
||||||
|
<ClInclude Include="..\apache2\modsecurity_config.h" />
|
||||||
|
<ClInclude Include="..\apache2\modsecurity_config_auto.h" />
|
||||||
|
<ClInclude Include="..\apache2\msc_crypt.h" />
|
||||||
|
<ClInclude Include="..\apache2\msc_geo.h" />
|
||||||
|
<ClInclude Include="..\apache2\msc_gsb.h" />
|
||||||
|
<ClInclude Include="..\apache2\msc_logging.h" />
|
||||||
|
<ClInclude Include="..\apache2\msc_lua.h" />
|
||||||
|
<ClInclude Include="..\apache2\msc_multipart.h" />
|
||||||
|
<ClInclude Include="..\apache2\msc_parsers.h" />
|
||||||
|
<ClInclude Include="..\apache2\msc_pcre.h" />
|
||||||
|
<ClInclude Include="..\apache2\msc_release.h" />
|
||||||
|
<ClInclude Include="..\apache2\msc_tree.h" />
|
||||||
|
<ClInclude Include="..\apache2\msc_unicode.h" />
|
||||||
|
<ClInclude Include="..\apache2\msc_util.h" />
|
||||||
|
<ClInclude Include="..\apache2\msc_xml.h" />
|
||||||
|
<ClInclude Include="..\apache2\persist_dbm.h" />
|
||||||
|
<ClInclude Include="..\apache2\re.h" />
|
||||||
|
<ClInclude Include="..\apache2\utf8tables.h" />
|
||||||
|
<ClInclude Include="..\standalone\api.h" />
|
||||||
|
<ClInclude Include="moduleconfig.h" />
|
||||||
|
<ClInclude Include="mymodule.h" />
|
||||||
|
<ClInclude Include="mymodulefactory.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
191
iis/ModSecurityIIS.vcxproj.filters
Normal file
191
iis/ModSecurityIIS.vcxproj.filters
Normal file
@@ -0,0 +1,191 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="moduleconfig.cpp" />
|
||||||
|
<ClCompile Include="mymodule.cpp" />
|
||||||
|
<ClCompile Include="..\apache2\acmp.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\apache2_config.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\apache2_io.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\apache2_util.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\mod_security2.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\modsecurity.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\msc_geo.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\msc_gsb.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\msc_logging.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\msc_lua.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\msc_multipart.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\msc_parsers.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\msc_pcre.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\msc_release.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\msc_reqbody.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\msc_unicode.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\msc_util.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\msc_xml.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\persist_dbm.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\re.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\re_actions.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\re_operators.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\re_tfns.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\re_variables.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\standalone\api.c">
|
||||||
|
<Filter>Standalone</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\standalone\buckets.c">
|
||||||
|
<Filter>Standalone</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\standalone\config.c">
|
||||||
|
<Filter>Standalone</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\standalone\filters.c">
|
||||||
|
<Filter>Standalone</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\standalone\hooks.c">
|
||||||
|
<Filter>Standalone</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="main.cpp" />
|
||||||
|
<ClCompile Include="..\standalone\regex.c">
|
||||||
|
<Filter>Standalone</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\standalone\server.c">
|
||||||
|
<Filter>Standalone</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\msc_crypt.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\apache2\msc_tree.c">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="moduleconfig.h" />
|
||||||
|
<ClInclude Include="mymodule.h" />
|
||||||
|
<ClInclude Include="mymodulefactory.h" />
|
||||||
|
<ClInclude Include="..\apache2\acmp.h">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\apache2\modsecurity.h">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\apache2\modsecurity_config.h">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\apache2\modsecurity_config_auto.h">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\apache2\msc_geo.h">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\apache2\msc_gsb.h">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\apache2\msc_logging.h">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\apache2\msc_lua.h">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\apache2\msc_multipart.h">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\apache2\msc_parsers.h">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\apache2\msc_pcre.h">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\apache2\msc_release.h">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\apache2\msc_unicode.h">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\apache2\msc_util.h">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\apache2\msc_xml.h">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\apache2\persist_dbm.h">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\apache2\re.h">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\apache2\utf8tables.h">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\apache2\apache2.h">
|
||||||
|
<Filter>Standalone</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\standalone\api.h">
|
||||||
|
<Filter>Standalone</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\apache2\msc_crypt.h">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\apache2\msc_tree.h">
|
||||||
|
<Filter>ModSecurity</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="ModSecurity.xml" />
|
||||||
|
<None Include="mymodule.def" />
|
||||||
|
<None Include="readme.htm" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="ModSecurity">
|
||||||
|
<UniqueIdentifier>{ba9b4453-b351-4739-9f9d-3d56d6b27bbc}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Standalone">
|
||||||
|
<UniqueIdentifier>{ba6117ea-f101-4d23-85f2-d1af0235e22a}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
39
iis/ModSecurityIIS/ModSecurityIIS.sln
Normal file
39
iis/ModSecurityIIS/ModSecurityIIS.sln
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
|
# Visual Studio 2010
|
||||||
|
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "ModSecurityIIS", "ModSecurityIIS\ModSecurityIIS.vdproj", "{3352AEF1-9F2A-47CD-9F63-658553063040}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{023E10BD-4FF6-4401-9A40-AED9717073F2} = {023E10BD-4FF6-4401-9A40-AED9717073F2}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "configure", "ModSecurityIIS\installer project\configure.csproj", "{023E10BD-4FF6-4401-9A40-AED9717073F2}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{3352AEF1-9F2A-47CD-9F63-658553063040}.Debug|x64.ActiveCfg = Debug
|
||||||
|
{3352AEF1-9F2A-47CD-9F63-658553063040}.Debug|x64.Build.0 = Debug
|
||||||
|
{3352AEF1-9F2A-47CD-9F63-658553063040}.Debug|x86.ActiveCfg = Debug
|
||||||
|
{3352AEF1-9F2A-47CD-9F63-658553063040}.Debug|x86.Build.0 = Debug
|
||||||
|
{3352AEF1-9F2A-47CD-9F63-658553063040}.Release|x64.ActiveCfg = Release
|
||||||
|
{3352AEF1-9F2A-47CD-9F63-658553063040}.Release|x64.Build.0 = Release
|
||||||
|
{3352AEF1-9F2A-47CD-9F63-658553063040}.Release|x86.ActiveCfg = Release
|
||||||
|
{3352AEF1-9F2A-47CD-9F63-658553063040}.Release|x86.Build.0 = Release
|
||||||
|
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Release|x64.Build.0 = Release|x64
|
||||||
|
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Release|x86.Build.0 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
245
iis/ModSecurityIIS/ModSecurityIIS/EULA.rtf
Normal file
245
iis/ModSecurityIIS/ModSecurityIIS/EULA.rtf
Normal file
@@ -0,0 +1,245 @@
|
|||||||
|
{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch0\stshfloch31506\stshfhich31506\stshfbi31506\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
|
||||||
|
{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
|
||||||
|
{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;}
|
||||||
|
{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
|
||||||
|
{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}
|
||||||
|
{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f39\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f40\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
|
||||||
|
{\f42\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f43\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f44\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f45\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
|
||||||
|
{\f46\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f47\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f39\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f40\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
|
||||||
|
{\f42\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f43\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f44\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f45\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
|
||||||
|
{\f46\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f47\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f409\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\f410\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}
|
||||||
|
{\f412\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\f413\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\f416\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\f417\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}
|
||||||
|
{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
|
||||||
|
{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
|
||||||
|
{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
|
||||||
|
{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
|
||||||
|
{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
|
||||||
|
{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}
|
||||||
|
{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;}{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}
|
||||||
|
{\fhimajor\f31536\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
|
||||||
|
{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
|
||||||
|
{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
|
||||||
|
{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
|
||||||
|
{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
|
||||||
|
{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
|
||||||
|
{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
|
||||||
|
{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
|
||||||
|
{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}
|
||||||
|
{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}
|
||||||
|
{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
|
||||||
|
{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
|
||||||
|
{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}
|
||||||
|
{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;
|
||||||
|
\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\*\defchp \f31506\fs22 }{\*\defpap \ql \li0\ri0\sa200\sl276\slmult1
|
||||||
|
\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0
|
||||||
|
\f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\*
|
||||||
|
\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1
|
||||||
|
\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31506\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext11 \ssemihidden \sunhideused Normal Table;}{
|
||||||
|
\s15\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033
|
||||||
|
\sbasedon0 \snext15 \ssemihidden \sunhideused \styrsid3168183 Normal (Web);}{\*\cs16 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \ul\cf2 \sbasedon10 \ssemihidden \sunhideused \styrsid3168183 Hyperlink;}{\*\cs17 \additive \rtlch\fcs1 \ab\af0 \ltrch\fcs0 \b
|
||||||
|
\sbasedon10 \sqformat \spriority22 \styrsid3168183 Strong;}}{\*\listtable{\list\listtemplateid235441858{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}
|
||||||
|
\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||||
|
\fi-360\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li2160
|
||||||
|
\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li2880\jclisttab\tx2880\lin2880 }
|
||||||
|
{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc0
|
||||||
|
\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li4320\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0
|
||||||
|
\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5040\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0
|
||||||
|
\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5760\jclisttab\tx5760\lin5760 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative
|
||||||
|
\levelspace0\levelindent0{\leveltext\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li6480\jclisttab\tx6480\lin6480 }{\listname ;}\listid625282538}}{\*\listoverridetable{\listoverride\listid625282538\listoverridecount0\ls1}}{\*\pgptbl
|
||||||
|
{\pgp\ipgp2\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp4\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp0\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp3\itap0\li0\ri0\sb0\sa0}}{\*\rsidtbl \rsid1197496\rsid3168183\rsid6967166\rsid9512544\rsid12742482\rsid16593896}{\mmathPr\mmathFont34\mbrkBin0
|
||||||
|
\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author Suha Can}{\operator Greg}{\creatim\yr2012\mo6\dy4\hr11\min43}{\revtim\yr2012\mo7\dy9\min41}{\version3}{\edmins2}{\nofpages4}{\nofwords1368}
|
||||||
|
{\nofchars7798}{\*\company Microsoft Corporation}{\nofcharsws9148}{\vern49273}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect
|
||||||
|
\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont1\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1\noxlattoyen
|
||||||
|
\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1440\dgvorigin1440\dghshow1\dgvshow1
|
||||||
|
\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct
|
||||||
|
\asianbrkrule\rsidroot9512544\newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0
|
||||||
|
{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang
|
||||||
|
{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang
|
||||||
|
{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}
|
||||||
|
\pard\plain \ltrpar\s15\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid3168183 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
|
||||||
|
\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 Apache License\line \line Version 2.0, January 2004\line \line }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183
|
||||||
|
HYPERLINK "http://www.apache.org/licenses/" }}{\fldrslt {\rtlch\fcs1 \af0 \ltrch\fcs0 \cs16\ul\cf2\lang9\langfe1033\langnp9\insrsid3168183 http://www.apache.org/licenses/}}}\sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\rtlch\fcs1
|
||||||
|
\af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183
|
||||||
|
\par TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
\par }{\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \cs17\b\lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkstart definitions}1. Definitions}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkend definitions}.
|
||||||
|
\par "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
\par "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
||||||
|
\par "
|
||||||
|
Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause
|
||||||
|
the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
\par "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
||||||
|
\par "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
||||||
|
\par "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
||||||
|
\par "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
||||||
|
\par "Derivative Works" shall mean any work, whether in Source or Object form, that is based on
|
||||||
|
(or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that rema
|
||||||
|
in separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
||||||
|
\par "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or
|
||||||
|
Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitt
|
||||||
|
e
|
||||||
|
d" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed
|
||||||
|
by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
\par "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
||||||
|
\par }{\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \cs17\b\lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkstart copyright}2. Grant of Copyright License}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkend copyright}
|
||||||
|
. Subject to the terms and conditions of this License, each Contributor here
|
||||||
|
by grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in
|
||||||
|
Source or Object form.
|
||||||
|
\par }{\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \cs17\b\lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkstart patent}3. Grant of Patent License}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkend patent}
|
||||||
|
. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) pate
|
||||||
|
nt license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by com
|
||||||
|
b
|
||||||
|
ination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated
|
||||||
|
within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
||||||
|
\par }{\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \cs17\b\lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkstart redistribution}4. Redistribution}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkend redistribution}
|
||||||
|
. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
||||||
|
\par {\listtext\pard\plain\ltrpar \s15 \rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 \hich\af0\dbch\af0\loch\f0 1.\tab}}\pard \ltrpar\s15\ql \fi-360\li720\ri0\sb100\sa100\sbauto1\saauto1\widctlpar
|
||||||
|
\jclisttab\tx720\wrapdefault\aspalpha\aspnum\faauto\ls1\adjustright\rin0\lin720\itap0\pararsid3168183 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 You must give any other recipients of the Work or D
|
||||||
|
erivative Works a copy of this License; and
|
||||||
|
\par {\listtext\pard\plain\ltrpar \s15 \rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 \hich\af0\dbch\af0\loch\f0 2.\tab}You must cause any modified files to carry prominent notices stating that You changed the files; and
|
||||||
|
\par {\listtext\pard\plain\ltrpar \s15 \rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 \hich\af0\dbch\af0\loch\f0 3.\tab}You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, tradema
|
||||||
|
rk, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
||||||
|
\par {\listtext\pard\plain\ltrpar \s15 \rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 \hich\af0\dbch\af0\loch\f0 4.\tab}If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You dis
|
||||||
|
tribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distribu
|
||||||
|
t
|
||||||
|
ed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the
|
||||||
|
|
||||||
|
NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additiona
|
||||||
|
l
|
||||||
|
attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modificat
|
||||||
|
ions, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
||||||
|
\par }\pard \ltrpar\s15\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid3168183 {\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \cs17\b\lang9\langfe1033\langnp9\insrsid3168183
|
||||||
|
{\*\bkmkstart contributions}5. Submission of Contributions}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkend contributions}. Unless You explicitly state otherwise, any Contri
|
||||||
|
bution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the te
|
||||||
|
rms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
||||||
|
\par }{\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \cs17\b\lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkstart trademarks}6. Trademarks}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkend trademarks}
|
||||||
|
. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as requ
|
||||||
|
ired for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
\par }{\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \cs17\b\lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkstart no-warranty}7. Disclaimer of Warranty}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkend no-warranty}
|
||||||
|
. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributo
|
||||||
|
r provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULA
|
||||||
|
R PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
||||||
|
\par }{\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \cs17\b\lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkstart no-liability}8. Limitation of Liability}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkend no-liability}
|
||||||
|
. In no event and under no legal th
|
||||||
|
eory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indi
|
||||||
|
r
|
||||||
|
ect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfuncti
|
||||||
|
on, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
||||||
|
\par }{\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \cs17\b\lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkstart additional}9. Accepting Warranty or Additional Liability}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang9\langfe1033\langnp9\insrsid3168183 {\*\bkmkend additional}
|
||||||
|
. While redistributing the Work or Derivative Works thereof, You may choose to
|
||||||
|
offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibilit
|
||||||
|
y
|
||||||
|
, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additiona
|
||||||
|
l liability.
|
||||||
|
\par END OF TERMS AND CONDITIONS
|
||||||
|
\par }\pard\plain \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af0
|
||||||
|
\ltrch\fcs0 \insrsid6967166
|
||||||
|
\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a
|
||||||
|
9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad
|
||||||
|
5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6
|
||||||
|
b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0
|
||||||
|
0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6
|
||||||
|
a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f
|
||||||
|
c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512
|
||||||
|
0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462
|
||||||
|
a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865
|
||||||
|
6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b
|
||||||
|
4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b
|
||||||
|
4757e8d3f729e245eb2b260a0238fd010000ffff0300504b030414000600080000002100da7e1364a9060000a41b0000160000007468656d652f7468656d652f
|
||||||
|
7468656d65312e786d6cec594d6f1b4518be23f11f467b6f6327761a4775aad8b11b48d346b15bd4e37877bc3bcdecce6a669cd437d41e9190100571a012370e
|
||||||
|
08a8d44a5ccaaf09144191fa1778676677bd13af49d24650417b68bcb3cffbfd31efcc5ebd763f66e890084979d2f6ea976b1e2289cf039a846deff6b07f69cd
|
||||||
|
4352e124c08c27a4ed4d89f4ae6dbcffde55bcae22121304f4895cc76d2f522a5d5f5a923e2c637999a7248177632e62ace051844b81c047c037664bcbb5daea
|
||||||
|
528c69e2a104c7c0f6d6784c7d82869aa5b79133ef31784c94d40b3e1303cd9a3814061b1cd435424e659709748859db0339013f1a92fbca430c4b052fda5ead
|
||||||
|
d6efd76aded2c6d525bc9e1131b580d6a1abc1bf8c2e23080e968d4c118e0aa1f57ea37565abe06f004ccde37abd5eb7572ff81900f67db0d4ea52e6d9e8afd5
|
||||||
|
3b39cf12c8fe9ce7ddad356b0d175fe2bf32a773abd3e9345b992e96a901d99f8d39fc5a6db5b1b9ece00dc8e29b73f84667b3db5d75f00664f1ab73f8fe95d6
|
||||||
|
6ac3c51b50c468723087d671e9f733ee0564ccd976257c0de06b79206728c88622bbb488314fd4a25c8bf13d2efa00d04086154d909aa6648c7dc8e22e8e4782
|
||||||
|
62ad0f5e27b8f4c62ef9726e49cb42d21734556defc3144345ccf8bd7afefdabe74fd1f18367c70f7e3a7ef8f0f8c18f969143b58d93b04cf5f2dbcffe7cfc31
|
||||||
|
fae3e9372f1f7d518d9765fcaf3f7cf2cbcf9f5703a17c66eabcf8f2c96fcf9ebcf8ead3dfbf7b5401df147854860f694c24ba498ed03e8fc130e31557733212
|
||||||
|
e7a31846989629369350e2046b2915fc7b2a72d037a79865d171f4e810d7837704b48f2ae0f5c93d47e14124268a5648de896207b8cb39eb7051e9851d2dabe4
|
||||||
|
e6e12409ab858b4919b78ff16195ec2e4e9cf8f62629f4cd3c2d1dc3bb1171d4dc6338513824095148bfe307845458779752c7afbbd4175cf2b1427729ea605a
|
||||||
|
e992211d39d93423daa631c4655a6533c4dbf1cdee1dd4e1accaea2d72e822a12a30ab507e4898e3c6eb78a2705cc57288635676f80daca22a250753e197713d
|
||||||
|
a920d221611cf502226515cd2d01f69682be83a16355867d974d631729143da8e27903735e466ef1836e84e3b40a3ba04954c67e200f204531dae3aa0abecbdd
|
||||||
|
0ad1cf10079c2c0cf71d4a9c709fde0d6ed3d051699620facd4454c4f23ae14efe0ea66c8c896935d0d49d5e1dd3e4ef1a37a3d0b9ad848b6bdcd02a5f7cfdb8
|
||||||
|
42efb7b5656fc2ee555533db271af522dcc9f6dce522a06f7f77dec293648f4041cc6f51ef9af3bbe6ecfde79bf3a27abef8963cebc2d0a0f52c62076d3376c7
|
||||||
|
0ba7ee31656ca0a68cdc9066f096b0f7047d58d474e6c4498a53581ac14f5dc920c0c185021b1a24b8fa88aa6810e11486f6baa7998432631d4a9472098745b3
|
||||||
|
5cc95be361f057f6a8d9d48710db392456bb3cb0cb2b7a393f6b146c8c56a139d0e682563483b30a5bb9923105db5e47585d2b75666975a39a698a8eb4c264ed
|
||||||
|
627328079717a6c162e14d186a108c42e0e55538f36bd170d8c18c04daef364679584c142e324432c201c962a4ed9e8f51dd0429cf953943b41d3619f4c1f114
|
||||||
|
af95a4b534db379076962095c5351688cba3f72651ca33781625e076b21c59522e4e96a0a3b6d76a2e373de4e3b4ed8de19c0c3fe314a22ef51c895908974dbe
|
||||||
|
1236ed4f2d6653e5b368b672c3dc22a8c3d587f5fb9cc14e1f4885545b58463635ccab2c0558a22559fd979be0d68b32a0a21b9d4d8b953548867f4d0bf0a31b
|
||||||
|
5a321e135f95835d5ad1beb38f592be51345c4200a8ed0884dc43e86f0eb54057b022ae1bac37404fd007773dadbe695db9cb3a22bdf88199c5dc72c8d70d66e
|
||||||
|
7589e6956ce1a621153a98a7927a605ba5eec6b8f39b624afe824c29a7f1ffcc14bd9fc0edc34aa023e0c3d5b0c048574adbe342451cba501a51bf2f607030bd
|
||||||
|
03b205ee77e13524155c509bbf821ceabfb6e62c0f53d6708854fb344482c27ea42241c81eb425937da730ab677b9765c9324626a34aeacad4aa3d2287840d75
|
||||||
|
0f5cd57bbb87224875d34db236607027f3cf7dce2a6814ea21a75c6f4e272bf65e5b03fff4e4638b198c72fbb0196872ff172a16e3c16c57b5f4863cdf7bcb86
|
||||||
|
e817b331ab915705082b6d05adacec5f5385736eb5b663cd59bcdccc958328ce5b0c8bc54094c21d12d2ffc1fe4785cfecd70ebda10ef93ef456041f2f343348
|
||||||
|
1bc8ea4b76f040ba41dac5110c4e76d1269366655d9b8d4eda6bf9667dc1936e21f784b3b5666789f7399d5d0c67ae38a7162fd2d999871d5fdbb585ae86c89e
|
||||||
|
2c51581ae707191318f399acfc258b8fee41a0b7e09bc18429699209be53090c33f4c0d40114bf95684837fe020000ffff0300504b0304140006000800000021
|
||||||
|
000dd1909fb60000001b010000270000007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484
|
||||||
|
f78277086f6fd3ba109126dd88d0add40384e4350d363f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e
|
||||||
|
89d93b64b060828e6f37ed1567914b284d262452282e3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5
|
||||||
|
001996509affb3fd381a89672f1f165dfe514173d9850528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de
|
||||||
|
0fbfff0000001c0200001300000000000000000000000000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5
|
||||||
|
d6a7e7c0000000360100000b00000000000000000000000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b79961683000000
|
||||||
|
8a0000001c00000000000000000000000000190200007468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d001400060008000000
|
||||||
|
2100da7e1364a9060000a41b00001600000000000000000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d0014000600
|
||||||
|
0800000021000dd1909fb60000001b0100002700000000000000000000000000b30900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000ae0a00000000}
|
||||||
|
{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d
|
||||||
|
617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169
|
||||||
|
6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363
|
||||||
|
656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e}
|
||||||
|
{\*\latentstyles\lsdstimax267\lsdlockeddef0\lsdsemihiddendef1\lsdunhideuseddef1\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4;
|
||||||
|
\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;
|
||||||
|
\lsdpriority39 \lsdlocked0 toc 1;\lsdpriority39 \lsdlocked0 toc 2;\lsdpriority39 \lsdlocked0 toc 3;\lsdpriority39 \lsdlocked0 toc 4;\lsdpriority39 \lsdlocked0 toc 5;\lsdpriority39 \lsdlocked0 toc 6;\lsdpriority39 \lsdlocked0 toc 7;
|
||||||
|
\lsdpriority39 \lsdlocked0 toc 8;\lsdpriority39 \lsdlocked0 toc 9;\lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdpriority1 \lsdlocked0 Default Paragraph Font;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority59 \lsdlocked0 Table Grid;\lsdunhideused0 \lsdlocked0 Placeholder Text;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 1;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdunhideused0 \lsdlocked0 Revision;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 2;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 2;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 3;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 3;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 4;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 5;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 5;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 5;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 6;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 6;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;
|
||||||
|
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdpriority37 \lsdlocked0 Bibliography;\lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;}}{\*\datastore 010500000200000018000000
|
||||||
|
4d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000
|
||||||
|
d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e50000000000000000000000002079
|
||||||
|
0935a65dcd01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
|
||||||
|
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000105000000000000}}
|
13
iis/ModSecurityIIS/ModSecurityIIS/ModSecurity.xml
Normal file
13
iis/ModSecurityIIS/ModSecurityIIS/ModSecurity.xml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
ModSecurity configuration schema.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<configSchema>
|
||||||
|
|
||||||
|
<sectionSchema name="system.webServer/ModSecurity">
|
||||||
|
<attribute name="enabled" type="bool" defaultValue="false"/>
|
||||||
|
<attribute name="configFile" type="string" defaultValue="c:\inetpub\modsecurity.conf" validationType="nonEmptyString" />
|
||||||
|
</sectionSchema>
|
||||||
|
</configSchema>
|
1813
iis/ModSecurityIIS/ModSecurityIIS/ModSecurityIIS.vdproj
Normal file
1813
iis/ModSecurityIIS/ModSecurityIIS/ModSecurityIIS.vdproj
Normal file
File diff suppressed because it is too large
Load Diff
BIN
iis/ModSecurityIIS/ModSecurityIIS/ModSecurityLogo.ico
Normal file
BIN
iis/ModSecurityIIS/ModSecurityIIS/ModSecurityLogo.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.7 KiB |
21
iis/ModSecurityIIS/ModSecurityIIS/README.TXT
Normal file
21
iis/ModSecurityIIS/ModSecurityIIS/README.TXT
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
Please note that installing ModSecurity for IIS requires IIS to be installed and enabled.
|
||||||
|
|
||||||
|
|
||||||
|
After installing ModSecurity for IIS, the module will be running in all websites by default. To remove from a website add to web.config:
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<remove name="ModSecurityIIS" />
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
To configure module in a website add to web.config:
|
||||||
|
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration>
|
||||||
|
<system.webServer>
|
||||||
|
<ModSecurity enabled="true" configFile="c:\inetpub\wwwroot\xss.conf" />
|
||||||
|
</system.webServer>
|
||||||
|
</configuration>
|
||||||
|
|
||||||
|
where configFile is standard ModSecurity config file.
|
||||||
|
|
||||||
|
Events from the module will show up in "Application" Windows log.
|
3
iis/ModSecurityIIS/ModSecurityIIS/install.vbs
Normal file
3
iis/ModSecurityIIS/ModSecurityIIS/install.vbs
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Set WshShell = CreateObject("WScript.Shell")
|
||||||
|
|
||||||
|
WshShell.Exec("%windir%\system32\inetsrv\appcmd.exe install module /name:ModSecurityIIS /image:%windir%\system32\inetsrv\modsecurityiis.dll")
|
@@ -0,0 +1,314 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using System.IO;
|
||||||
|
using System.Xml;
|
||||||
|
using AppHostAdminLibrary;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace configure
|
||||||
|
{
|
||||||
|
public class ModSecurityConfigurator
|
||||||
|
{
|
||||||
|
public void Install(string installDir)
|
||||||
|
{
|
||||||
|
if (installDir.EndsWith("\""))
|
||||||
|
{
|
||||||
|
installDir = installDir.Substring(0, installDir.Length - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
Console.WriteLine("Copying 32-bit binaries...");
|
||||||
|
string dstpath = Environment.ExpandEnvironmentVariables("%windir%\\SysWow64");
|
||||||
|
|
||||||
|
if (!Directory.Exists(dstpath))
|
||||||
|
dstpath = Environment.ExpandEnvironmentVariables("%windir%\\system32");
|
||||||
|
|
||||||
|
CopyBinaries(Path.Combine(installDir, "x86"), Path.Combine(dstpath, "inetsrv"));
|
||||||
|
|
||||||
|
dstpath = Environment.ExpandEnvironmentVariables("%windir%\\SysNative");
|
||||||
|
|
||||||
|
if (Directory.Exists(dstpath))
|
||||||
|
{
|
||||||
|
Console.WriteLine("Copying 64-bit binaries...");
|
||||||
|
|
||||||
|
CopyBinaries(Path.Combine(installDir, "amd64"), Path.Combine(dstpath, "inetsrv"));
|
||||||
|
}
|
||||||
|
|
||||||
|
string text = Path.Combine(installDir, "ModSecurity.xml");
|
||||||
|
string text2 = null;
|
||||||
|
IntPtr zero = IntPtr.Zero;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
bool flag = false;
|
||||||
|
if (Wow64Redirection.IsWow64Process(new IntPtr(-1), out flag) && flag)
|
||||||
|
{
|
||||||
|
Wow64Redirection.Wow64DisableWow64FsRedirection(out zero);
|
||||||
|
}
|
||||||
|
if (!File.Exists(text))
|
||||||
|
{
|
||||||
|
throw new FileNotFoundException("The specified schema file does not exist", text);
|
||||||
|
}
|
||||||
|
Console.WriteLine("Installing schema file: " + text);
|
||||||
|
text2 = Path.Combine(Environment.ExpandEnvironmentVariables("%windir%\\system32\\inetsrv\\config\\schema\\"), Path.GetFileName(text));
|
||||||
|
if (!text2.Equals(text, StringComparison.InvariantCultureIgnoreCase))
|
||||||
|
{
|
||||||
|
File.Copy(text, text2, true);
|
||||||
|
Console.WriteLine("Installed schema file: " + text2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Schema file is already in the destination location.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
if (IntPtr.Zero != zero)
|
||||||
|
{
|
||||||
|
Wow64Redirection.Wow64RevertWow64FsRedirection(zero);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SectionList configurationSections = GetConfigurationSections(text2);
|
||||||
|
RegisterConfigurationSections(configurationSections, false);
|
||||||
|
Console.WriteLine("Finished");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* add specific cleanup logic here (basically mirror install)
|
||||||
|
* No need to clean Program Files or other aspects of install, just revert the things you manually modified in Install() */
|
||||||
|
public void Uninstall()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
private SectionList GetConfigurationSections(string schemaPath)
|
||||||
|
{
|
||||||
|
XmlDocument xmlDocument = new XmlDocument();
|
||||||
|
xmlDocument.Load(schemaPath);
|
||||||
|
SectionList sectionList = new SectionList();
|
||||||
|
XmlElement documentElement = xmlDocument.DocumentElement;
|
||||||
|
foreach (XmlNode xmlNode in documentElement.ChildNodes)
|
||||||
|
{
|
||||||
|
if (xmlNode.LocalName.Equals("sectionSchema", StringComparison.InvariantCultureIgnoreCase))
|
||||||
|
{
|
||||||
|
sectionList.Add(new SectionDefinition(xmlNode.Attributes["name"].Value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sectionList;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static SectionList GetConfigurationSections(string sectionGroupName, IAppHostSectionGroup sectionGroup)
|
||||||
|
{
|
||||||
|
SectionList sectionList = new SectionList();
|
||||||
|
string text = string.IsNullOrEmpty(sectionGroupName) ? sectionGroup.Name : (sectionGroupName + "/" + sectionGroup.Name);
|
||||||
|
for (uint num = 0u; num < sectionGroup.Count; num += 1u)
|
||||||
|
{
|
||||||
|
IAppHostSectionGroup sectionGroup2 = sectionGroup[num];
|
||||||
|
SectionList configurationSections = GetConfigurationSections(text, sectionGroup2);
|
||||||
|
sectionList.AddRange(configurationSections);
|
||||||
|
}
|
||||||
|
IAppHostSectionDefinitionCollection sections = sectionGroup.Sections;
|
||||||
|
for (uint num2 = 0u; num2 < sections.Count; num2 += 1u)
|
||||||
|
{
|
||||||
|
IAppHostSectionDefinition appHostSectionDefinition = sections[num2];
|
||||||
|
sectionList.Add(new SectionDefinition(string.IsNullOrEmpty(text) ? appHostSectionDefinition.Name : (text + "/" + appHostSectionDefinition.Name), (AllowDefinition)Enum.Parse(typeof(AllowDefinition), appHostSectionDefinition.AllowDefinition, true), (OverrideModeDefault)Enum.Parse(typeof(OverrideModeDefault), appHostSectionDefinition.OverrideModeDefault, true), appHostSectionDefinition.Type));
|
||||||
|
}
|
||||||
|
return sectionList;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool RegisterConfigSection(IAppHostWritableAdminManager adminManager, SectionDefinition sectionDefinition, string sectionName, IAppHostSectionGroup sectionGroup, bool remove)
|
||||||
|
{
|
||||||
|
string text = null;
|
||||||
|
string sectionName2 = sectionName;
|
||||||
|
int num = sectionName.IndexOf('/');
|
||||||
|
if (num >= 0)
|
||||||
|
{
|
||||||
|
text = sectionName.Substring(0, num);
|
||||||
|
sectionName2 = sectionName.Substring(num + 1, sectionName.Length - num - 1);
|
||||||
|
}
|
||||||
|
if (text != null)
|
||||||
|
{
|
||||||
|
uint count = sectionGroup.Count;
|
||||||
|
for (uint num2 = 0u; num2 < count; num2 += 1u)
|
||||||
|
{
|
||||||
|
IAppHostSectionGroup appHostSectionGroup = sectionGroup[num2];
|
||||||
|
if (appHostSectionGroup.Name.Equals(text, StringComparison.InvariantCultureIgnoreCase))
|
||||||
|
{
|
||||||
|
return RegisterConfigSection(adminManager, sectionDefinition, sectionName2, appHostSectionGroup, remove);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (remove)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
IAppHostSectionGroup sectionGroup2 = sectionGroup.AddSectionGroup(text);
|
||||||
|
return RegisterConfigSection(adminManager, sectionDefinition, sectionName2, sectionGroup2, remove);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IAppHostSectionDefinitionCollection sections = sectionGroup.Sections;
|
||||||
|
bool flag = false;
|
||||||
|
uint count2 = sections.Count;
|
||||||
|
for (uint num3 = 0u; num3 < count2; num3 += 1u)
|
||||||
|
{
|
||||||
|
IAppHostSectionDefinition appHostSectionDefinition = sections[num3];
|
||||||
|
if (appHostSectionDefinition.Name.Equals(sectionName, StringComparison.InvariantCultureIgnoreCase))
|
||||||
|
{
|
||||||
|
flag = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!flag)
|
||||||
|
{
|
||||||
|
if (remove)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
IAppHostSectionDefinition appHostSectionDefinition2 = sections.AddSection(sectionName);
|
||||||
|
appHostSectionDefinition2.OverrideModeDefault = sectionDefinition.OverrideModeDefault.ToString();
|
||||||
|
appHostSectionDefinition2.AllowDefinition = sectionDefinition.AllowDefinition.ToString();
|
||||||
|
appHostSectionDefinition2.Type = sectionDefinition.Type;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (remove)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
IAppHostElement adminSection = adminManager.GetAdminSection(sectionName, "MACHINE/WEBROOT/APPHOST");
|
||||||
|
adminSection.Clear();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
sections.DeleteSection(sectionName);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RegisterConfigurationSections(SectionList sectionList, bool remove)
|
||||||
|
{
|
||||||
|
IAppHostWritableAdminManager appHostWritableAdminManager = new AppHostWritableAdminManagerClass();
|
||||||
|
appHostWritableAdminManager.CommitPath = "MACHINE/WEBROOT/APPHOST";
|
||||||
|
IAppHostConfigManager configManager = appHostWritableAdminManager.ConfigManager;
|
||||||
|
IAppHostConfigFile configFile = configManager.GetConfigFile("MACHINE/WEBROOT/APPHOST");
|
||||||
|
IAppHostSectionGroup rootSectionGroup = configFile.RootSectionGroup;
|
||||||
|
foreach (SectionDefinition current in sectionList)
|
||||||
|
{
|
||||||
|
if (RegisterConfigSection(appHostWritableAdminManager, current, current.Name, rootSectionGroup, remove))
|
||||||
|
{
|
||||||
|
if (remove)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Unregistered section: " + current.Name);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Registered section: " + current.Name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (remove)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Section not currently registered, ignoring: " + current.Name);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("Section already registered, ignoring: " + current.Name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appHostWritableAdminManager.CommitChanges();
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class Wow64Redirection
|
||||||
|
{
|
||||||
|
[DllImport("Kernel32.dll", CharSet = CharSet.Auto)]
|
||||||
|
public static extern bool IsWow64Process(IntPtr hProcess, out bool isWow64);
|
||||||
|
[DllImport("Kernel32.dll", CharSet = CharSet.Auto)]
|
||||||
|
public static extern bool Wow64DisableWow64FsRedirection(out IntPtr oldValue);
|
||||||
|
[DllImport("Kernel32.dll", CharSet = CharSet.Auto)]
|
||||||
|
public static extern bool Wow64RevertWow64FsRedirection(IntPtr oldValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CopyBinaries(string srcpath, string dstpath)
|
||||||
|
{
|
||||||
|
string[] files = { "libapr-1.dll", "libapriconv-1.dll", "libaprutil-1.dll",
|
||||||
|
"libxml2.dll", "lua5.1.dll", "pcre.dll", "zlib1.dll", "ModSecurityIIS.dll" };
|
||||||
|
|
||||||
|
foreach (string s in files)
|
||||||
|
File.Copy(Path.Combine(srcpath, s), Path.Combine(dstpath, s), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum AllowDefinition
|
||||||
|
{
|
||||||
|
MachineOnly,
|
||||||
|
MachineToWebRoot,
|
||||||
|
MachineToApplication,
|
||||||
|
AppHostOnly,
|
||||||
|
Everywhere
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum OverrideModeDefault
|
||||||
|
{
|
||||||
|
Allow,
|
||||||
|
Deny
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SectionDefinition
|
||||||
|
{
|
||||||
|
public const AllowDefinition DefaultAllowDefinition = AllowDefinition.Everywhere;
|
||||||
|
public const OverrideModeDefault DefaultOverrideModeDefault = OverrideModeDefault.Allow;
|
||||||
|
private string name;
|
||||||
|
private AllowDefinition allowDefinition;
|
||||||
|
private OverrideModeDefault overrideModeDefault;
|
||||||
|
private string type;
|
||||||
|
public string Name
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public AllowDefinition AllowDefinition
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.allowDefinition;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public OverrideModeDefault OverrideModeDefault
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.overrideModeDefault;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public string Type
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.type;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this.type = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public SectionDefinition(string sectionName)
|
||||||
|
: this(sectionName, AllowDefinition.Everywhere, OverrideModeDefault.Allow, null)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
public SectionDefinition(string sectionName, AllowDefinition allowDefinition, OverrideModeDefault overrideModeDefault, string type)
|
||||||
|
{
|
||||||
|
this.name = sectionName;
|
||||||
|
this.allowDefinition = allowDefinition;
|
||||||
|
this.overrideModeDefault = overrideModeDefault;
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class SectionList : List<SectionDefinition> {}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,26 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
|
# Visual Studio 2010
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModSecurityIIS Installer", "ModSecurityIIS Installer.csproj", "{023E10BD-4FF6-4401-9A40-AED9717073F2}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Release|x64.Build.0 = Release|x64
|
||||||
|
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{023E10BD-4FF6-4401-9A40-AED9717073F2}.Release|x86.Build.0 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
@@ -0,0 +1,26 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace configure
|
||||||
|
{
|
||||||
|
public class Program
|
||||||
|
{
|
||||||
|
static void Main(string[] args)
|
||||||
|
{
|
||||||
|
ModSecurityConfigurator configurator = new ModSecurityConfigurator();
|
||||||
|
|
||||||
|
if (args.Length > 0)
|
||||||
|
{
|
||||||
|
if (args[0].Equals("uninstall", StringComparison.InvariantCultureIgnoreCase))
|
||||||
|
configurator.Uninstall();
|
||||||
|
else
|
||||||
|
{
|
||||||
|
configurator.Install(args[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("configure.exe <install dir> | uninstall");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("configure")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("configure")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2012")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("320c5ce4-6089-4bb4-a9d2-ea68f9894a88")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
|
// by using the '*' as shown below:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
70
iis/ModSecurityIIS/ModSecurityIIS/installer project/Properties/Resources.Designer.cs
generated
Normal file
70
iis/ModSecurityIIS/ModSecurityIIS/installer project/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.269
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace configure.Properties {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
|
/// </summary>
|
||||||
|
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
|
// class via a tool like ResGen or Visual Studio.
|
||||||
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
|
// with the /str option, or rebuild your VS project.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resources {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resources() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("configure.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
|
/// resource lookups using this strongly typed resource class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static System.Drawing.Bitmap ModSecurityLogo {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("ModSecurityLogo", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,124 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<data name="ModSecurityLogo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\ModSecurityLogo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
26
iis/ModSecurityIIS/ModSecurityIIS/installer project/Properties/Settings.Designer.cs
generated
Normal file
26
iis/ModSecurityIIS/ModSecurityIIS/installer project/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.269
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace configure.Properties {
|
||||||
|
|
||||||
|
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
|
||||||
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
|
||||||
|
public static Settings Default {
|
||||||
|
get {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||||
|
<Profiles>
|
||||||
|
<Profile Name="(Default)" />
|
||||||
|
</Profiles>
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
@@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<configuration>
|
||||||
|
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
|
@@ -0,0 +1,163 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||||
|
<ProductVersion>8.0.30703</ProductVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{023E10BD-4FF6-4401-9A40-AED9717073F2}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>configure</RootNamespace>
|
||||||
|
<AssemblyName>configure</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||||
|
<TargetFrameworkProfile>
|
||||||
|
</TargetFrameworkProfile>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<PublishUrl>publish\</PublishUrl>
|
||||||
|
<Install>true</Install>
|
||||||
|
<InstallFrom>Disk</InstallFrom>
|
||||||
|
<UpdateEnabled>false</UpdateEnabled>
|
||||||
|
<UpdateMode>Foreground</UpdateMode>
|
||||||
|
<UpdateInterval>7</UpdateInterval>
|
||||||
|
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||||
|
<UpdatePeriodically>false</UpdatePeriodically>
|
||||||
|
<UpdateRequired>false</UpdateRequired>
|
||||||
|
<MapFileExtensions>true</MapFileExtensions>
|
||||||
|
<ApplicationRevision>0</ApplicationRevision>
|
||||||
|
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||||
|
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||||
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
<CodeAnalysisLogFile>bin\Debug\ModSecurityIIS Installer.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||||
|
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||||
|
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||||
|
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||||
|
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||||
|
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||||
|
<OutputPath>bin\x64\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
<CodeAnalysisLogFile>bin\Release\ModSecurityIIS Installer.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||||
|
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||||
|
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||||
|
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||||
|
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||||
|
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
|
||||||
|
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup />
|
||||||
|
<PropertyGroup>
|
||||||
|
<StartupObject>configure.Program</StartupObject>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<NoWin32Manifest>true</NoWin32Manifest>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Deployment" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="ModSecurityConfigurator.cs" />
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
</Compile>
|
||||||
|
<None Include="app.config" />
|
||||||
|
<None Include="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<Compile Include="Properties\Settings.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<COMReference Include="AppHostAdminLibrary">
|
||||||
|
<Guid>{598F9C7D-D2D7-4980-B234-F1E753CD9FD9}</Guid>
|
||||||
|
<VersionMajor>1</VersionMajor>
|
||||||
|
<VersionMinor>0</VersionMinor>
|
||||||
|
<Lcid>0</Lcid>
|
||||||
|
<WrapperTool>tlbimp</WrapperTool>
|
||||||
|
<Isolated>False</Isolated>
|
||||||
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
|
</COMReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\ModSecurityLogo.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||||
|
<Install>false</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||||
|
<Install>true</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>Windows Installer 3.1</ProductName>
|
||||||
|
<Install>true</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<PublishUrlHistory>publish\</PublishUrlHistory>
|
||||||
|
<InstallUrlHistory />
|
||||||
|
<SupportUrlHistory />
|
||||||
|
<UpdateUrlHistory />
|
||||||
|
<BootstrapperUrlHistory />
|
||||||
|
<ErrorReportUrlHistory />
|
||||||
|
<FallbackCulture>en-US</FallbackCulture>
|
||||||
|
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
3
iis/ModSecurityIIS/ModSecurityIIS/uninstall.vbs
Normal file
3
iis/ModSecurityIIS/ModSecurityIIS/uninstall.vbs
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Set WshShell = CreateObject("WScript.Shell")
|
||||||
|
|
||||||
|
WshShell.Exec("%windir%\system32\inetsrv\appcmd.exe uninstall module ModSecurityIIS")
|
88
iis/main.cpp
Normal file
88
iis/main.cpp
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
|
||||||
|
#undef inline
|
||||||
|
#define inline inline
|
||||||
|
|
||||||
|
// IIS7 Server API header file
|
||||||
|
#include "httpserv.h"
|
||||||
|
|
||||||
|
// Project header files
|
||||||
|
#include "mymodule.h"
|
||||||
|
#include "mymodulefactory.h"
|
||||||
|
|
||||||
|
// Global server instance
|
||||||
|
IHttpServer * g_pHttpServer = NULL;
|
||||||
|
|
||||||
|
// Global module context id
|
||||||
|
PVOID g_pModuleContext = NULL;
|
||||||
|
|
||||||
|
// The RegisterModule entrypoint implementation.
|
||||||
|
// This method is called by the server when the module DLL is
|
||||||
|
// loaded in order to create the module factory,
|
||||||
|
// and register for server events.
|
||||||
|
HRESULT
|
||||||
|
__stdcall
|
||||||
|
RegisterModule(
|
||||||
|
DWORD dwServerVersion,
|
||||||
|
IHttpModuleRegistrationInfo * pModuleInfo,
|
||||||
|
IHttpServer * pHttpServer
|
||||||
|
)
|
||||||
|
{
|
||||||
|
HRESULT hr = S_OK;
|
||||||
|
CMyHttpModuleFactory * pFactory = NULL;
|
||||||
|
//IHttpModuleRegistrationInfo2 * pModuleInfo2;
|
||||||
|
|
||||||
|
if ( pModuleInfo == NULL || pHttpServer == NULL )
|
||||||
|
{
|
||||||
|
hr = HRESULT_FROM_WIN32( ERROR_INVALID_PARAMETER );
|
||||||
|
goto Finished;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*hr = HttpGetExtendedInterface( g_pGlobalInfo,
|
||||||
|
pModuleInfo,
|
||||||
|
&pModuleInfo2 );
|
||||||
|
if ( FAILED ( hr ) )
|
||||||
|
{
|
||||||
|
goto Finished;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
// step 1: save the IHttpServer and the module context id for future use
|
||||||
|
//
|
||||||
|
g_pModuleContext = pModuleInfo->GetId();
|
||||||
|
g_pHttpServer = pHttpServer;
|
||||||
|
|
||||||
|
// step 2: create the module factory
|
||||||
|
//
|
||||||
|
pFactory = new CMyHttpModuleFactory();
|
||||||
|
if ( pFactory == NULL )
|
||||||
|
{
|
||||||
|
hr = HRESULT_FROM_WIN32( ERROR_NOT_ENOUGH_MEMORY );
|
||||||
|
goto Finished;
|
||||||
|
}
|
||||||
|
|
||||||
|
// step 3: register for server events
|
||||||
|
//
|
||||||
|
hr = pModuleInfo->SetRequestNotifications( pFactory, /* module factory */
|
||||||
|
RQ_BEGIN_REQUEST | RQ_SEND_RESPONSE /* server event mask */,
|
||||||
|
RQ_END_REQUEST /* server post event mask */);
|
||||||
|
if ( FAILED( hr ) )
|
||||||
|
{
|
||||||
|
goto Finished;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr = pModuleInfo->SetPriorityForRequestNotification(RQ_BEGIN_REQUEST, PRIORITY_ALIAS_FIRST);
|
||||||
|
hr = pModuleInfo->SetPriorityForRequestNotification(RQ_SEND_RESPONSE, PRIORITY_ALIAS_LAST); // reverted!
|
||||||
|
//hr = pModuleInfo2->SetPriorityForPostRequestNotification(RQ_END_REQUEST, PRIORITY_ALIAS_LAST);
|
||||||
|
|
||||||
|
pFactory = NULL;
|
||||||
|
|
||||||
|
Finished:
|
||||||
|
|
||||||
|
/* if ( pFactory != NULL )
|
||||||
|
{
|
||||||
|
delete pFactory;
|
||||||
|
pFactory = NULL;
|
||||||
|
} */
|
||||||
|
|
||||||
|
return hr;
|
||||||
|
}
|
640
iis/moduleconfig.cpp
Normal file
640
iis/moduleconfig.cpp
Normal file
@@ -0,0 +1,640 @@
|
|||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
|
||||||
|
#undef inline
|
||||||
|
#define inline inline
|
||||||
|
|
||||||
|
// IIS7 Server API header file
|
||||||
|
#include "httpserv.h"
|
||||||
|
|
||||||
|
// Project header files
|
||||||
|
#include "mymodule.h"
|
||||||
|
#include "mymodulefactory.h"
|
||||||
|
#include "moduleconfig.h"
|
||||||
|
|
||||||
|
HRESULT
|
||||||
|
MODSECURITY_STORED_CONTEXT::Initialize(
|
||||||
|
IHttpContext * pW3Context,
|
||||||
|
IAppHostConfigException ** ppException
|
||||||
|
)
|
||||||
|
{
|
||||||
|
HRESULT hr = S_OK;
|
||||||
|
IAppHostAdminManager *pAdminManager = NULL;
|
||||||
|
IAppHostElement *pSessionTrackingElement = NULL;
|
||||||
|
IAppHostPropertyException *pPropertyException = NULL;
|
||||||
|
|
||||||
|
PCWSTR pszConfigPath = pW3Context->GetMetadata()->GetMetaPath();
|
||||||
|
BSTR bstrUrlPath = SysAllocString( pszConfigPath );
|
||||||
|
|
||||||
|
pAdminManager = g_pHttpServer->GetAdminManager();
|
||||||
|
|
||||||
|
if ( ( FAILED( hr ) ) || ( pAdminManager == NULL ) )
|
||||||
|
{
|
||||||
|
hr = E_UNEXPECTED;
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get a handle to the section:
|
||||||
|
hr = pAdminManager->GetAdminSection(
|
||||||
|
MODSECURITY_SECTION,
|
||||||
|
bstrUrlPath,
|
||||||
|
&pSessionTrackingElement );
|
||||||
|
|
||||||
|
if ( FAILED( hr ) )
|
||||||
|
{
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( pSessionTrackingElement == NULL )
|
||||||
|
{
|
||||||
|
hr = E_UNEXPECTED;
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the property object for the 'enabled' attribute:
|
||||||
|
hr = GetBooleanPropertyValue(
|
||||||
|
pSessionTrackingElement,
|
||||||
|
MODSECURITY_SECTION_ENABLED,
|
||||||
|
&pPropertyException,
|
||||||
|
&m_bIsEnabled);
|
||||||
|
|
||||||
|
if ( FAILED( hr ) )
|
||||||
|
{
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If there is a config failure, we cannot continue execution:
|
||||||
|
if ( pPropertyException != NULL )
|
||||||
|
{
|
||||||
|
|
||||||
|
ppException = ( IAppHostConfigException** ) &pPropertyException;
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( m_bIsEnabled == FALSE )
|
||||||
|
{
|
||||||
|
// There is no point in reading any more of the config associated with the session
|
||||||
|
// tracking section, since this feature is not enabled for the current URL
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the property object for the 'configfile' attribute:
|
||||||
|
hr = GetStringPropertyValue(
|
||||||
|
pSessionTrackingElement,
|
||||||
|
MODSECURITY_SECTION_CONFIGFILE,
|
||||||
|
&pPropertyException,
|
||||||
|
&m_pszPath);
|
||||||
|
|
||||||
|
if ( FAILED( hr ) )
|
||||||
|
{
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If there is a config failure, we cannot continue execution:
|
||||||
|
if ( pPropertyException != NULL )
|
||||||
|
{
|
||||||
|
|
||||||
|
ppException = ( IAppHostConfigException** ) &pPropertyException;
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
Failure:
|
||||||
|
SysFreeString( bstrUrlPath );
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT
|
||||||
|
MODSECURITY_STORED_CONTEXT::GetBooleanPropertyValue(
|
||||||
|
IAppHostElement* pElement,
|
||||||
|
WCHAR* pszPropertyName,
|
||||||
|
IAppHostPropertyException** pException,
|
||||||
|
BOOL* pBoolValue )
|
||||||
|
{
|
||||||
|
HRESULT hr = S_OK;
|
||||||
|
IAppHostProperty *pProperty = NULL;
|
||||||
|
VARIANT vPropertyValue;
|
||||||
|
|
||||||
|
if (
|
||||||
|
( pElement == NULL ) ||
|
||||||
|
( pszPropertyName == NULL ) ||
|
||||||
|
( pException == NULL ) ||
|
||||||
|
( pBoolValue == NULL )
|
||||||
|
)
|
||||||
|
{
|
||||||
|
hr = E_INVALIDARG;
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the property object for the BOOLEAN attribute:
|
||||||
|
hr = pElement->GetPropertyByName(
|
||||||
|
pszPropertyName,
|
||||||
|
&pProperty );
|
||||||
|
|
||||||
|
if ( FAILED( hr ) )
|
||||||
|
{
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( pProperty == NULL )
|
||||||
|
{
|
||||||
|
hr = E_UNEXPECTED;
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the attribute value:
|
||||||
|
VariantInit( &vPropertyValue );
|
||||||
|
|
||||||
|
hr = pProperty->get_Value( &vPropertyValue );
|
||||||
|
|
||||||
|
if ( FAILED( hr ) )
|
||||||
|
{
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// See it there is an exception that might be due to the actual value in the
|
||||||
|
// config not meeting validation criteria
|
||||||
|
*pException = NULL;
|
||||||
|
|
||||||
|
hr = pProperty->get_Exception( pException );
|
||||||
|
|
||||||
|
if ( FAILED( hr ) )
|
||||||
|
{
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// No need to continue if we got an exception...
|
||||||
|
if ( ( *pException ) != NULL )
|
||||||
|
{
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Finally, get the value:
|
||||||
|
*pBoolValue = ( vPropertyValue.boolVal == VARIANT_TRUE ) ? TRUE : FALSE;
|
||||||
|
|
||||||
|
|
||||||
|
Failure:
|
||||||
|
VariantClear( &vPropertyValue );
|
||||||
|
|
||||||
|
if ( pProperty != NULL )
|
||||||
|
{
|
||||||
|
pProperty->Release();
|
||||||
|
pProperty = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT
|
||||||
|
MODSECURITY_STORED_CONTEXT::GetDWORDPropertyValue(
|
||||||
|
IAppHostElement* pElement,
|
||||||
|
WCHAR* pszPropertyName,
|
||||||
|
IAppHostPropertyException** pException,
|
||||||
|
DWORD* pnValue )
|
||||||
|
{
|
||||||
|
HRESULT hr = S_OK;
|
||||||
|
IAppHostProperty *pProperty = NULL;
|
||||||
|
VARIANT vPropertyValue;
|
||||||
|
|
||||||
|
if (
|
||||||
|
( pElement == NULL ) ||
|
||||||
|
( pszPropertyName == NULL ) ||
|
||||||
|
( pException == NULL ) ||
|
||||||
|
( pnValue == NULL )
|
||||||
|
)
|
||||||
|
{
|
||||||
|
hr = E_INVALIDARG;
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the property object for the INT attribute:
|
||||||
|
hr = pElement->GetPropertyByName(
|
||||||
|
pszPropertyName,
|
||||||
|
&pProperty );
|
||||||
|
|
||||||
|
if ( FAILED( hr ) )
|
||||||
|
{
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( pProperty == NULL )
|
||||||
|
{
|
||||||
|
hr = E_UNEXPECTED;
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the attribute value:
|
||||||
|
VariantInit( &vPropertyValue );
|
||||||
|
|
||||||
|
hr = pProperty->get_Value( &vPropertyValue );
|
||||||
|
|
||||||
|
if ( FAILED( hr ) )
|
||||||
|
{
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// See it there is an exception that might be due to the actual value in the
|
||||||
|
// config not meeting validation criteria
|
||||||
|
*pException = NULL;
|
||||||
|
|
||||||
|
hr = pProperty->get_Exception( pException );
|
||||||
|
|
||||||
|
if ( FAILED( hr ) )
|
||||||
|
{
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// No need to continue if we got an exception...
|
||||||
|
if ( ( *pException ) != NULL )
|
||||||
|
{
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Finally, get the value:
|
||||||
|
*pnValue = vPropertyValue.ulVal;
|
||||||
|
|
||||||
|
Failure:
|
||||||
|
VariantClear( &vPropertyValue );
|
||||||
|
|
||||||
|
if ( pProperty != NULL )
|
||||||
|
{
|
||||||
|
pProperty->Release();
|
||||||
|
pProperty = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT
|
||||||
|
MODSECURITY_STORED_CONTEXT::GetTimeSpanPropertyValue(
|
||||||
|
IAppHostElement* pElement,
|
||||||
|
WCHAR* pszPropertyName,
|
||||||
|
IAppHostPropertyException** pException,
|
||||||
|
ULONGLONG* pnValue )
|
||||||
|
{
|
||||||
|
HRESULT hr = S_OK;
|
||||||
|
IAppHostProperty *pProperty = NULL;
|
||||||
|
VARIANT vPropertyValue;
|
||||||
|
|
||||||
|
if (
|
||||||
|
( pElement == NULL ) ||
|
||||||
|
( pszPropertyName == NULL ) ||
|
||||||
|
( pException == NULL ) ||
|
||||||
|
( pnValue == NULL )
|
||||||
|
)
|
||||||
|
{
|
||||||
|
hr = E_INVALIDARG;
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the property object for the INT attribute:
|
||||||
|
hr = pElement->GetPropertyByName(
|
||||||
|
pszPropertyName,
|
||||||
|
&pProperty );
|
||||||
|
|
||||||
|
if ( FAILED( hr ) )
|
||||||
|
{
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( pProperty == NULL )
|
||||||
|
{
|
||||||
|
hr = E_UNEXPECTED;
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the attribute value:
|
||||||
|
VariantInit( &vPropertyValue );
|
||||||
|
|
||||||
|
hr = pProperty->get_Value( &vPropertyValue );
|
||||||
|
|
||||||
|
if ( FAILED( hr ) )
|
||||||
|
{
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// See it there is an exception that might be due to the actual value in the
|
||||||
|
// config not meeting validation criteria
|
||||||
|
*pException = NULL;
|
||||||
|
|
||||||
|
hr = pProperty->get_Exception( pException );
|
||||||
|
|
||||||
|
if ( FAILED( hr ) )
|
||||||
|
{
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// No need to continue if we got an exception...
|
||||||
|
if ( ( *pException ) != NULL )
|
||||||
|
{
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Finally, get the value:
|
||||||
|
*pnValue = vPropertyValue.ullVal;
|
||||||
|
|
||||||
|
Failure:
|
||||||
|
VariantClear( &vPropertyValue );
|
||||||
|
|
||||||
|
if ( pProperty != NULL )
|
||||||
|
{
|
||||||
|
pProperty->Release();
|
||||||
|
pProperty = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT
|
||||||
|
MODSECURITY_STORED_CONTEXT::GetStringPropertyValue(
|
||||||
|
IAppHostElement* pElement,
|
||||||
|
WCHAR* pszPropertyName,
|
||||||
|
IAppHostPropertyException** pException,
|
||||||
|
WCHAR** ppszValue )
|
||||||
|
{
|
||||||
|
HRESULT hr = S_OK;
|
||||||
|
IAppHostProperty *pProperty = NULL;
|
||||||
|
DWORD dwLength;
|
||||||
|
VARIANT vPropertyValue;
|
||||||
|
|
||||||
|
if (
|
||||||
|
( pElement == NULL ) ||
|
||||||
|
( pszPropertyName == NULL ) ||
|
||||||
|
( pException == NULL ) ||
|
||||||
|
( ppszValue == NULL )
|
||||||
|
)
|
||||||
|
{
|
||||||
|
hr = E_INVALIDARG;
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
*ppszValue = NULL;
|
||||||
|
|
||||||
|
// Get the property object for the string attribute:
|
||||||
|
hr = pElement->GetPropertyByName(
|
||||||
|
pszPropertyName,
|
||||||
|
&pProperty );
|
||||||
|
|
||||||
|
if ( FAILED( hr ) )
|
||||||
|
{
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( pProperty == NULL )
|
||||||
|
{
|
||||||
|
hr = E_UNEXPECTED;
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the attribute value:
|
||||||
|
VariantInit( &vPropertyValue );
|
||||||
|
|
||||||
|
hr = pProperty->get_Value( &vPropertyValue );
|
||||||
|
|
||||||
|
if ( FAILED( hr ) )
|
||||||
|
{
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// See it there is an exception that might be due to the actual value in the
|
||||||
|
// config not meeting validation criteria
|
||||||
|
*pException = NULL;
|
||||||
|
|
||||||
|
hr = pProperty->get_Exception( pException );
|
||||||
|
|
||||||
|
if ( FAILED( hr ) )
|
||||||
|
{
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// No need to continue if we got an exception...
|
||||||
|
if ( ( *pException ) != NULL )
|
||||||
|
{
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Finally, get the value:
|
||||||
|
dwLength = SysStringLen( vPropertyValue.bstrVal );
|
||||||
|
*ppszValue = new WCHAR[ dwLength + 1 ];
|
||||||
|
|
||||||
|
if ( (*ppszValue) == NULL )
|
||||||
|
{
|
||||||
|
hr = E_OUTOFMEMORY;
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
wcsncpy(
|
||||||
|
*ppszValue,
|
||||||
|
vPropertyValue.bstrVal,
|
||||||
|
dwLength );
|
||||||
|
|
||||||
|
(*ppszValue)[ dwLength ] = L'\0';
|
||||||
|
|
||||||
|
Failure:
|
||||||
|
VariantClear( &vPropertyValue );
|
||||||
|
|
||||||
|
if ( pProperty != NULL )
|
||||||
|
{
|
||||||
|
pProperty->Release();
|
||||||
|
pProperty = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
MODSECURITY_STORED_CONTEXT::~MODSECURITY_STORED_CONTEXT()
|
||||||
|
{
|
||||||
|
if ( m_pszPath != NULL )
|
||||||
|
{
|
||||||
|
delete [] m_pszPath;
|
||||||
|
m_pszPath = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MODSECURITY_STORED_CONTEXT::MODSECURITY_STORED_CONTEXT():
|
||||||
|
m_bIsEnabled ( FALSE ),
|
||||||
|
m_pszPath( NULL ),
|
||||||
|
m_Config( NULL ),
|
||||||
|
m_dwLastCheck( 0 )
|
||||||
|
{
|
||||||
|
m_LastChange.dwLowDateTime = 0;
|
||||||
|
m_LastChange.dwHighDateTime = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
DWORD
|
||||||
|
MODSECURITY_STORED_CONTEXT::GlobalWideCharToMultiByte(
|
||||||
|
WCHAR* pSource,
|
||||||
|
DWORD dwLengthSource,
|
||||||
|
CHAR** ppszDestination,
|
||||||
|
USHORT* pdwLengthDestination )
|
||||||
|
{
|
||||||
|
DWORD dwResult = NULL;
|
||||||
|
DWORD dwCount = 0;
|
||||||
|
|
||||||
|
if (
|
||||||
|
( pSource == NULL ) ||
|
||||||
|
( ppszDestination == NULL ) ||
|
||||||
|
( pdwLengthDestination == NULL )
|
||||||
|
)
|
||||||
|
{
|
||||||
|
dwResult = ERROR_INVALID_PARAMETER;
|
||||||
|
goto Exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initialize result length
|
||||||
|
*pdwLengthDestination = 0;
|
||||||
|
*ppszDestination = NULL;
|
||||||
|
|
||||||
|
dwCount = WideCharToMultiByte(
|
||||||
|
CP_ACP,
|
||||||
|
0,
|
||||||
|
pSource,
|
||||||
|
dwLengthSource + 1,
|
||||||
|
*ppszDestination,
|
||||||
|
0,
|
||||||
|
NULL,
|
||||||
|
NULL );
|
||||||
|
|
||||||
|
if ( 0 == dwCount )
|
||||||
|
{
|
||||||
|
dwResult = GetLastError ();
|
||||||
|
|
||||||
|
if ( dwResult == 0 )
|
||||||
|
{
|
||||||
|
dwResult = ERROR_INVALID_DATA;
|
||||||
|
}
|
||||||
|
|
||||||
|
goto Exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
*ppszDestination = new CHAR[ dwCount + 1 ];
|
||||||
|
|
||||||
|
if ( NULL == ( *ppszDestination ) )
|
||||||
|
{
|
||||||
|
dwResult = ERROR_OUTOFMEMORY;
|
||||||
|
goto Exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make sure the memory is 'clean':
|
||||||
|
SecureZeroMemory(
|
||||||
|
( *ppszDestination ),
|
||||||
|
( dwCount + 1 ) * sizeof ( CHAR ) );
|
||||||
|
|
||||||
|
if (
|
||||||
|
0 == WideCharToMultiByte(
|
||||||
|
CP_ACP,
|
||||||
|
0,
|
||||||
|
pSource,
|
||||||
|
dwLengthSource + 1,
|
||||||
|
*ppszDestination,
|
||||||
|
dwCount,
|
||||||
|
NULL,
|
||||||
|
NULL )
|
||||||
|
)
|
||||||
|
{
|
||||||
|
dwResult = GetLastError();
|
||||||
|
|
||||||
|
goto Exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
*pdwLengthDestination = ( USHORT )dwCount;
|
||||||
|
|
||||||
|
Exit:
|
||||||
|
if ( dwResult != 0 )
|
||||||
|
{
|
||||||
|
// Make sure we do the proper cleanup in the error case:
|
||||||
|
if ( pdwLengthDestination != NULL )
|
||||||
|
{
|
||||||
|
*pdwLengthDestination = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ppszDestination != NULL )
|
||||||
|
{
|
||||||
|
if ( ( *ppszDestination ) != NULL )
|
||||||
|
{
|
||||||
|
delete [] ( *ppszDestination );
|
||||||
|
( *ppszDestination ) = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return dwResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT
|
||||||
|
MODSECURITY_STORED_CONTEXT::GetConfig(
|
||||||
|
IHttpContext * pContext,
|
||||||
|
MODSECURITY_STORED_CONTEXT ** ppModuleConfig
|
||||||
|
)
|
||||||
|
{
|
||||||
|
HRESULT hr = S_OK;
|
||||||
|
MODSECURITY_STORED_CONTEXT * pModuleConfig = NULL;
|
||||||
|
IHttpModuleContextContainer * pMetadataContainer = NULL;
|
||||||
|
IAppHostConfigException * pException = NULL;
|
||||||
|
|
||||||
|
pMetadataContainer = pContext->GetMetadata()->GetModuleContextContainer();
|
||||||
|
|
||||||
|
if ( pMetadataContainer == NULL )
|
||||||
|
{
|
||||||
|
hr = E_UNEXPECTED;
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
pModuleConfig = (MODSECURITY_STORED_CONTEXT *)pMetadataContainer->GetModuleContext( g_pModuleContext );
|
||||||
|
if ( pModuleConfig != NULL )
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// We found stored data for this module for the metadata
|
||||||
|
// object which is different for unique configuration path
|
||||||
|
//
|
||||||
|
*ppModuleConfig = pModuleConfig;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// If we reach here, that means this is first request or first
|
||||||
|
// request after a configuration change IIS core will throw stored context away
|
||||||
|
// if a change notification arrives for this metadata path
|
||||||
|
//
|
||||||
|
pModuleConfig = new MODSECURITY_STORED_CONTEXT();
|
||||||
|
if ( pModuleConfig == NULL )
|
||||||
|
{
|
||||||
|
return E_OUTOFMEMORY;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Read module configuration data and store in MODSECURITY_STORED_CONTEXT
|
||||||
|
//
|
||||||
|
hr = pModuleConfig->Initialize( pContext, &pException );
|
||||||
|
if ( FAILED( hr ) || pException != NULL )
|
||||||
|
{
|
||||||
|
pModuleConfig->CleanupStoredContext();
|
||||||
|
|
||||||
|
pModuleConfig = NULL;
|
||||||
|
hr = E_UNEXPECTED;
|
||||||
|
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Store MODSECURITY_STORED_CONTEXT data as metadata stored context
|
||||||
|
//
|
||||||
|
hr = pMetadataContainer->SetModuleContext( pModuleConfig,
|
||||||
|
g_pModuleContext );
|
||||||
|
if ( FAILED( hr ) )
|
||||||
|
{
|
||||||
|
pModuleConfig->CleanupStoredContext();
|
||||||
|
pModuleConfig = NULL;
|
||||||
|
|
||||||
|
//
|
||||||
|
// It is possible that some other thread stored context before this thread
|
||||||
|
// could do. Check returned hr and return context stored by other thread
|
||||||
|
//
|
||||||
|
if ( hr == HRESULT_FROM_WIN32( ERROR_ALREADY_ASSIGNED ) )
|
||||||
|
{
|
||||||
|
*ppModuleConfig = (MODSECURITY_STORED_CONTEXT *)pMetadataContainer->GetModuleContext( g_pModuleContext );
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
*ppModuleConfig = pModuleConfig;
|
||||||
|
return hr;
|
||||||
|
}
|
91
iis/moduleconfig.h
Normal file
91
iis/moduleconfig.h
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define MODSECURITY_SECTION L"system.webServer/ModSecurity"
|
||||||
|
#define MODSECURITY_SECTION_ENABLED L"enabled"
|
||||||
|
#define MODSECURITY_SECTION_CONFIGFILE L"configFile"
|
||||||
|
|
||||||
|
extern IHttpServer * g_pHttpServer;
|
||||||
|
|
||||||
|
extern PVOID g_pModuleContext;
|
||||||
|
|
||||||
|
class MODSECURITY_STORED_CONTEXT : public IHttpStoredContext
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MODSECURITY_STORED_CONTEXT();
|
||||||
|
~MODSECURITY_STORED_CONTEXT();
|
||||||
|
|
||||||
|
static
|
||||||
|
HRESULT
|
||||||
|
GetConfig(
|
||||||
|
IHttpContext * pContext,
|
||||||
|
MODSECURITY_STORED_CONTEXT ** ppModuleConfig
|
||||||
|
);
|
||||||
|
|
||||||
|
// virtual
|
||||||
|
VOID
|
||||||
|
CleanupStoredContext(
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
delete this;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL GetIsEnabled()
|
||||||
|
{
|
||||||
|
return m_bIsEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
WCHAR* GetPath()
|
||||||
|
{
|
||||||
|
return m_pszPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT
|
||||||
|
Initialize(
|
||||||
|
IHttpContext * pW3Context,
|
||||||
|
IAppHostConfigException ** ppException
|
||||||
|
);
|
||||||
|
|
||||||
|
DWORD
|
||||||
|
GlobalWideCharToMultiByte(
|
||||||
|
WCHAR* pSource,
|
||||||
|
DWORD dwLengthSource,
|
||||||
|
CHAR** ppszDestination,
|
||||||
|
USHORT* pdwLengthDestination );
|
||||||
|
|
||||||
|
void* m_Config;
|
||||||
|
DWORD m_dwLastCheck;
|
||||||
|
FILETIME m_LastChange;
|
||||||
|
|
||||||
|
private:
|
||||||
|
HRESULT
|
||||||
|
GetBooleanPropertyValue(
|
||||||
|
IAppHostElement* pElement,
|
||||||
|
WCHAR* pszPropertyName,
|
||||||
|
IAppHostPropertyException** pException,
|
||||||
|
BOOL* pBoolValue );
|
||||||
|
|
||||||
|
HRESULT
|
||||||
|
GetDWORDPropertyValue(
|
||||||
|
IAppHostElement* pElement,
|
||||||
|
WCHAR* pszPropertyName,
|
||||||
|
IAppHostPropertyException** pException,
|
||||||
|
DWORD* pnValue );
|
||||||
|
|
||||||
|
HRESULT
|
||||||
|
GetTimeSpanPropertyValue(
|
||||||
|
IAppHostElement* pElement,
|
||||||
|
WCHAR* pszPropertyName,
|
||||||
|
IAppHostPropertyException** pException,
|
||||||
|
ULONGLONG* pnValue );
|
||||||
|
|
||||||
|
HRESULT
|
||||||
|
GetStringPropertyValue(
|
||||||
|
IAppHostElement* pElement,
|
||||||
|
WCHAR* pszPropertyName,
|
||||||
|
IAppHostPropertyException** pException,
|
||||||
|
WCHAR** ppszValue );
|
||||||
|
|
||||||
|
BOOL m_bIsEnabled;
|
||||||
|
WCHAR* m_pszPath;
|
||||||
|
};
|
1186
iis/mymodule.cpp
Normal file
1186
iis/mymodule.cpp
Normal file
File diff suppressed because it is too large
Load Diff
4
iis/mymodule.def
Normal file
4
iis/mymodule.def
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
LIBRARY "ModSecurityIIS"
|
||||||
|
|
||||||
|
EXPORTS
|
||||||
|
RegisterModule
|
42
iis/mymodule.h
Normal file
42
iis/mymodule.h
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
#ifndef __MY_MODULE_H__
|
||||||
|
#define __MY_MODULE_H__
|
||||||
|
|
||||||
|
// The module implementation.
|
||||||
|
// This class is responsible for implementing the
|
||||||
|
// module functionality for each of the server events
|
||||||
|
// that it registers for.
|
||||||
|
class CMyHttpModule : public CHttpModule
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
HANDLE m_hEventLog;
|
||||||
|
DWORD m_dwPageSize;
|
||||||
|
|
||||||
|
REQUEST_NOTIFICATION_STATUS
|
||||||
|
OnBeginRequest(
|
||||||
|
IN IHttpContext * pHttpContext,
|
||||||
|
IN IHttpEventProvider * pProvider
|
||||||
|
);
|
||||||
|
|
||||||
|
REQUEST_NOTIFICATION_STATUS
|
||||||
|
OnSendResponse(
|
||||||
|
IN IHttpContext * pHttpContext,
|
||||||
|
IN ISendResponseProvider * pProvider
|
||||||
|
);
|
||||||
|
|
||||||
|
REQUEST_NOTIFICATION_STATUS
|
||||||
|
OnPostEndRequest(
|
||||||
|
IN IHttpContext * pHttpContext,
|
||||||
|
IN IHttpEventProvider * pProvider
|
||||||
|
);
|
||||||
|
|
||||||
|
HRESULT ReadFileChunk(HTTP_DATA_CHUNK *chunk, char *buf);
|
||||||
|
|
||||||
|
CMyHttpModule();
|
||||||
|
~CMyHttpModule();
|
||||||
|
|
||||||
|
void Dispose();
|
||||||
|
|
||||||
|
BOOL WriteEventViewerLog(LPCSTR szNotification, WORD category = EVENTLOG_INFORMATION_TYPE);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
65
iis/mymodulefactory.h
Normal file
65
iis/mymodulefactory.h
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
#ifndef __MODULE_FACTORY_H__
|
||||||
|
#define __MODULE_FACTORY_H__
|
||||||
|
|
||||||
|
// Factory class for CMyHttpModule.
|
||||||
|
// This class is responsible for creating instances
|
||||||
|
// of CMyHttpModule for each request.
|
||||||
|
class CMyHttpModuleFactory : public IHttpModuleFactory
|
||||||
|
{
|
||||||
|
CMyHttpModule * m_pModule;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CMyHttpModuleFactory()
|
||||||
|
{
|
||||||
|
m_pModule = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual
|
||||||
|
HRESULT
|
||||||
|
GetHttpModule(
|
||||||
|
OUT CHttpModule **ppModule,
|
||||||
|
IN IModuleAllocator *
|
||||||
|
)
|
||||||
|
{
|
||||||
|
HRESULT hr = S_OK;
|
||||||
|
|
||||||
|
if ( ppModule == NULL )
|
||||||
|
{
|
||||||
|
hr = HRESULT_FROM_WIN32( ERROR_INVALID_PARAMETER );
|
||||||
|
goto Finished;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(m_pModule == NULL)
|
||||||
|
{
|
||||||
|
m_pModule = new CMyHttpModule();
|
||||||
|
|
||||||
|
if ( m_pModule == NULL )
|
||||||
|
{
|
||||||
|
hr = HRESULT_FROM_WIN32( ERROR_NOT_ENOUGH_MEMORY );
|
||||||
|
goto Finished;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
*ppModule = m_pModule;
|
||||||
|
|
||||||
|
Finished:
|
||||||
|
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual
|
||||||
|
void
|
||||||
|
Terminate()
|
||||||
|
{
|
||||||
|
if ( m_pModule != NULL )
|
||||||
|
{
|
||||||
|
//m_pModule->WriteEventViewerLog("Module terminated.");
|
||||||
|
delete m_pModule;
|
||||||
|
m_pModule = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
delete this;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
320
iis/readme.htm
Normal file
320
iis/readme.htm
Normal file
@@ -0,0 +1,320 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" >
|
||||||
|
<head>
|
||||||
|
<title>Creating a Native Module for IIS7</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>
|
||||||
|
Creating a Native Module for IIS7</h1>
|
||||||
|
<p>
|
||||||
|
To extend the server, IIS7 provides a new (C++) native core server API, which replaces
|
||||||
|
ISAPI filter and extension API from previous IIS releases. The new API features
|
||||||
|
object-oriented development with an intuitive object model, provides more control
|
||||||
|
over request processing, and uses simpler design patterns to help you write robust
|
||||||
|
code. Please visit <a target="_new" href="http://www.iis.net/default.aspx?tabid=2&subtabid=25&i=942">Developing a Native Module for IIS7</a> for more information about this sample.<br />
|
||||||
|
<br />
|
||||||
|
<strong>NOTE</strong>: The IIS7 native (C++) server API is declared in the Platform
|
||||||
|
SDK <strong>httpserv.h</strong> header file. <strong>You must obtain this SDK
|
||||||
|
and register it with Visual Studio in order to compile this module.</strong></p>
|
||||||
|
<p>
|
||||||
|
A native module is a Windows DLL that contains an the following:</p>
|
||||||
|
<ol>
|
||||||
|
<li><strong>RegisterModule</strong> exported function. This function is responsible
|
||||||
|
for creating a module factory, and registering the module for one or more server
|
||||||
|
events.<br />
|
||||||
|
<br />
|
||||||
|
<em>
|
||||||
|
This function is implemented in <strong>main.cpp</strong>.<br />
|
||||||
|
</em>
|
||||||
|
</li>
|
||||||
|
<li>Implementation of the module class inheriting from the <strong>CHttpModule</strong>
|
||||||
|
base class. This class is provides the main functionality of your module.
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<em>
|
||||||
|
This class is declared in <strong>mymodule.h</strong>, with method implementations
|
||||||
|
in <strong>mymodule.cpp</strong>.<br />
|
||||||
|
</em>
|
||||||
|
</li>
|
||||||
|
<li>Implementation of the module factory class implementing the <strong>IHttpModuleFactory</strong>
|
||||||
|
interface. The class is responsible for creating instances of your module.<br />
|
||||||
|
<br />
|
||||||
|
<em>
|
||||||
|
This class is declared and implemented in <strong>mymodulefactory.h</strong>.</em></li></ol>
|
||||||
|
<h2>
|
||||||
|
0. Prerequisites</h2>
|
||||||
|
<p class="MsoNormal" style="margin: 0in 0in 0pt">
|
||||||
|
<span style="font-family: Verdana"><span style="font-size: 9pt">In order to compile
|
||||||
|
the module, you will need to install the Windows Platform SDK that contains the
|
||||||
|
required IIS header files.
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
After installing the SDK</span></span><span style="font-size: 9pt; font-family: Verdana;
|
||||||
|
mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Arial; mso-ansi-language: EN-US;
|
||||||
|
mso-fareast-language: EN-US; mso-bidi-language: AR-SA">, you will need to register
|
||||||
|
the SDK with Visual Studio 2005.<span style="mso-spacerun: yes"> </span>You
|
||||||
|
can do this via <b style="mso-bidi-font-weight: normal">Start > Programs > Microsoft
|
||||||
|
Windows SDK > Visual Studio Registration > Register Windows SDK Directories
|
||||||
|
with Visual Studio</b>.</span></p>
|
||||||
|
<h2>
|
||||||
|
1. Implement RegisterModule entrypoint</h2>
|
||||||
|
<p>
|
||||||
|
A native module must export the RegisterModule function. This function will
|
||||||
|
be invoked by the server when the module DLL is loaded, so that your DLL can register
|
||||||
|
for the required server events, and provide a mechanism for the server to create
|
||||||
|
instances of your module class.<br />
|
||||||
|
<br />
|
||||||
|
<span style="font-size: 10pt; font-family: Courier New">__stdcall
|
||||||
|
<br />
|
||||||
|
HRESULT RegisterModule( DWORD dwServerVersion, IHttpModuleRegistrationInfo
|
||||||
|
* pModuleInfo, IHttpServer * pHttpServer );<br />
|
||||||
|
</span>
|
||||||
|
<br />
|
||||||
|
<em>This function is implemented for you in the <strong>main.cpp</strong> source file.
|
||||||
|
</em>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
It does the following:</p>
|
||||||
|
<ol>
|
||||||
|
<li><strong>Create module factory</strong>.<strong> </strong>This is an instance
|
||||||
|
of your CMyModuleFactory class that implements
|
||||||
|
the IHttpModuleFactory inteface:<br />
|
||||||
|
<br />
|
||||||
|
<span style="font-family: Courier New"><span style="font-size: 10pt"><span style="color: #009900">
|
||||||
|
// step 2: create module factory</span><br />
|
||||||
|
pFactory = new CMyHttpModuleFactory();</span></span><br />
|
||||||
|
</li>
|
||||||
|
<li><strong>Register module factory for desired server events</strong>. This registers
|
||||||
|
the module factory for one or more server events that occur during request processing.
|
||||||
|
The server will use the factory to create an instance of your module class for each
|
||||||
|
request, and call the appropriate event handler method on your module instance for
|
||||||
|
each of the requested events:<br />
|
||||||
|
<br />
|
||||||
|
<span style="color: #000000;"><span style="font-family: Courier New"><span style="font-size: 10pt">
|
||||||
|
<span style="color: #009900">
|
||||||
|
// step 3: register for server events
|
||||||
|
<br />
|
||||||
|
// TODO: register for more server events here
|
||||||
|
<br />
|
||||||
|
</span>hr = pModuleInfo->SetRequestNotifications( pFactory, </span></span><span
|
||||||
|
style="font-family: Courier New"><span style="font-size: 10pt"><span style="color: #009900">
|
||||||
|
/* module factory */
|
||||||
|
<br />
|
||||||
|
</span>
|
||||||
|
RQ_ACQUIRE_REQUEST_STATE,
|
||||||
|
<span style="color: #009900">/* server event mask */</span><br />
|
||||||
|
|
||||||
|
0 <span style="color: #009900">
|
||||||
|
/* server post event mask */</span> );<br />
|
||||||
|
<br />
|
||||||
|
<span style="font-size: 12pt; font-family: Times New Roman">
|
||||||
|
The server event mask is a bit mask of one or more request processing event names
|
||||||
|
declared in </span>
|
||||||
|
</span></span><span style="font-family: Courier New"><span style="font-size: 10pt">
|
||||||
|
<strong><span style="font-size: 12pt; font-family: Times New Roman">httpserv.h:</span><br />
|
||||||
|
<br />
|
||||||
|
</strong><span style="color: #009900">//
|
||||||
|
<br />
|
||||||
|
// Request deterministic notifications
|
||||||
|
<br />
|
||||||
|
//
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
// request is beginning </span>
|
||||||
|
<br />
|
||||||
|
#define RQ_BEGIN_REQUEST 0x00000001
|
||||||
|
<br />
|
||||||
|
<span style="color: #009900">// request is being authenticated
|
||||||
|
<br />
|
||||||
|
</span>#define RQ_AUTHENTICATE_REQUEST 0x00000002
|
||||||
|
<br />
|
||||||
|
<span style="color: #009900">// request is being authorized </span>
|
||||||
|
<br />
|
||||||
|
#define RQ_AUTHORIZE_REQUEST 0x00000004
|
||||||
|
<br />
|
||||||
|
<span style="color: #009900">// satisfy request from cache </span>
|
||||||
|
<br />
|
||||||
|
#define RQ_RESOLVE_REQUEST_CACHE 0x00000008
|
||||||
|
<br />
|
||||||
|
<span style="color: #009900">// map handler for request</span>
|
||||||
|
<br />
|
||||||
|
#define RQ_MAP_REQUEST_HANDLER 0x00000010
|
||||||
|
<br />
|
||||||
|
<span style="color: #009900">// acquire request state</span>
|
||||||
|
<br />
|
||||||
|
#define RQ_ACQUIRE_REQUEST_STATE 0x00000020
|
||||||
|
<br />
|
||||||
|
<span style="color: #009900">// pre-execute handler</span>
|
||||||
|
<br />
|
||||||
|
#define RQ_PRE_EXECUTE_REQUEST_HANDLER 0x00000040
|
||||||
|
<br />
|
||||||
|
<span style="color: #009900">// execute handler</span>
|
||||||
|
<br />
|
||||||
|
#define RQ_EXECUTE_REQUEST_HANDLER 0x00000080
|
||||||
|
<br />
|
||||||
|
<span style="color: #009900">// release request state</span>
|
||||||
|
<br />
|
||||||
|
#define RQ_RELEASE_REQUEST_STATE 0x00000100
|
||||||
|
<br />
|
||||||
|
<span style="color: #009900">// update cache</span>
|
||||||
|
<br />
|
||||||
|
#define RQ_UPDATE_REQUEST_CACHE 0x00000200
|
||||||
|
<br />
|
||||||
|
<span style="color: #009900">// log request</span>
|
||||||
|
<br />
|
||||||
|
#define RQ_LOG_REQUEST 0x00000400
|
||||||
|
<br />
|
||||||
|
<span style="color: #009900">// end request</span>
|
||||||
|
<br />
|
||||||
|
#define RQ_END_REQUEST 0x00000800
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<span style="color: #009900">//
|
||||||
|
<br />
|
||||||
|
// Request non-deterministic notifications
|
||||||
|
<br />
|
||||||
|
//</span>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<span style="color: #009900">// custom notification</span>
|
||||||
|
<br />
|
||||||
|
#define RQ_CUSTOM_NOTIFICATION 0x10000000
|
||||||
|
<br />
|
||||||
|
<span style="color: #009900">// send response</span>
|
||||||
|
<br />
|
||||||
|
#define RQ_SEND_RESPONSE 0x20000000
|
||||||
|
<br />
|
||||||
|
<span style="color: #009900">// read entity</span>
|
||||||
|
<br />
|
||||||
|
#define RQ_READ_ENTITY 0x40000000
|
||||||
|
<br />
|
||||||
|
<span style="color: #009900">// map a url to a physical path</span>
|
||||||
|
<br />
|
||||||
|
#define RQ_MAP_PATH 0x80000000<br />
|
||||||
|
<br />
|
||||||
|
<span style="font-size: 12pt; font-family: Times New Roman">
|
||||||
|
The post event mask is a bit mask of the same events, allowing to subscribe
|
||||||
|
to the post events for each of the specified events.<br />
|
||||||
|
</span>
|
||||||
|
</span></span>
|
||||||
|
</span></li>
|
||||||
|
</ol>
|
||||||
|
<h2>
|
||||||
|
</h2>
|
||||||
|
<h2>
|
||||||
|
2. Implement module factory class</h2>
|
||||||
|
<p>
|
||||||
|
The server requires a module factory class in order to obtain instances of your
|
||||||
|
module. The factory class must implement the IHttpModuleFactory interface
|
||||||
|
declared in the httpserv.h Windows SDK header file.<br />
|
||||||
|
<br />
|
||||||
|
<em>This factory is implemented for you in the <strong>mymodulefactory.h</strong> header
|
||||||
|
file.<br />
|
||||||
|
<br />
|
||||||
|
</em>The <strong>GetHttpModule</strong> method of the factory class is called at the beginning of
|
||||||
|
each request in order to obtain an instance of your module. The typical implementation
|
||||||
|
simply returns a new instance of your module class:<br />
|
||||||
|
<br />
|
||||||
|
<span style="font-family: Courier New; font-size: 10pt;">class CMyHttpModuleFactory : public IHttpModuleFactory
|
||||||
|
<br />
|
||||||
|
{
|
||||||
|
<br />
|
||||||
|
public:
|
||||||
|
<br />
|
||||||
|
virtual HRESULT GetHttpModule( OUT CHttpModule **ppModule, IN IModuleAllocator
|
||||||
|
* )
|
||||||
|
<br />
|
||||||
|
{ <br />
|
||||||
|
...<br />
|
||||||
|
pModule = new CMyHttpModule(); <br />
|
||||||
|
...<br />
|
||||||
|
*ppModule = pModule; <br />
|
||||||
|
...<br />
|
||||||
|
} <br />
|
||||||
|
<br />
|
||||||
|
virtual void Terminate() { }<br />
|
||||||
|
}</span></p>
|
||||||
|
<p>
|
||||||
|
The <strong>Terminate</strong> method of the factory class is called during the
|
||||||
|
shutdown of the worker process, before your module DLL is unloaded. It typically
|
||||||
|
releases any resources you may have initialized inside the <strong>RegisterModule</strong>
|
||||||
|
function.</p>
|
||||||
|
<h2>
|
||||||
|
3. Implement module class</h2>
|
||||||
|
<p>
|
||||||
|
The module class inherits from the <strong>CHttpModule</strong> base class, which
|
||||||
|
defines an event handler method for each of the server events discussed earlier.
|
||||||
|
When the server executes each event during the processing of a request, it will
|
||||||
|
invoke the associated event handler method on each of the module instances that
|
||||||
|
have registered for that event. <br />
|
||||||
|
<br />
|
||||||
|
<em>This class is declared in the <strong>mymodule.h</strong> header file, and its event
|
||||||
|
handler methods are implemented in the <strong>mymodule.cpp</strong> source file.</em><br />
|
||||||
|
<br />
|
||||||
|
In order to provide processing for each server event, the module class MUST override
|
||||||
|
the corresponding method. The signature of each event handler method is the
|
||||||
|
following:<br />
|
||||||
|
<br />
|
||||||
|
<span style="font-size: 10pt; font-family: Courier New">REQUEST_NOTIFICATION_STATUS
|
||||||
|
On<EVENT NAME>(
|
||||||
|
IN IHttpContext * pHttpContext,
|
||||||
|
IN OUT IHttpEventProvider * pProvider
|
||||||
|
);
|
||||||
|
<br />
|
||||||
|
</span>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
Where <EVENT NAME> is one of the server events we listed earlier. For
|
||||||
|
example, the module in this project initially overrides only the <strong>OnAcquireRequestState</strong> method since we register only for the <span style="font-size: 10pt;
|
||||||
|
font-family: Courier New"><strong>RQ_ACQUIRE_REQUEST_STATE</strong></span> event:<br />
|
||||||
|
<br />
|
||||||
|
<span style="font-size: 10pt; font-family: Courier New">class CMyHttpModule : public
|
||||||
|
CHttpModule
|
||||||
|
<br />
|
||||||
|
{
|
||||||
|
<br />
|
||||||
|
public:
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<span style="color: #009900"> // Implementation of the AcquireRequestState
|
||||||
|
event handler method. </span>
|
||||||
|
<br />
|
||||||
|
REQUEST_NOTIFICATION_STATUS OnAcquireRequestState( IN IHttpContext
|
||||||
|
* pHttpContext, IN OUT IHttpEventProvider * pProvider );
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<span style="color: #009900"> // TODO: override additional event handler
|
||||||
|
methods below. </span>
|
||||||
|
<br />
|
||||||
|
};</span><br />
|
||||||
|
<br />
|
||||||
|
The implementation of this method provides the module functionality desired for
|
||||||
|
processing the request in the appropriate pipeline stage. This project provides
|
||||||
|
a dummy implementation in the <strong>mymodule.cpp</strong> source file.</p>
|
||||||
|
<h2>
|
||||||
|
4. Deploy the module to the server</h2>
|
||||||
|
<p>
|
||||||
|
After you have compiled your module, you need to deploy it on the server.
|
||||||
|
You can do that by compiling the module, and then copying <strong>IIS7NativeModule.dll</strong>
|
||||||
|
(and the <strong>IIS7NativeModule.pdb</strong> debugging symbols file if desired)
|
||||||
|
to any location on the machine running IIS7.<br />
|
||||||
|
<br />
|
||||||
|
You can install your module on the server by running the following command from an Elevated command line prompt:<br />
|
||||||
|
<br />
|
||||||
|
<strong>%systemroot%\system32\inetsrv\APPCMD.EXE install module /name:MyModule /image:<FULL
|
||||||
|
PATH TO DLL></strong><br />
|
||||||
|
<br />
|
||||||
|
Where <strong><FULL_PATH_TO_DLL></strong> is the full path to the module DLL
|
||||||
|
file.<br />
|
||||||
|
<br />
|
||||||
|
You can also install your module using the IIS7 Administration Tool. After installation,
|
||||||
|
your module will be loaded and enabled in all application pools on the server.
|
||||||
|
To learn ore about installing modules, and selecting modules to execute on your
|
||||||
|
server and for specific applications, please visit <a href="http://www.iis.net">www.iis.net</a>.</p>
|
||||||
|
<h2>
|
||||||
|
Congratulations!</h2>
|
||||||
|
<p>
|
||||||
|
You have succesfully built and deployed your own IIS7 module. To learn more
|
||||||
|
about building IIS7 modules, and to download sample modules, be sure to visit <a href="http://www.iis.net">www.iis.net</a>.</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
863
iis/winbuild/CMakeLists.txt
Normal file
863
iis/winbuild/CMakeLists.txt
Normal file
@@ -0,0 +1,863 @@
|
|||||||
|
# cURL/libcurl CMake script
|
||||||
|
# by Tetetest and Sukender (Benoit Neil)
|
||||||
|
|
||||||
|
# TODO:
|
||||||
|
# The output .so file lacks the soname number which we currently have within the lib/Makefile.am file
|
||||||
|
# Add full (4 or 5 libs) SSL support
|
||||||
|
# Add INSTALL target (EXTRA_DIST variables in Makefile.am may be moved to Makefile.inc so that CMake/CPack is aware of what's to include).
|
||||||
|
# Add CTests(?)
|
||||||
|
# Check on all possible platforms
|
||||||
|
# Test with as many configurations possible (With or without any option)
|
||||||
|
# Create scripts that help keeping the CMake build system up to date (to reduce maintenance). According to Tetetest:
|
||||||
|
# - lists of headers that 'configure' checks for;
|
||||||
|
# - curl-specific tests (the ones that are in m4/curl-*.m4 files);
|
||||||
|
# - (most obvious thing:) curl version numbers.
|
||||||
|
# Add documentation subproject
|
||||||
|
#
|
||||||
|
# To check:
|
||||||
|
# (From Daniel Stenberg) The cmake build selected to run gcc with -fPIC on my box while the plain configure script did not.
|
||||||
|
# (From Daniel Stenberg) The gcc command line use neither -g nor any -O options. As a developer, I also treasure our configure scripts's --enable-debug option that sets a long range of "picky" compiler options.
|
||||||
|
cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR)
|
||||||
|
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}")
|
||||||
|
include(Utilities)
|
||||||
|
|
||||||
|
project( CURL C )
|
||||||
|
|
||||||
|
file (READ ${CURL_SOURCE_DIR}/include/curl/curlver.h CURL_VERSION_H_CONTENTS)
|
||||||
|
string (REGEX MATCH "LIBCURL_VERSION_MAJOR[ \t]+([0-9]+)"
|
||||||
|
LIBCURL_VERSION_MJ ${CURL_VERSION_H_CONTENTS})
|
||||||
|
string (REGEX MATCH "([0-9]+)"
|
||||||
|
LIBCURL_VERSION_MJ ${LIBCURL_VERSION_MJ})
|
||||||
|
string (REGEX MATCH
|
||||||
|
"LIBCURL_VERSION_MINOR[ \t]+([0-9]+)"
|
||||||
|
LIBCURL_VERSION_MI ${CURL_VERSION_H_CONTENTS})
|
||||||
|
string (REGEX MATCH "([0-9]+)" LIBCURL_VERSION_MI ${LIBCURL_VERSION_MI})
|
||||||
|
string (REGEX MATCH
|
||||||
|
"LIBCURL_VERSION_PATCH[ \t]+([0-9]+)"
|
||||||
|
LIBCURL_VERSION_PT ${CURL_VERSION_H_CONTENTS})
|
||||||
|
string (REGEX MATCH "([0-9]+)" LIBCURL_VERSION_PT ${LIBCURL_VERSION_PT})
|
||||||
|
set (CURL_MAJOR_VERSION ${LIBCURL_VERSION_MJ})
|
||||||
|
set (CURL_MINOR_VERSION ${LIBCURL_VERSION_MI})
|
||||||
|
set (CURL_PATCH_VERSION ${LIBCURL_VERSION_PT})
|
||||||
|
|
||||||
|
include_regular_expression("^.*$") # Sukender: Is it necessary?
|
||||||
|
|
||||||
|
# Setup package meta-data
|
||||||
|
# SET(PACKAGE "curl")
|
||||||
|
set(CURL_VERSION ${CURL_MAJOR_VERSION}.${CURL_MINOR_VERSION}.${CURL_PATCH_VERSION})
|
||||||
|
message(STATUS "curl version=[${CURL_VERSION}]")
|
||||||
|
# SET(PACKAGE_TARNAME "curl")
|
||||||
|
# SET(PACKAGE_NAME "curl")
|
||||||
|
# SET(PACKAGE_VERSION "-")
|
||||||
|
# SET(PACKAGE_STRING "curl-")
|
||||||
|
# SET(PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/")
|
||||||
|
set(OPERATING_SYSTEM "${CMAKE_SYSTEM_NAME}")
|
||||||
|
set(OS "\"${CMAKE_SYSTEM_NAME}\"")
|
||||||
|
|
||||||
|
include_directories(${PROJECT_BINARY_DIR}/include/curl)
|
||||||
|
include_directories( ${CURL_SOURCE_DIR}/include )
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
set(NATIVE_WINDOWS ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
option(BUILD_CURL_EXE "Set to ON to build cURL executable." ON)
|
||||||
|
option(BUILD_CURL_TESTS "Set to ON to build cURL tests." ON)
|
||||||
|
option(CURL_STATICLIB "Set to ON to build libcurl with static linking." OFF)
|
||||||
|
option(CURL_USE_ARES "Set to ON to enable c-ares support" OFF)
|
||||||
|
# initialize CURL_LIBS
|
||||||
|
set(CURL_LIBS "")
|
||||||
|
|
||||||
|
if(CURL_USE_ARES)
|
||||||
|
set(USE_ARES ${CURL_USE_ARES})
|
||||||
|
find_package(CARES REQUIRED)
|
||||||
|
list(APPEND CURL_LIBS ${CARES_LIBRARY} )
|
||||||
|
set(CURL_LIBS ${CURL_LIBS} ${CARES_LIBRARY})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
option(BUILD_DASHBOARD_REPORTS "Set to ON to activate reporting of cURL builds here http://www.cdash.org/CDashPublic/index.php?project=CURL" OFF)
|
||||||
|
if(BUILD_DASHBOARD_REPORTS)
|
||||||
|
#INCLUDE(Dart)
|
||||||
|
include(CTest)
|
||||||
|
endif(BUILD_DASHBOARD_REPORTS)
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
option(BUILD_RELEASE_DEBUG_DIRS "Set OFF to build each configuration to a separate directory" OFF)
|
||||||
|
mark_as_advanced(BUILD_RELEASE_DEBUG_DIRS)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
option(CURL_HIDDEN_SYMBOLS "Set to ON to hide libcurl internal symbols (=hide all symbols that aren't officially external)." ON)
|
||||||
|
mark_as_advanced(CURL_HIDDEN_SYMBOLS)
|
||||||
|
|
||||||
|
# IF(WIN32)
|
||||||
|
# OPTION(CURL_WINDOWS_SSPI "Use windows libraries to allow NTLM authentication without openssl" ON)
|
||||||
|
# MARK_AS_ADVANCED(CURL_WINDOWS_SSPI)
|
||||||
|
# ENDIF()
|
||||||
|
|
||||||
|
option(HTTP_ONLY "disables all protocols except HTTP (This overrides all CURL_DISABLE_* options)" OFF)
|
||||||
|
mark_as_advanced(HTTP_ONLY)
|
||||||
|
option(CURL_DISABLE_FTP "disables FTP" OFF)
|
||||||
|
mark_as_advanced(CURL_DISABLE_FTP)
|
||||||
|
option(CURL_DISABLE_LDAP "disables LDAP" OFF)
|
||||||
|
mark_as_advanced(CURL_DISABLE_LDAP)
|
||||||
|
option(CURL_DISABLE_TELNET "disables Telnet" OFF)
|
||||||
|
mark_as_advanced(CURL_DISABLE_TELNET)
|
||||||
|
option(CURL_DISABLE_DICT "disables DICT" OFF)
|
||||||
|
mark_as_advanced(CURL_DISABLE_DICT)
|
||||||
|
option(CURL_DISABLE_FILE "disables FILE" OFF)
|
||||||
|
mark_as_advanced(CURL_DISABLE_FILE)
|
||||||
|
option(CURL_DISABLE_TFTP "disables TFTP" OFF)
|
||||||
|
mark_as_advanced(CURL_DISABLE_TFTP)
|
||||||
|
option(CURL_DISABLE_HTTP "disables HTTP" OFF)
|
||||||
|
mark_as_advanced(CURL_DISABLE_HTTP)
|
||||||
|
|
||||||
|
option(CURL_DISABLE_LDAPS "to disable LDAPS" OFF)
|
||||||
|
mark_as_advanced(CURL_DISABLE_LDAPS)
|
||||||
|
if(WIN32)
|
||||||
|
set(CURL_DEFAULT_DISABLE_LDAP OFF)
|
||||||
|
# some windows compilers do not have wldap32
|
||||||
|
if( NOT HAVE_WLDAP32)
|
||||||
|
set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
|
||||||
|
message(STATUS "wldap32 not found CURL_DISABLE_LDAP set ON")
|
||||||
|
option(CURL_LDAP_WIN "Use Windows LDAP implementation" OFF)
|
||||||
|
else()
|
||||||
|
option(CURL_LDAP_WIN "Use Windows LDAP implementation" ON)
|
||||||
|
endif()
|
||||||
|
mark_as_advanced(CURL_LDAP_WIN)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(HTTP_ONLY)
|
||||||
|
set(CURL_DISABLE_FTP ON)
|
||||||
|
set(CURL_DISABLE_LDAP ON)
|
||||||
|
set(CURL_DISABLE_TELNET ON)
|
||||||
|
set(CURL_DISABLE_DICT ON)
|
||||||
|
set(CURL_DISABLE_FILE ON)
|
||||||
|
set(CURL_DISABLE_TFTP ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
option(CURL_DISABLE_COOKIES "to disable cookies support" OFF)
|
||||||
|
mark_as_advanced(CURL_DISABLE_COOKIES)
|
||||||
|
|
||||||
|
option(CURL_DISABLE_CRYPTO_AUTH "to disable cryptographic authentication" OFF)
|
||||||
|
mark_as_advanced(CURL_DISABLE_CRYPTO_AUTH)
|
||||||
|
option(CURL_DISABLE_VERBOSE_STRINGS "to disable verbose strings" OFF)
|
||||||
|
mark_as_advanced(CURL_DISABLE_VERBOSE_STRINGS)
|
||||||
|
option(DISABLED_THREADSAFE "Set to explicitly specify we don't want to use thread-safe functions" OFF)
|
||||||
|
mark_as_advanced(DISABLED_THREADSAFE)
|
||||||
|
option(ENABLE_IPV6 "Define if you want to enable IPv6 support" OFF)
|
||||||
|
mark_as_advanced(ENABLE_IPV6)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
list_spaces_append_once(CMAKE_C_STANDARD_LIBRARIES wsock32.lib ws2_32.lib) # bufferoverflowu.lib
|
||||||
|
if(CURL_DISABLE_LDAP)
|
||||||
|
# Remove wldap32.lib from space-separated list
|
||||||
|
string(REPLACE " " ";" _LIST ${CMAKE_C_STANDARD_LIBRARIES})
|
||||||
|
list(REMOVE_ITEM _LIST "wldap32.lib")
|
||||||
|
to_list_spaces(_LIST CMAKE_C_STANDARD_LIBRARIES)
|
||||||
|
else()
|
||||||
|
# Append wldap32.lib
|
||||||
|
list_spaces_append_once(CMAKE_C_STANDARD_LIBRARIES wldap32.lib)
|
||||||
|
endif()
|
||||||
|
set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES}" CACHE STRING "" FORCE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
# We need ansi c-flags, especially on HP
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
|
||||||
|
set(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS})
|
||||||
|
|
||||||
|
# Disable warnings on Borland to avoid changing 3rd party code.
|
||||||
|
if(BORLAND)
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
|
||||||
|
endif(BORLAND)
|
||||||
|
|
||||||
|
# If we are on AIX, do the _ALL_SOURCE magic
|
||||||
|
if(${CMAKE_SYSTEM_NAME} MATCHES AIX)
|
||||||
|
set(_ALL_SOURCE 1)
|
||||||
|
endif(${CMAKE_SYSTEM_NAME} MATCHES AIX)
|
||||||
|
|
||||||
|
# Include all the necessary files for macros
|
||||||
|
include (CheckFunctionExists)
|
||||||
|
include (CheckIncludeFile)
|
||||||
|
include (CheckIncludeFiles)
|
||||||
|
include (CheckLibraryExists)
|
||||||
|
include (CheckSymbolExists)
|
||||||
|
include (CheckTypeSize)
|
||||||
|
|
||||||
|
# On windows preload settings
|
||||||
|
if(WIN32)
|
||||||
|
include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/Platforms/WindowsCache.cmake)
|
||||||
|
endif(WIN32)
|
||||||
|
|
||||||
|
# This macro checks if the symbol exists in the library and if it
|
||||||
|
# does, it prepends library to the list.
|
||||||
|
macro(CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
|
||||||
|
check_library_exists("${LIBRARY};${CURL_LIBS}" ${SYMBOL} "${CMAKE_LIBRARY_PATH}"
|
||||||
|
${VARIABLE})
|
||||||
|
if(${VARIABLE})
|
||||||
|
set(CURL_LIBS ${LIBRARY} ${CURL_LIBS})
|
||||||
|
endif(${VARIABLE})
|
||||||
|
endmacro(CHECK_LIBRARY_EXISTS_CONCAT)
|
||||||
|
|
||||||
|
# Check for all needed libraries
|
||||||
|
check_library_exists_concat("dl" dlopen HAVE_LIBDL)
|
||||||
|
check_library_exists_concat("socket" connect HAVE_LIBSOCKET)
|
||||||
|
check_library_exists("c" gethostbyname "" NOT_NEED_LIBNSL)
|
||||||
|
|
||||||
|
# Yellowtab Zeta needs different libraries than BeOS 5.
|
||||||
|
if(BEOS)
|
||||||
|
set(NOT_NEED_LIBNSL 1)
|
||||||
|
check_library_exists_concat("bind" gethostbyname HAVE_LIBBIND)
|
||||||
|
check_library_exists_concat("bnetapi" closesocket HAVE_LIBBNETAPI)
|
||||||
|
endif(BEOS)
|
||||||
|
|
||||||
|
if(NOT NOT_NEED_LIBNSL)
|
||||||
|
check_library_exists_concat("nsl" gethostbyname HAVE_LIBNSL)
|
||||||
|
endif(NOT NOT_NEED_LIBNSL)
|
||||||
|
|
||||||
|
check_library_exists_concat("ws2_32" getch HAVE_LIBWS2_32)
|
||||||
|
check_library_exists_concat("winmm" getch HAVE_LIBWINMM)
|
||||||
|
check_library_exists("wldap32" cldap_open "" HAVE_WLDAP32)
|
||||||
|
|
||||||
|
# IF(NOT CURL_SPECIAL_LIBZ)
|
||||||
|
# CHECK_LIBRARY_EXISTS_CONCAT("z" inflateEnd HAVE_LIBZ)
|
||||||
|
# ENDIF(NOT CURL_SPECIAL_LIBZ)
|
||||||
|
|
||||||
|
# Check for idn
|
||||||
|
check_library_exists_concat("idn" idna_to_ascii_lz HAVE_LIBIDN)
|
||||||
|
|
||||||
|
# Check for LDAP
|
||||||
|
check_library_exists_concat("ldap" ldap_init HAVE_LIBLDAP)
|
||||||
|
# if(NOT HAVE_LIBLDAP)
|
||||||
|
# SET(CURL_DISABLE_LDAP ON)
|
||||||
|
# endif(NOT HAVE_LIBLDAP)
|
||||||
|
|
||||||
|
# Check for symbol dlopen (same as HAVE_LIBDL)
|
||||||
|
check_library_exists("${CURL_LIBS}" dlopen "" HAVE_DLOPEN)
|
||||||
|
|
||||||
|
# For other tests to use the same libraries
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES ${CURL_LIBS})
|
||||||
|
|
||||||
|
option(CURL_ZLIB "Set to ON to enable building cURL with zlib support." ON)
|
||||||
|
set(HAVE_LIBZ OFF)
|
||||||
|
set(HAVE_ZLIB_H OFF)
|
||||||
|
set(HAVE_ZLIB OFF)
|
||||||
|
if(CURL_ZLIB) # AND CURL_CONFIG_HAS_BEEN_RUN_BEFORE
|
||||||
|
find_package(ZLIB QUIET)
|
||||||
|
if(ZLIB_FOUND)
|
||||||
|
set(HAVE_ZLIB_H ON)
|
||||||
|
set(HAVE_ZLIB ON)
|
||||||
|
set(HAVE_LIBZ ON)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ON)
|
||||||
|
mark_as_advanced(CMAKE_USE_OPENSSL)
|
||||||
|
if(CMAKE_USE_OPENSSL)
|
||||||
|
if(WIN32)
|
||||||
|
find_package(OpenSSL)
|
||||||
|
if(OPENSSL_FOUND)
|
||||||
|
set(USE_SSLEAY TRUE)
|
||||||
|
set(USE_OPENSSL TRUE)
|
||||||
|
list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES} )
|
||||||
|
else()
|
||||||
|
set(CMAKE_USE_OPENSSL FALSE)
|
||||||
|
message(STATUS "OpenSSL NOT Found, disabling CMAKE_USE_OPENSSL")
|
||||||
|
endif()
|
||||||
|
else(WIN32)
|
||||||
|
check_library_exists_concat("crypto" CRYPTO_lock HAVE_LIBCRYPTO)
|
||||||
|
check_library_exists_concat("ssl" SSL_connect HAVE_LIBSSL)
|
||||||
|
endif(WIN32)
|
||||||
|
endif(CMAKE_USE_OPENSSL)
|
||||||
|
|
||||||
|
# If we have features.h, then do the _BSD_SOURCE magic
|
||||||
|
check_include_file("features.h" HAVE_FEATURES_H)
|
||||||
|
|
||||||
|
# Check if header file exists and add it to the list.
|
||||||
|
macro(CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
|
||||||
|
check_include_files("${CURL_INCLUDES};${FILE}" ${VARIABLE})
|
||||||
|
if(${VARIABLE})
|
||||||
|
set(CURL_INCLUDES ${CURL_INCLUDES} ${FILE})
|
||||||
|
set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -D${VARIABLE}")
|
||||||
|
endif(${VARIABLE})
|
||||||
|
endmacro(CHECK_INCLUDE_FILE_CONCAT)
|
||||||
|
|
||||||
|
|
||||||
|
# Check for header files
|
||||||
|
if(NOT UNIX)
|
||||||
|
check_include_file_concat("ws2tcpip.h" HAVE_WS2TCPIP_H)
|
||||||
|
check_include_file_concat("winsock2.h" HAVE_WINSOCK2_H)
|
||||||
|
endif(NOT UNIX)
|
||||||
|
check_include_file_concat("stdio.h" HAVE_STDIO_H)
|
||||||
|
if(NOT UNIX)
|
||||||
|
check_include_file_concat("windows.h" HAVE_WINDOWS_H)
|
||||||
|
check_include_file_concat("winsock.h" HAVE_WINSOCK_H)
|
||||||
|
endif(NOT UNIX)
|
||||||
|
|
||||||
|
check_include_file_concat("inttypes.h" HAVE_INTTYPES_H)
|
||||||
|
check_include_file_concat("sys/filio.h" HAVE_SYS_FILIO_H)
|
||||||
|
check_include_file_concat("sys/ioctl.h" HAVE_SYS_IOCTL_H)
|
||||||
|
check_include_file_concat("sys/param.h" HAVE_SYS_PARAM_H)
|
||||||
|
check_include_file_concat("sys/poll.h" HAVE_SYS_POLL_H)
|
||||||
|
check_include_file_concat("sys/resource.h" HAVE_SYS_RESOURCE_H)
|
||||||
|
check_include_file_concat("sys/select.h" HAVE_SYS_SELECT_H)
|
||||||
|
check_include_file_concat("sys/socket.h" HAVE_SYS_SOCKET_H)
|
||||||
|
check_include_file_concat("sys/sockio.h" HAVE_SYS_SOCKIO_H)
|
||||||
|
check_include_file_concat("sys/stat.h" HAVE_SYS_STAT_H)
|
||||||
|
check_include_file_concat("sys/time.h" HAVE_SYS_TIME_H)
|
||||||
|
check_include_file_concat("sys/types.h" HAVE_SYS_TYPES_H)
|
||||||
|
check_include_file_concat("sys/uio.h" HAVE_SYS_UIO_H)
|
||||||
|
check_include_file_concat("sys/un.h" HAVE_SYS_UN_H)
|
||||||
|
check_include_file_concat("sys/utime.h" HAVE_SYS_UTIME_H)
|
||||||
|
check_include_file_concat("alloca.h" HAVE_ALLOCA_H)
|
||||||
|
check_include_file_concat("arpa/inet.h" HAVE_ARPA_INET_H)
|
||||||
|
check_include_file_concat("arpa/tftp.h" HAVE_ARPA_TFTP_H)
|
||||||
|
check_include_file_concat("assert.h" HAVE_ASSERT_H)
|
||||||
|
check_include_file_concat("crypto.h" HAVE_CRYPTO_H)
|
||||||
|
check_include_file_concat("des.h" HAVE_DES_H)
|
||||||
|
check_include_file_concat("err.h" HAVE_ERR_H)
|
||||||
|
check_include_file_concat("errno.h" HAVE_ERRNO_H)
|
||||||
|
check_include_file_concat("fcntl.h" HAVE_FCNTL_H)
|
||||||
|
check_include_file_concat("gssapi/gssapi.h" HAVE_GSSAPI_GSSAPI_H)
|
||||||
|
check_include_file_concat("gssapi/gssapi_generic.h" HAVE_GSSAPI_GSSAPI_GENERIC_H)
|
||||||
|
check_include_file_concat("gssapi/gssapi_krb5.h" HAVE_GSSAPI_GSSAPI_KRB5_H)
|
||||||
|
check_include_file_concat("idn-free.h" HAVE_IDN_FREE_H)
|
||||||
|
check_include_file_concat("ifaddrs.h" HAVE_IFADDRS_H)
|
||||||
|
check_include_file_concat("io.h" HAVE_IO_H)
|
||||||
|
check_include_file_concat("krb.h" HAVE_KRB_H)
|
||||||
|
check_include_file_concat("libgen.h" HAVE_LIBGEN_H)
|
||||||
|
check_include_file_concat("libssh2.h" HAVE_LIBSSH2_H)
|
||||||
|
check_include_file_concat("limits.h" HAVE_LIMITS_H)
|
||||||
|
check_include_file_concat("locale.h" HAVE_LOCALE_H)
|
||||||
|
check_include_file_concat("net/if.h" HAVE_NET_IF_H)
|
||||||
|
check_include_file_concat("netdb.h" HAVE_NETDB_H)
|
||||||
|
check_include_file_concat("netinet/in.h" HAVE_NETINET_IN_H)
|
||||||
|
check_include_file_concat("netinet/tcp.h" HAVE_NETINET_TCP_H)
|
||||||
|
check_include_file_concat("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H)
|
||||||
|
check_include_file_concat("openssl/engine.h" HAVE_OPENSSL_ENGINE_H)
|
||||||
|
check_include_file_concat("openssl/err.h" HAVE_OPENSSL_ERR_H)
|
||||||
|
check_include_file_concat("openssl/pem.h" HAVE_OPENSSL_PEM_H)
|
||||||
|
check_include_file_concat("openssl/pkcs12.h" HAVE_OPENSSL_PKCS12_H)
|
||||||
|
check_include_file_concat("openssl/rsa.h" HAVE_OPENSSL_RSA_H)
|
||||||
|
check_include_file_concat("openssl/ssl.h" HAVE_OPENSSL_SSL_H)
|
||||||
|
check_include_file_concat("openssl/x509.h" HAVE_OPENSSL_X509_H)
|
||||||
|
check_include_file_concat("pem.h" HAVE_PEM_H)
|
||||||
|
check_include_file_concat("poll.h" HAVE_POLL_H)
|
||||||
|
check_include_file_concat("pwd.h" HAVE_PWD_H)
|
||||||
|
check_include_file_concat("rsa.h" HAVE_RSA_H)
|
||||||
|
check_include_file_concat("setjmp.h" HAVE_SETJMP_H)
|
||||||
|
check_include_file_concat("sgtty.h" HAVE_SGTTY_H)
|
||||||
|
check_include_file_concat("signal.h" HAVE_SIGNAL_H)
|
||||||
|
check_include_file_concat("ssl.h" HAVE_SSL_H)
|
||||||
|
check_include_file_concat("stdbool.h" HAVE_STDBOOL_H)
|
||||||
|
check_include_file_concat("stdint.h" HAVE_STDINT_H)
|
||||||
|
check_include_file_concat("stdio.h" HAVE_STDIO_H)
|
||||||
|
check_include_file_concat("stdlib.h" HAVE_STDLIB_H)
|
||||||
|
check_include_file_concat("string.h" HAVE_STRING_H)
|
||||||
|
check_include_file_concat("strings.h" HAVE_STRINGS_H)
|
||||||
|
check_include_file_concat("stropts.h" HAVE_STROPTS_H)
|
||||||
|
check_include_file_concat("termio.h" HAVE_TERMIO_H)
|
||||||
|
check_include_file_concat("termios.h" HAVE_TERMIOS_H)
|
||||||
|
check_include_file_concat("time.h" HAVE_TIME_H)
|
||||||
|
check_include_file_concat("tld.h" HAVE_TLD_H)
|
||||||
|
check_include_file_concat("unistd.h" HAVE_UNISTD_H)
|
||||||
|
check_include_file_concat("utime.h" HAVE_UTIME_H)
|
||||||
|
check_include_file_concat("x509.h" HAVE_X509_H)
|
||||||
|
|
||||||
|
check_include_file_concat("process.h" HAVE_PROCESS_H)
|
||||||
|
check_include_file_concat("stddef.h" HAVE_STDDEF_H)
|
||||||
|
check_include_file_concat("dlfcn.h" HAVE_DLFCN_H)
|
||||||
|
check_include_file_concat("malloc.h" HAVE_MALLOC_H)
|
||||||
|
check_include_file_concat("memory.h" HAVE_MEMORY_H)
|
||||||
|
check_include_file_concat("ldap.h" HAVE_LDAP_H)
|
||||||
|
check_include_file_concat("netinet/if_ether.h" HAVE_NETINET_IF_ETHER_H)
|
||||||
|
check_include_file_concat("stdint.h" HAVE_STDINT_H)
|
||||||
|
check_include_file_concat("sockio.h" HAVE_SOCKIO_H)
|
||||||
|
check_include_file_concat("sys/utsname.h" HAVE_SYS_UTSNAME_H)
|
||||||
|
check_include_file_concat("idna.h" HAVE_IDNA_H)
|
||||||
|
|
||||||
|
if(CMAKE_USE_OPENSSL)
|
||||||
|
check_include_file_concat("openssl/rand.h" HAVE_OPENSSL_RAND_H)
|
||||||
|
endif(CMAKE_USE_OPENSSL)
|
||||||
|
|
||||||
|
if(NOT HAVE_LDAP_H)
|
||||||
|
message(STATUS "LDAP_H not found CURL_DISABLE_LDAP set ON")
|
||||||
|
set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
check_type_size(size_t SIZEOF_SIZE_T)
|
||||||
|
check_type_size(ssize_t SIZEOF_SSIZE_T)
|
||||||
|
check_type_size("long long" SIZEOF_LONG_LONG)
|
||||||
|
check_type_size("long" SIZEOF_LONG)
|
||||||
|
check_type_size("short" SIZEOF_SHORT)
|
||||||
|
check_type_size("int" SIZEOF_INT)
|
||||||
|
check_type_size("__int64" SIZEOF___INT64)
|
||||||
|
check_type_size("long double" SIZEOF_LONG_DOUBLE)
|
||||||
|
check_type_size("time_t" SIZEOF_TIME_T)
|
||||||
|
if(NOT HAVE_SIZEOF_SSIZE_T)
|
||||||
|
if(SIZEOF_LONG EQUAL SIZEOF_SIZE_T)
|
||||||
|
set(ssize_t long)
|
||||||
|
endif(SIZEOF_LONG EQUAL SIZEOF_SIZE_T)
|
||||||
|
if(NOT ssize_t AND SIZEOF___INT64 EQUAL SIZEOF_SIZE_T)
|
||||||
|
set(ssize_t __int64)
|
||||||
|
endif(NOT ssize_t AND SIZEOF___INT64 EQUAL SIZEOF_SIZE_T)
|
||||||
|
endif(NOT HAVE_SIZEOF_SSIZE_T)
|
||||||
|
|
||||||
|
# Different sizeofs, etc.
|
||||||
|
|
||||||
|
# define CURL_SIZEOF_LONG 4
|
||||||
|
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||||
|
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||||
|
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||||
|
# define CURL_FORMAT_OFF_T "%lld"
|
||||||
|
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||||
|
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||||
|
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||||
|
|
||||||
|
set(CURL_SIZEOF_LONG ${SIZEOF_LONG})
|
||||||
|
|
||||||
|
if(SIZEOF_LONG EQUAL 8)
|
||||||
|
set(CURL_TYPEOF_CURL_OFF_T long)
|
||||||
|
set(CURL_SIZEOF_CURL_OFF_T 8)
|
||||||
|
set(CURL_FORMAT_CURL_OFF_T "ld")
|
||||||
|
set(CURL_FORMAT_CURL_OFF_TU "lu")
|
||||||
|
set(CURL_FORMAT_OFF_T "%ld")
|
||||||
|
set(CURL_SUFFIX_CURL_OFF_T L)
|
||||||
|
set(CURL_SUFFIX_CURL_OFF_TU LU)
|
||||||
|
endif(SIZEOF_LONG EQUAL 8)
|
||||||
|
|
||||||
|
if(SIZEOF_LONG_LONG EQUAL 8)
|
||||||
|
set(CURL_TYPEOF_CURL_OFF_T "long long")
|
||||||
|
set(CURL_SIZEOF_CURL_OFF_T 8)
|
||||||
|
set(CURL_FORMAT_CURL_OFF_T "lld")
|
||||||
|
set(CURL_FORMAT_CURL_OFF_TU "llu")
|
||||||
|
set(CURL_FORMAT_OFF_T "%lld")
|
||||||
|
set(CURL_SUFFIX_CURL_OFF_T LL)
|
||||||
|
set(CURL_SUFFIX_CURL_OFF_TU LLU)
|
||||||
|
endif(SIZEOF_LONG_LONG EQUAL 8)
|
||||||
|
|
||||||
|
if(NOT CURL_TYPEOF_CURL_OFF_T)
|
||||||
|
set(CURL_TYPEOF_CURL_OFF_T ${ssize_t})
|
||||||
|
set(CURL_SIZEOF_CURL_OFF_T ${SIZEOF_SSIZE_T})
|
||||||
|
# TODO: need adjustment here.
|
||||||
|
set(CURL_FORMAT_CURL_OFF_T "ld")
|
||||||
|
set(CURL_FORMAT_CURL_OFF_TU "lu")
|
||||||
|
set(CURL_FORMAT_OFF_T "%ld")
|
||||||
|
set(CURL_SUFFIX_CURL_OFF_T L)
|
||||||
|
set(CURL_SUFFIX_CURL_OFF_TU LU)
|
||||||
|
endif(NOT CURL_TYPEOF_CURL_OFF_T)
|
||||||
|
|
||||||
|
if(HAVE_SIZEOF_LONG_LONG)
|
||||||
|
set(HAVE_LONGLONG 1)
|
||||||
|
set(HAVE_LL 1)
|
||||||
|
endif(HAVE_SIZEOF_LONG_LONG)
|
||||||
|
|
||||||
|
find_file(RANDOM_FILE urandom /dev)
|
||||||
|
mark_as_advanced(RANDOM_FILE)
|
||||||
|
|
||||||
|
# Check for some functions that are used
|
||||||
|
check_symbol_exists(basename "${CURL_INCLUDES}" HAVE_BASENAME)
|
||||||
|
check_symbol_exists(socket "${CURL_INCLUDES}" HAVE_SOCKET)
|
||||||
|
check_symbol_exists(poll "${CURL_INCLUDES}" HAVE_POLL)
|
||||||
|
check_symbol_exists(select "${CURL_INCLUDES}" HAVE_SELECT)
|
||||||
|
check_symbol_exists(strdup "${CURL_INCLUDES}" HAVE_STRDUP)
|
||||||
|
check_symbol_exists(strstr "${CURL_INCLUDES}" HAVE_STRSTR)
|
||||||
|
check_symbol_exists(strtok_r "${CURL_INCLUDES}" HAVE_STRTOK_R)
|
||||||
|
check_symbol_exists(strftime "${CURL_INCLUDES}" HAVE_STRFTIME)
|
||||||
|
check_symbol_exists(uname "${CURL_INCLUDES}" HAVE_UNAME)
|
||||||
|
check_symbol_exists(strcasecmp "${CURL_INCLUDES}" HAVE_STRCASECMP)
|
||||||
|
check_symbol_exists(stricmp "${CURL_INCLUDES}" HAVE_STRICMP)
|
||||||
|
check_symbol_exists(strcmpi "${CURL_INCLUDES}" HAVE_STRCMPI)
|
||||||
|
check_symbol_exists(strncmpi "${CURL_INCLUDES}" HAVE_STRNCMPI)
|
||||||
|
check_symbol_exists(alarm "${CURL_INCLUDES}" HAVE_ALARM)
|
||||||
|
if(NOT HAVE_STRNCMPI)
|
||||||
|
set(HAVE_STRCMPI)
|
||||||
|
endif(NOT HAVE_STRNCMPI)
|
||||||
|
check_symbol_exists(gethostbyaddr "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR)
|
||||||
|
check_symbol_exists(gethostbyaddr_r "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR_R)
|
||||||
|
check_symbol_exists(gettimeofday "${CURL_INCLUDES}" HAVE_GETTIMEOFDAY)
|
||||||
|
check_symbol_exists(inet_addr "${CURL_INCLUDES}" HAVE_INET_ADDR)
|
||||||
|
check_symbol_exists(inet_ntoa "${CURL_INCLUDES}" HAVE_INET_NTOA)
|
||||||
|
check_symbol_exists(inet_ntoa_r "${CURL_INCLUDES}" HAVE_INET_NTOA_R)
|
||||||
|
check_symbol_exists(tcsetattr "${CURL_INCLUDES}" HAVE_TCSETATTR)
|
||||||
|
check_symbol_exists(tcgetattr "${CURL_INCLUDES}" HAVE_TCGETATTR)
|
||||||
|
check_symbol_exists(perror "${CURL_INCLUDES}" HAVE_PERROR)
|
||||||
|
check_symbol_exists(closesocket "${CURL_INCLUDES}" HAVE_CLOSESOCKET)
|
||||||
|
check_symbol_exists(setvbuf "${CURL_INCLUDES}" HAVE_SETVBUF)
|
||||||
|
check_symbol_exists(sigsetjmp "${CURL_INCLUDES}" HAVE_SIGSETJMP)
|
||||||
|
check_symbol_exists(getpass_r "${CURL_INCLUDES}" HAVE_GETPASS_R)
|
||||||
|
check_symbol_exists(strlcat "${CURL_INCLUDES}" HAVE_STRLCAT)
|
||||||
|
check_symbol_exists(getpwuid "${CURL_INCLUDES}" HAVE_GETPWUID)
|
||||||
|
check_symbol_exists(geteuid "${CURL_INCLUDES}" HAVE_GETEUID)
|
||||||
|
check_symbol_exists(utime "${CURL_INCLUDES}" HAVE_UTIME)
|
||||||
|
if(CMAKE_USE_OPENSSL)
|
||||||
|
check_symbol_exists(RAND_status "${CURL_INCLUDES}" HAVE_RAND_STATUS)
|
||||||
|
check_symbol_exists(RAND_screen "${CURL_INCLUDES}" HAVE_RAND_SCREEN)
|
||||||
|
check_symbol_exists(RAND_egd "${CURL_INCLUDES}" HAVE_RAND_EGD)
|
||||||
|
check_symbol_exists(CRYPTO_cleanup_all_ex_data "${CURL_INCLUDES}"
|
||||||
|
HAVE_CRYPTO_CLEANUP_ALL_EX_DATA)
|
||||||
|
if(HAVE_LIBCRYPTO AND HAVE_LIBSSL)
|
||||||
|
set(USE_OPENSSL 1)
|
||||||
|
set(USE_SSLEAY 1)
|
||||||
|
endif(HAVE_LIBCRYPTO AND HAVE_LIBSSL)
|
||||||
|
endif(CMAKE_USE_OPENSSL)
|
||||||
|
check_symbol_exists(gmtime_r "${CURL_INCLUDES}" HAVE_GMTIME_R)
|
||||||
|
check_symbol_exists(localtime_r "${CURL_INCLUDES}" HAVE_LOCALTIME_R)
|
||||||
|
|
||||||
|
check_symbol_exists(gethostbyname "${CURL_INCLUDES}" HAVE_GETHOSTBYNAME)
|
||||||
|
check_symbol_exists(gethostbyname_r "${CURL_INCLUDES}" HAVE_GETHOSTBYNAME_R)
|
||||||
|
|
||||||
|
check_symbol_exists(signal "${CURL_INCLUDES}" HAVE_SIGNAL_FUNC)
|
||||||
|
check_symbol_exists(SIGALRM "${CURL_INCLUDES}" HAVE_SIGNAL_MACRO)
|
||||||
|
if(HAVE_SIGNAL_FUNC AND HAVE_SIGNAL_MACRO)
|
||||||
|
set(HAVE_SIGNAL 1)
|
||||||
|
endif(HAVE_SIGNAL_FUNC AND HAVE_SIGNAL_MACRO)
|
||||||
|
check_symbol_exists(uname "${CURL_INCLUDES}" HAVE_UNAME)
|
||||||
|
check_symbol_exists(strtoll "${CURL_INCLUDES}" HAVE_STRTOLL)
|
||||||
|
check_symbol_exists(_strtoi64 "${CURL_INCLUDES}" HAVE__STRTOI64)
|
||||||
|
check_symbol_exists(strerror_r "${CURL_INCLUDES}" HAVE_STRERROR_R)
|
||||||
|
check_symbol_exists(siginterrupt "${CURL_INCLUDES}" HAVE_SIGINTERRUPT)
|
||||||
|
check_symbol_exists(perror "${CURL_INCLUDES}" HAVE_PERROR)
|
||||||
|
check_symbol_exists(fork "${CURL_INCLUDES}" HAVE_FORK)
|
||||||
|
check_symbol_exists(freeaddrinfo "${CURL_INCLUDES}" HAVE_FREEADDRINFO)
|
||||||
|
check_symbol_exists(freeifaddrs "${CURL_INCLUDES}" HAVE_FREEIFADDRS)
|
||||||
|
check_symbol_exists(pipe "${CURL_INCLUDES}" HAVE_PIPE)
|
||||||
|
check_symbol_exists(ftruncate "${CURL_INCLUDES}" HAVE_FTRUNCATE)
|
||||||
|
check_symbol_exists(getprotobyname "${CURL_INCLUDES}" HAVE_GETPROTOBYNAME)
|
||||||
|
check_symbol_exists(getrlimit "${CURL_INCLUDES}" HAVE_GETRLIMIT)
|
||||||
|
check_symbol_exists(idn_free "${CURL_INCLUDES}" HAVE_IDN_FREE)
|
||||||
|
check_symbol_exists(idna_strerror "${CURL_INCLUDES}" HAVE_IDNA_STRERROR)
|
||||||
|
check_symbol_exists(tld_strerror "${CURL_INCLUDES}" HAVE_TLD_STRERROR)
|
||||||
|
check_symbol_exists(setlocale "${CURL_INCLUDES}" HAVE_SETLOCALE)
|
||||||
|
check_symbol_exists(setrlimit "${CURL_INCLUDES}" HAVE_SETRLIMIT)
|
||||||
|
check_symbol_exists(fcntl "${CURL_INCLUDES}" HAVE_FCNTL)
|
||||||
|
check_symbol_exists(ioctl "${CURL_INCLUDES}" HAVE_IOCTL)
|
||||||
|
check_symbol_exists(setsockopt "${CURL_INCLUDES}" HAVE_SETSOCKOPT)
|
||||||
|
|
||||||
|
# symbol exists in win32, but function does not.
|
||||||
|
check_function_exists(inet_pton HAVE_INET_PTON)
|
||||||
|
|
||||||
|
# sigaction and sigsetjmp are special. Use special mechanism for
|
||||||
|
# detecting those, but only if previous attempt failed.
|
||||||
|
if(HAVE_SIGNAL_H)
|
||||||
|
check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION)
|
||||||
|
endif(HAVE_SIGNAL_H)
|
||||||
|
|
||||||
|
if(NOT HAVE_SIGSETJMP)
|
||||||
|
if(HAVE_SETJMP_H)
|
||||||
|
check_symbol_exists(sigsetjmp "setjmp.h" HAVE_MACRO_SIGSETJMP)
|
||||||
|
if(HAVE_MACRO_SIGSETJMP)
|
||||||
|
set(HAVE_SIGSETJMP 1)
|
||||||
|
endif(HAVE_MACRO_SIGSETJMP)
|
||||||
|
endif(HAVE_SETJMP_H)
|
||||||
|
endif(NOT HAVE_SIGSETJMP)
|
||||||
|
|
||||||
|
# If there is no stricmp(), do not allow LDAP to parse URLs
|
||||||
|
if(NOT HAVE_STRICMP)
|
||||||
|
set(HAVE_LDAP_URL_PARSE 1)
|
||||||
|
endif(NOT HAVE_STRICMP)
|
||||||
|
|
||||||
|
# For other curl specific tests, use this macro.
|
||||||
|
macro(CURL_INTERNAL_TEST CURL_TEST)
|
||||||
|
if("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
|
||||||
|
set(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||||
|
"-D${CURL_TEST} ${CURL_TEST_DEFINES} ${CMAKE_REQUIRED_FLAGS}")
|
||||||
|
if(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
set(CURL_TEST_ADD_LIBRARIES
|
||||||
|
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||||
|
endif(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
|
||||||
|
message(STATUS "Performing Curl Test ${CURL_TEST}")
|
||||||
|
try_compile(${CURL_TEST}
|
||||||
|
${CMAKE_BINARY_DIR}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c
|
||||||
|
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
|
||||||
|
"${CURL_TEST_ADD_LIBRARIES}"
|
||||||
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
|
if(${CURL_TEST})
|
||||||
|
set(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||||
|
message(STATUS "Performing Curl Test ${CURL_TEST} - Success")
|
||||||
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||||
|
"Performing Curl Test ${CURL_TEST} passed with the following output:\n"
|
||||||
|
"${OUTPUT}\n")
|
||||||
|
else(${CURL_TEST})
|
||||||
|
message(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
|
||||||
|
set(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||||
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||||
|
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
|
||||||
|
"${OUTPUT}\n")
|
||||||
|
endif(${CURL_TEST})
|
||||||
|
endif("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
|
||||||
|
endmacro(CURL_INTERNAL_TEST)
|
||||||
|
|
||||||
|
macro(CURL_INTERNAL_TEST_RUN CURL_TEST)
|
||||||
|
if("${CURL_TEST}_COMPILE" MATCHES "^${CURL_TEST}_COMPILE$")
|
||||||
|
set(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||||
|
"-D${CURL_TEST} ${CMAKE_REQUIRED_FLAGS}")
|
||||||
|
if(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
set(CURL_TEST_ADD_LIBRARIES
|
||||||
|
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||||
|
endif(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
|
||||||
|
message(STATUS "Performing Curl Test ${CURL_TEST}")
|
||||||
|
try_run(${CURL_TEST} ${CURL_TEST}_COMPILE
|
||||||
|
${CMAKE_BINARY_DIR}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c
|
||||||
|
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
|
||||||
|
"${CURL_TEST_ADD_LIBRARIES}"
|
||||||
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
|
if(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
|
||||||
|
set(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||||
|
message(STATUS "Performing Curl Test ${CURL_TEST} - Success")
|
||||||
|
else(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
|
||||||
|
message(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
|
||||||
|
set(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||||
|
file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
|
||||||
|
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
|
||||||
|
"${OUTPUT}")
|
||||||
|
if(${CURL_TEST}_COMPILE)
|
||||||
|
file(APPEND
|
||||||
|
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
|
||||||
|
"There was a problem running this test\n")
|
||||||
|
endif(${CURL_TEST}_COMPILE)
|
||||||
|
file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
|
||||||
|
"\n\n")
|
||||||
|
endif(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
|
||||||
|
endif("${CURL_TEST}_COMPILE" MATCHES "^${CURL_TEST}_COMPILE$")
|
||||||
|
endmacro(CURL_INTERNAL_TEST_RUN)
|
||||||
|
|
||||||
|
# Do curl specific tests
|
||||||
|
foreach(CURL_TEST
|
||||||
|
HAVE_FCNTL_O_NONBLOCK
|
||||||
|
HAVE_IOCTLSOCKET
|
||||||
|
HAVE_IOCTLSOCKET_CAMEL
|
||||||
|
HAVE_IOCTLSOCKET_CAMEL_FIONBIO
|
||||||
|
HAVE_IOCTLSOCKET_FIONBIO
|
||||||
|
HAVE_IOCTL_FIONBIO
|
||||||
|
HAVE_IOCTL_SIOCGIFADDR
|
||||||
|
HAVE_SETSOCKOPT_SO_NONBLOCK
|
||||||
|
HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
|
||||||
|
TIME_WITH_SYS_TIME
|
||||||
|
HAVE_O_NONBLOCK
|
||||||
|
HAVE_GETHOSTBYADDR_R_5
|
||||||
|
HAVE_GETHOSTBYADDR_R_7
|
||||||
|
HAVE_GETHOSTBYADDR_R_8
|
||||||
|
HAVE_GETHOSTBYADDR_R_5_REENTRANT
|
||||||
|
HAVE_GETHOSTBYADDR_R_7_REENTRANT
|
||||||
|
HAVE_GETHOSTBYADDR_R_8_REENTRANT
|
||||||
|
HAVE_GETHOSTBYNAME_R_3
|
||||||
|
HAVE_GETHOSTBYNAME_R_5
|
||||||
|
HAVE_GETHOSTBYNAME_R_6
|
||||||
|
HAVE_GETHOSTBYNAME_R_3_REENTRANT
|
||||||
|
HAVE_GETHOSTBYNAME_R_5_REENTRANT
|
||||||
|
HAVE_GETHOSTBYNAME_R_6_REENTRANT
|
||||||
|
HAVE_SOCKLEN_T
|
||||||
|
HAVE_IN_ADDR_T
|
||||||
|
HAVE_BOOL_T
|
||||||
|
STDC_HEADERS
|
||||||
|
RETSIGTYPE_TEST
|
||||||
|
HAVE_INET_NTOA_R_DECL
|
||||||
|
HAVE_INET_NTOA_R_DECL_REENTRANT
|
||||||
|
HAVE_GETADDRINFO
|
||||||
|
HAVE_FILE_OFFSET_BITS
|
||||||
|
)
|
||||||
|
curl_internal_test(${CURL_TEST})
|
||||||
|
endforeach(CURL_TEST)
|
||||||
|
if(HAVE_FILE_OFFSET_BITS)
|
||||||
|
set(_FILE_OFFSET_BITS 64)
|
||||||
|
endif(HAVE_FILE_OFFSET_BITS)
|
||||||
|
foreach(CURL_TEST
|
||||||
|
HAVE_GLIBC_STRERROR_R
|
||||||
|
HAVE_POSIX_STRERROR_R
|
||||||
|
)
|
||||||
|
curl_internal_test_run(${CURL_TEST})
|
||||||
|
endforeach(CURL_TEST)
|
||||||
|
|
||||||
|
# Check for reentrant
|
||||||
|
foreach(CURL_TEST
|
||||||
|
HAVE_GETHOSTBYADDR_R_5
|
||||||
|
HAVE_GETHOSTBYADDR_R_7
|
||||||
|
HAVE_GETHOSTBYADDR_R_8
|
||||||
|
HAVE_GETHOSTBYNAME_R_3
|
||||||
|
HAVE_GETHOSTBYNAME_R_5
|
||||||
|
HAVE_GETHOSTBYNAME_R_6
|
||||||
|
HAVE_INET_NTOA_R_DECL_REENTRANT)
|
||||||
|
if(NOT ${CURL_TEST})
|
||||||
|
if(${CURL_TEST}_REENTRANT)
|
||||||
|
set(NEED_REENTRANT 1)
|
||||||
|
endif(${CURL_TEST}_REENTRANT)
|
||||||
|
endif(NOT ${CURL_TEST})
|
||||||
|
endforeach(CURL_TEST)
|
||||||
|
|
||||||
|
if(NEED_REENTRANT)
|
||||||
|
foreach(CURL_TEST
|
||||||
|
HAVE_GETHOSTBYADDR_R_5
|
||||||
|
HAVE_GETHOSTBYADDR_R_7
|
||||||
|
HAVE_GETHOSTBYADDR_R_8
|
||||||
|
HAVE_GETHOSTBYNAME_R_3
|
||||||
|
HAVE_GETHOSTBYNAME_R_5
|
||||||
|
HAVE_GETHOSTBYNAME_R_6)
|
||||||
|
set(${CURL_TEST} 0)
|
||||||
|
if(${CURL_TEST}_REENTRANT)
|
||||||
|
set(${CURL_TEST} 1)
|
||||||
|
endif(${CURL_TEST}_REENTRANT)
|
||||||
|
endforeach(CURL_TEST)
|
||||||
|
endif(NEED_REENTRANT)
|
||||||
|
|
||||||
|
if(HAVE_INET_NTOA_R_DECL_REENTRANT)
|
||||||
|
set(HAVE_INET_NTOA_R_DECL 1)
|
||||||
|
set(NEED_REENTRANT 1)
|
||||||
|
endif(HAVE_INET_NTOA_R_DECL_REENTRANT)
|
||||||
|
|
||||||
|
# Some other minor tests
|
||||||
|
|
||||||
|
if(NOT HAVE_IN_ADDR_T)
|
||||||
|
set(in_addr_t "unsigned long")
|
||||||
|
endif(NOT HAVE_IN_ADDR_T)
|
||||||
|
|
||||||
|
# Fix libz / zlib.h
|
||||||
|
|
||||||
|
if(NOT CURL_SPECIAL_LIBZ)
|
||||||
|
if(NOT HAVE_LIBZ)
|
||||||
|
set(HAVE_ZLIB_H 0)
|
||||||
|
endif(NOT HAVE_LIBZ)
|
||||||
|
|
||||||
|
if(NOT HAVE_ZLIB_H)
|
||||||
|
set(HAVE_LIBZ 0)
|
||||||
|
endif(NOT HAVE_ZLIB_H)
|
||||||
|
endif(NOT CURL_SPECIAL_LIBZ)
|
||||||
|
|
||||||
|
if(_FILE_OFFSET_BITS)
|
||||||
|
set(_FILE_OFFSET_BITS 64)
|
||||||
|
endif(_FILE_OFFSET_BITS)
|
||||||
|
set(CMAKE_REQUIRED_FLAGS "-D_FILE_OFFSET_BITS=64")
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/curl/curl.h")
|
||||||
|
check_type_size("curl_off_t" SIZEOF_CURL_OFF_T)
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES)
|
||||||
|
set(CMAKE_REQUIRED_FLAGS)
|
||||||
|
|
||||||
|
|
||||||
|
# Check for nonblocking
|
||||||
|
set(HAVE_DISABLED_NONBLOCKING 1)
|
||||||
|
if(HAVE_FIONBIO OR
|
||||||
|
HAVE_IOCTLSOCKET OR
|
||||||
|
HAVE_IOCTLSOCKET_CASE OR
|
||||||
|
HAVE_O_NONBLOCK)
|
||||||
|
set(HAVE_DISABLED_NONBLOCKING)
|
||||||
|
endif(HAVE_FIONBIO OR
|
||||||
|
HAVE_IOCTLSOCKET OR
|
||||||
|
HAVE_IOCTLSOCKET_CASE OR
|
||||||
|
HAVE_O_NONBLOCK)
|
||||||
|
|
||||||
|
if(RETSIGTYPE_TEST)
|
||||||
|
set(RETSIGTYPE void)
|
||||||
|
else(RETSIGTYPE_TEST)
|
||||||
|
set(RETSIGTYPE int)
|
||||||
|
endif(RETSIGTYPE_TEST)
|
||||||
|
|
||||||
|
if(CMAKE_COMPILER_IS_GNUCC AND APPLE)
|
||||||
|
include(CheckCCompilerFlag)
|
||||||
|
check_c_compiler_flag(-Wno-long-double HAVE_C_FLAG_Wno_long_double)
|
||||||
|
if(HAVE_C_FLAG_Wno_long_double)
|
||||||
|
# The Mac version of GCC warns about use of long double. Disable it.
|
||||||
|
get_source_file_property(MPRINTF_COMPILE_FLAGS mprintf.c COMPILE_FLAGS)
|
||||||
|
if(MPRINTF_COMPILE_FLAGS)
|
||||||
|
set(MPRINTF_COMPILE_FLAGS "${MPRINTF_COMPILE_FLAGS} -Wno-long-double")
|
||||||
|
else(MPRINTF_COMPILE_FLAGS)
|
||||||
|
set(MPRINTF_COMPILE_FLAGS "-Wno-long-double")
|
||||||
|
endif(MPRINTF_COMPILE_FLAGS)
|
||||||
|
set_source_files_properties(mprintf.c PROPERTIES
|
||||||
|
COMPILE_FLAGS ${MPRINTF_COMPILE_FLAGS})
|
||||||
|
endif(HAVE_C_FLAG_Wno_long_double)
|
||||||
|
endif(CMAKE_COMPILER_IS_GNUCC AND APPLE)
|
||||||
|
|
||||||
|
if(HAVE_SOCKLEN_T)
|
||||||
|
set(CURL_TYPEOF_CURL_SOCKLEN_T "socklen_t")
|
||||||
|
if(WIN32)
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES "winsock2.h;ws2tcpip.h")
|
||||||
|
elseif(HAVE_SYS_SOCKET_H)
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES "sys/socket.h")
|
||||||
|
endif()
|
||||||
|
check_type_size("socklen_t" CURL_SIZEOF_CURL_SOCKLEN_T)
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES)
|
||||||
|
if(NOT HAVE_CURL_SIZEOF_CURL_SOCKLEN_T)
|
||||||
|
message(FATAL_ERROR
|
||||||
|
"Check for sizeof socklen_t failed, see CMakeFiles/CMakerror.log")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(CURL_TYPEOF_CURL_SOCKLEN_T int)
|
||||||
|
set(CURL_SIZEOF_CURL_SOCKLEN_T ${SIZEOF_INT})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(CMake/OtherTests.cmake)
|
||||||
|
|
||||||
|
add_definitions(-DHAVE_CONFIG_H)
|
||||||
|
|
||||||
|
# For windows, do not allow the compiler to use default target (Vista).
|
||||||
|
if(WIN32)
|
||||||
|
add_definitions(-D_WIN32_WINNT=0x0501)
|
||||||
|
endif(WIN32)
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
|
||||||
|
endif(MSVC)
|
||||||
|
|
||||||
|
# Sets up the dependencies (zlib, OpenSSL, etc.) of a cURL subproject according to options.
|
||||||
|
# TODO This is far to be complete!
|
||||||
|
function(SETUP_CURL_DEPENDENCIES TARGET_NAME)
|
||||||
|
if(CURL_ZLIB AND ZLIB_FOUND)
|
||||||
|
include_directories(${ZLIB_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
if(CURL_ZLIB AND ZLIB_FOUND)
|
||||||
|
target_link_libraries(${TARGET_NAME} ${ZLIB_LIBRARIES})
|
||||||
|
#ADD_DEFINITIONS( -DHAVE_ZLIB_H -DHAVE_ZLIB -DHAVE_LIBZ )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_USE_OPENSSL AND OPENSSL_FOUND)
|
||||||
|
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
if(CMAKE_USE_OPENSSL AND CURL_CONFIG_HAS_BEEN_RUN_BEFORE)
|
||||||
|
target_link_libraries(${TARGET_NAME} ${OPENSSL_LIBRARIES})
|
||||||
|
#ADD_DEFINITIONS( -DUSE_SSLEAY )
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
# Ugly (but functional) way to include "Makefile.inc" by transforming it (= regenerate it).
|
||||||
|
function(TRANSFORM_MAKEFILE_INC INPUT_FILE OUTPUT_FILE)
|
||||||
|
file(READ ${INPUT_FILE} MAKEFILE_INC_TEXT)
|
||||||
|
string(REPLACE "$(top_srcdir)" "\${CURL_SOURCE_DIR}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||||
|
string(REPLACE "$(top_builddir)" "\${CURL_BINARY_DIR}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||||
|
|
||||||
|
string(REGEX REPLACE "\\\\\n" "<22>!<21>" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||||
|
string(REGEX REPLACE "([a-zA-Z_][a-zA-Z0-9_]*)[\t ]*=[\t ]*([^\n]*)" "SET(\\1 \\2)" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||||
|
string(REPLACE "<22>!<21>" "\n" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||||
|
|
||||||
|
string(REGEX REPLACE "\\$\\(([a-zA-Z_][a-zA-Z0-9_]*)\\)" "\${\\1}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace $() with ${}
|
||||||
|
string(REGEX REPLACE "@([a-zA-Z_][a-zA-Z0-9_]*)@" "\${\\1}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace @@ with ${}, even if that may not be read by CMake scripts.
|
||||||
|
file(WRITE ${OUTPUT_FILE} ${MAKEFILE_INC_TEXT})
|
||||||
|
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
add_subdirectory(lib)
|
||||||
|
if(BUILD_CURL_EXE)
|
||||||
|
add_subdirectory(src)
|
||||||
|
endif()
|
||||||
|
if(BUILD_CURL_TESTS)
|
||||||
|
add_subdirectory(tests)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# This needs to be run very last so other parts of the scripts can take advantage of this.
|
||||||
|
if(NOT CURL_CONFIG_HAS_BEEN_RUN_BEFORE)
|
||||||
|
set(CURL_CONFIG_HAS_BEEN_RUN_BEFORE 1 CACHE INTERNAL "Flag to track whether this is the first time running CMake or if CMake has been configured before")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Installation.
|
||||||
|
# First, install generated curlbuild.h
|
||||||
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/include/curl/curlbuild.h"
|
||||||
|
DESTINATION include/curl )
|
||||||
|
# Next, install other headers excluding curlbuild.h
|
||||||
|
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/curl"
|
||||||
|
DESTINATION include
|
||||||
|
FILES_MATCHING PATTERN "*.h"
|
||||||
|
PATTERN "curlbuild.h" EXCLUDE)
|
57
iis/winbuild/Makefile.win
Normal file
57
iis/winbuild/Makefile.win
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
###########################################################################
|
||||||
|
### You Will need to modify the following variables for your system
|
||||||
|
###########################################################################
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
# Path to Apache httpd installation
|
||||||
|
BASE = C:\Apache22
|
||||||
|
|
||||||
|
# Paths to required libraries
|
||||||
|
PCRE = C:\work\pcre-8.30
|
||||||
|
CURL = C:\work\curl-7.24.0
|
||||||
|
|
||||||
|
# Linking libraries
|
||||||
|
LIBS = $(BASE)\lib\libapr-1.lib \
|
||||||
|
$(BASE)\lib\libaprutil-1.lib \
|
||||||
|
$(PCRE)\pcre.lib \
|
||||||
|
$(CURL)\libcurl_imp.lib \
|
||||||
|
wsock32.lib
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
CC = cL
|
||||||
|
|
||||||
|
MT = mt
|
||||||
|
|
||||||
|
DEFS = /nologo /O2 /W3 -DWIN32 -DWINNT -Dinline=APR_INLINE -D_CONSOLE
|
||||||
|
|
||||||
|
EXE = mlogc.exe
|
||||||
|
|
||||||
|
INCLUDES = -I. -I..\apache2 \
|
||||||
|
-I$(PCRE)\include -I$(PCRE) \
|
||||||
|
-I$(CURL)\include -I$(CURL) \
|
||||||
|
-I$(BASE)\include
|
||||||
|
|
||||||
|
CFLAGS= -MT $(INCLUDES) $(DEFS)
|
||||||
|
|
||||||
|
LDFLAGS =
|
||||||
|
|
||||||
|
OBJS = mlogc.obj
|
||||||
|
|
||||||
|
all: $(EXE)
|
||||||
|
|
||||||
|
.c.obj:
|
||||||
|
$(CC) $(CFLAGS) -c $< -Fo$@
|
||||||
|
|
||||||
|
.cpp.obj:
|
||||||
|
$(CC) $(CFLAGS) -c $< -Fo$@
|
||||||
|
|
||||||
|
$(EXE): $(OBJS)
|
||||||
|
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) /link /NODEFAULTLIB:MSVCRT.lib /subsystem:console
|
||||||
|
|
||||||
|
install: $(EXE)
|
||||||
|
copy $(EXE) $(BASE)\bin
|
||||||
|
|
||||||
|
clean:
|
||||||
|
del $(OBJS) $(EXE) *.dll *.lib *.pdb *.idb *.ilk *.exp *.res *.rc *.bin *.manifest
|
224
iis/winbuild/VCVarsQueryRegistry.bat
Normal file
224
iis/winbuild/VCVarsQueryRegistry.bat
Normal file
@@ -0,0 +1,224 @@
|
|||||||
|
@call :GetWindowsSdkDir
|
||||||
|
@call :GetVSInstallDir
|
||||||
|
@call :GetVCInstallDir
|
||||||
|
@call :GetFSharpInstallDir
|
||||||
|
@if "%1"=="32bit" (
|
||||||
|
@call :GetFrameworkDir32
|
||||||
|
@call :GetFrameworkVer32
|
||||||
|
)
|
||||||
|
@if "%2"=="64bit" (
|
||||||
|
@call :GetFrameworkDir64
|
||||||
|
@call :GetFrameworkVer64
|
||||||
|
)
|
||||||
|
@SET Framework35Version=v3.5
|
||||||
|
|
||||||
|
@goto end
|
||||||
|
|
||||||
|
@REM -----------------------------------------------------------------------
|
||||||
|
:GetWindowsSdkDir
|
||||||
|
@set WindowsSdkDir=
|
||||||
|
@call :GetWindowsSdkDirHelper HKLM > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetWindowsSdkDirHelper HKCU > nul 2>&1
|
||||||
|
@if errorlevel 1 set WindowsSdkDir=%VCINSTALLDIR%\PlatformSDK\
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
:GetWindowsSdkDirHelper
|
||||||
|
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" /v "InstallationFolder"') DO (
|
||||||
|
@if "%%i"=="InstallationFolder" (
|
||||||
|
@SET "WindowsSdkDir=%%k"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@if "%WindowsSdkDir%"=="" exit /B 1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
@REM -----------------------------------------------------------------------
|
||||||
|
:GetVSInstallDir
|
||||||
|
@set VSINSTALLDIR=
|
||||||
|
@call :GetVSInstallDirHelper32 HKLM > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetVSInstallDirHelper32 HKCU > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetVSInstallDirHelper64 HKLM > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetVSInstallDirHelper64 HKCU > nul 2>&1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
:GetVSInstallDirHelper32
|
||||||
|
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v "10.0"') DO (
|
||||||
|
@if "%%i"=="10.0" (
|
||||||
|
@SET "VSINSTALLDIR=%%k"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@if "%VSINSTALLDIR%"=="" exit /B 1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
:GetVSInstallDirHelper64
|
||||||
|
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" /v "10.0"') DO (
|
||||||
|
@if "%%i"=="10.0" (
|
||||||
|
@SET "VSINSTALLDIR=%%k"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@if "%VSINSTALLDIR%"=="" exit /B 1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
@REM -----------------------------------------------------------------------
|
||||||
|
:GetVCInstallDir
|
||||||
|
@set VCINSTALLDIR=
|
||||||
|
@call :GetVCInstallDirHelper32 HKLM > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetVCInstallDirHelper32 HKCU > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetVCInstallDirHelper64 HKLM > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetVCInstallDirHelper64 HKCU > nul 2>&1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
:GetVCInstallDirHelper32
|
||||||
|
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\SxS\VC7" /v "10.0"') DO (
|
||||||
|
@if "%%i"=="10.0" (
|
||||||
|
@SET "VCINSTALLDIR=%%k"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@if "%VCINSTALLDIR%"=="" exit /B 1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
:GetVCInstallDirHelper64
|
||||||
|
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7" /v "10.0"') DO (
|
||||||
|
@if "%%i"=="10.0" (
|
||||||
|
@SET "VCINSTALLDIR=%%k"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@if "%VCINSTALLDIR%"=="" exit /B 1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
@REM -----------------------------------------------------------------------
|
||||||
|
:GetFSharpInstallDir
|
||||||
|
@set FSHARPINSTALLDIR=
|
||||||
|
@call :GetFSharpInstallDirHelper32 HKLM > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetFSharpInstallDirHelper32 HKCU > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetFSharpInstallDirHelper64 HKLM > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetFSharpInstallDirHelper64 HKCU > nul 2>&1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
:GetFSharpInstallDirHelper32
|
||||||
|
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\10.0\Setup\F#" /v "ProductDir"') DO (
|
||||||
|
@if "%%i"=="ProductDir" (
|
||||||
|
@SET "FSHARPINSTALLDIR=%%k"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@if "%FSHARPINSTALLDIR%"=="" exit /B 1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
:GetFSharpInstallDirHelper64
|
||||||
|
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Setup\F#" /v "ProductDir"') DO (
|
||||||
|
@if "%%i"=="ProductDir" (
|
||||||
|
@SET "FSHARPINSTALLDIR=%%k"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@if "%FSHARPINSTALLDIR%"=="" exit /B 1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
@REM -----------------------------------------------------------------------
|
||||||
|
:GetFrameworkDir32
|
||||||
|
@set FrameworkDir32=
|
||||||
|
@call :GetFrameworkDir32Helper32 HKLM > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetFrameworkDir32Helper32 HKCU > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetFrameworkDir32Helper64 HKLM > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetFrameworkDir32Helper64 HKCU > nul 2>&1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
:GetFrameworkDir32Helper32
|
||||||
|
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\SxS\VC7" /v "FrameworkDir32"') DO (
|
||||||
|
@if "%%i"=="FrameworkDir32" (
|
||||||
|
@SET "FrameworkDIR32=%%k"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@if "%FrameworkDir32%"=="" exit /B 1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
:GetFrameworkDir32Helper64
|
||||||
|
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7" /v "FrameworkDir32"') DO (
|
||||||
|
@if "%%i"=="FrameworkDir32" (
|
||||||
|
@SET "FrameworkDIR32=%%k"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@if "%FrameworkDIR32%"=="" exit /B 1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
@REM -----------------------------------------------------------------------
|
||||||
|
:GetFrameworkDir64
|
||||||
|
@set FrameworkDir64=
|
||||||
|
@call :GetFrameworkDir64Helper32 HKLM > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetFrameworkDir64Helper32 HKCU > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetFrameworkDir64Helper64 HKLM > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetFrameworkDir64Helper64 HKCU > nul 2>&1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
:GetFrameworkDir64Helper32
|
||||||
|
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\SxS\VC7" /v "FrameworkDir64"') DO (
|
||||||
|
@if "%%i"=="FrameworkDir64" (
|
||||||
|
@SET "FrameworkDIR64=%%k"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@if "%FrameworkDIR64%"=="" exit /B 1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
:GetFrameworkDir64Helper64
|
||||||
|
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7" /v "FrameworkDir64"') DO (
|
||||||
|
@if "%%i"=="FrameworkDir64" (
|
||||||
|
@SET "FrameworkDIR64=%%k"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@if "%FrameworkDIR64%"=="" exit /B 1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
@REM -----------------------------------------------------------------------
|
||||||
|
:GetFrameworkVer32
|
||||||
|
@set FrameworkVer32=
|
||||||
|
@call :GetFrameworkVer32Helper32 HKLM > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetFrameworkVer32Helper32 HKCU > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetFrameworkVer32Helper64 HKLM > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetFrameworkVer32Helper64 HKCU > nul 2>&1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
:GetFrameworkVer32Helper32
|
||||||
|
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\SxS\VC7" /v "FrameworkVer32"') DO (
|
||||||
|
@if "%%i"=="FrameworkVer32" (
|
||||||
|
@SET "FrameworkVersion32=%%k"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@if "%FrameworkVersion32%"=="" exit /B 1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
:GetFrameworkVer32Helper64
|
||||||
|
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7" /v "FrameworkVer32"') DO (
|
||||||
|
@if "%%i"=="FrameworkVer32" (
|
||||||
|
@SET "FrameworkVersion32=%%k"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@if "%FrameworkVersion32%"=="" exit /B 1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
@REM -----------------------------------------------------------------------
|
||||||
|
:GetFrameworkVer64
|
||||||
|
@set FrameworkVer64=
|
||||||
|
@call :GetFrameworkVer64Helper32 HKLM > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetFrameworkVer64Helper32 HKCU > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetFrameworkVer64Helper64 HKLM > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetFrameworkVer64Helper64 HKCU > nul 2>&1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
:GetFrameworkVer64Helper32
|
||||||
|
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\SxS\VC7" /v "FrameworkVer64"') DO (
|
||||||
|
@if "%%i"=="FrameworkVer64" (
|
||||||
|
@SET "FrameworkVersion64=%%k"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@if "%FrameworkVersion64%"=="" exit /B 1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
:GetFrameworkVer64Helper64
|
||||||
|
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7" /v "FrameworkVer64"') DO (
|
||||||
|
@if "%%i"=="FrameworkVer64" (
|
||||||
|
@SET "FrameworkVersion64=%%k"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@if "%FrameworkVersion64%"=="" exit /B 1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
@REM -----------------------------------------------------------------------
|
||||||
|
:end
|
1779
iis/winbuild/apr.mak
Normal file
1779
iis/winbuild/apr.mak
Normal file
File diff suppressed because it is too large
Load Diff
1472
iis/winbuild/aprutil.mak
Normal file
1472
iis/winbuild/aprutil.mak
Normal file
File diff suppressed because it is too large
Load Diff
115
iis/winbuild/build.bat
Normal file
115
iis/winbuild/build.bat
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
c:
|
||||||
|
set WORK=c:\work
|
||||||
|
set HTTPD=httpd-2.2.22
|
||||||
|
set APACHE=c:\Apache22
|
||||||
|
set PCRE=pcre-8.30
|
||||||
|
set ZLIB=zlib-1.2.7
|
||||||
|
set LIBXML2=libxml2-2.7.7
|
||||||
|
set LUA=lua-5.1.5
|
||||||
|
set CURL=curl-7.24.0
|
||||||
|
|
||||||
|
cd %WORK%
|
||||||
|
rmdir /s /q %APACHE%
|
||||||
|
rmdir /s /q %HTTPD%
|
||||||
|
7z.exe x %HTTPD%-win32-src.zip
|
||||||
|
fart.exe -r -i -C %WORK%\%HTTPD%\*.mak \x2Fmachine:x86 " "
|
||||||
|
fart.exe -r -i -C %WORK%\%HTTPD%\*.mk.win \x2Fmachine:x86 " "
|
||||||
|
copy /y %WORK%\libhttpd.mak %WORK%\%HTTPD%
|
||||||
|
copy /y %WORK%\mod_ssl.mak %WORK%\%HTTPD%\modules\ssl
|
||||||
|
copy /y %WORK%\apr.mak %WORK%\%HTTPD%\srclib\apr
|
||||||
|
copy /y %WORK%\libapr.mak %WORK%\%HTTPD%\srclib\apr
|
||||||
|
copy /y %WORK%\aprutil.mak %WORK%\%HTTPD%\srclib\apr-util
|
||||||
|
copy /y %WORK%\libaprutil.mak %WORK%\%HTTPD%\srclib\apr-util
|
||||||
|
copy /y %WORK%\dftables.mak %WORK%\%HTTPD%\srclib\pcre
|
||||||
|
copy /y %WORK%\pcre.mak %WORK%\%HTTPD%\srclib\pcre
|
||||||
|
cd %HTTPD%
|
||||||
|
nmake -f Makefile.win installr
|
||||||
|
SET HTTPD_BUILD=%WORK%\%HTTPD%
|
||||||
|
IF NOT DEFINED FULLBUILD pause
|
||||||
|
|
||||||
|
cd %WORK%
|
||||||
|
rmdir /s /q %PCRE%
|
||||||
|
7z.exe x %PCRE%.zip
|
||||||
|
cd %PCRE%
|
||||||
|
CMAKE -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=True
|
||||||
|
NMAKE
|
||||||
|
IF NOT DEFINED FULLBUILD pause
|
||||||
|
|
||||||
|
cd %WORK%
|
||||||
|
rmdir /s /q %ZLIB%
|
||||||
|
7z.exe x %ZLIB%.zip
|
||||||
|
cd %ZLIB%
|
||||||
|
nmake -f win32\Makefile.msc
|
||||||
|
SET INCLUDE=%INCLUDE%;%WORK%\%ZLIB%
|
||||||
|
SET LIB=%LIB%;%WORK%\%ZLIB%
|
||||||
|
IF NOT DEFINED FULLBUILD pause
|
||||||
|
|
||||||
|
cd %WORK%
|
||||||
|
rmdir /s /q %LIBXML2%
|
||||||
|
7z.exe x %LIBXML2%.zip
|
||||||
|
fart.exe -r -i -C %WORK%\%LIBXML2%\win32\*.* \x2Fopt:nowin98 " "
|
||||||
|
cd %LIBXML2%\win32
|
||||||
|
CSCRIPT configure.js iconv=no vcmanifest=yes zlib=yes
|
||||||
|
NMAKE -f Makefile.msvc
|
||||||
|
IF NOT DEFINED FULLBUILD pause
|
||||||
|
|
||||||
|
cd %WORK%
|
||||||
|
rmdir /s /q %LUA%
|
||||||
|
7z.exe x %LUA%.zip
|
||||||
|
CD %LUA%\src
|
||||||
|
CL /Ox /arch:SSE2 /GF /GL /Gy /FD /EHsc /MD /Zi /TC /wd4005 /D "_MBCS" /D "LUA_CORE" /D "LUA_BUILD_AS_DLL" /D "_CRT_SECURE_NO_WARNINGS" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_WIN32" /D "_WINDLL" /c *.c
|
||||||
|
DEL lua.obj luac.obj
|
||||||
|
LINK /DLL /LTCG /DEBUG /OUT:lua5.1.dll *.obj
|
||||||
|
IF EXIST lua5.1.dll.manifest MT -manifest lua5.1.dll.manifest -outputresource:lua5.1.dll;2
|
||||||
|
IF NOT DEFINED FULLBUILD pause
|
||||||
|
|
||||||
|
cd %WORK%
|
||||||
|
rmdir /s /q %CURL%
|
||||||
|
7z.exe x %CURL%.zip
|
||||||
|
copy /y CMakeLists.txt %CURL%
|
||||||
|
CD %CURL%
|
||||||
|
CMAKE -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=True -DCURL_ZLIB=True
|
||||||
|
%WORK%\fart.exe -r -C %WORK%\%CURL%\include\curl\curlbuild.h LLU ULL
|
||||||
|
NMAKE
|
||||||
|
IF NOT DEFINED FULLBUILD pause
|
||||||
|
|
||||||
|
cd %WORK%
|
||||||
|
CD mod_security\apache2
|
||||||
|
del *.obj *.dll *.lib
|
||||||
|
NMAKE -f Makefile.win APACHE=C:\Apache22 PCRE=%WORK%\%PCRE% LIBXML2=%WORK%\%LIBXML2% LUA=%WORK%\%LUA%\src VERSION=VERSION_IIS
|
||||||
|
cd ..\mlogc
|
||||||
|
copy /y %WORK%\Makefile.win .
|
||||||
|
nmake -f Makefile.win clean
|
||||||
|
nmake -f Makefile.win
|
||||||
|
cd ..\iis
|
||||||
|
nmake -f Makefile.win clean
|
||||||
|
NMAKE -f Makefile.win APACHE=C:\Apache22 PCRE=%WORK%\%PCRE% LIBXML2=%WORK%\%LIBXML2% LUA=%WORK%\%LUA%\src VERSION=VERSION_IIS
|
||||||
|
|
||||||
|
cd %WORK%
|
||||||
|
|
||||||
|
copy /y %APACHE%\bin\libapr-1.dll %DROP%
|
||||||
|
copy /y %APACHE%\bin\libapr-1.pdb %DROP%
|
||||||
|
copy /y %APACHE%\lib\libapr-1.lib %DROP%
|
||||||
|
copy /y %APACHE%\bin\libapriconv-1.dll %DROP%
|
||||||
|
copy /y %APACHE%\bin\libapriconv-1.pdb %DROP%
|
||||||
|
copy /y %APACHE%\lib\libapriconv-1.lib %DROP%
|
||||||
|
copy /y %APACHE%\bin\libaprutil-1.dll %DROP%
|
||||||
|
copy /y %APACHE%\bin\libaprutil-1.pdb %DROP%
|
||||||
|
copy /y %APACHE%\lib\libaprutil-1.lib %DROP%
|
||||||
|
copy /y %WORK%\%LIBXML2%\win32\bin.msvc\libxml2.dll %DROP%
|
||||||
|
copy /y %WORK%\%LIBXML2%\win32\bin.msvc\libxml2.lib %DROP%
|
||||||
|
copy /y %WORK%\%LUA%\src\lua5.1.dll %DROP%
|
||||||
|
copy /y %WORK%\%LUA%\src\lua5.1.pdb %DROP%
|
||||||
|
copy /y %WORK%\%LUA%\src\lua5.1.lib %DROP%
|
||||||
|
copy /y %WORK%\%PCRE%\pcre.dll %DROP%
|
||||||
|
copy /y %WORK%\%PCRE%\pcre.pdb %DROP%
|
||||||
|
copy /y %WORK%\%PCRE%\pcre.lib %DROP%
|
||||||
|
copy /y %WORK%\%ZLIB%\zlib1.dll %DROP%
|
||||||
|
copy /y %WORK%\%ZLIB%\zlib1.pdb %DROP%
|
||||||
|
copy /y %WORK%\%ZLIB%\zdll.lib %DROP%
|
||||||
|
copy /y %WORK%\%CURL%\libcurl.dll %DROP%
|
||||||
|
copy /y %WORK%\%CURL%\libcurl.pdb %DROP%
|
||||||
|
copy /y %WORK%\%CURL%\libcurl_imp.lib %DROP%
|
||||||
|
copy /y %WORK%\mod_security\mlogc\mlogc.exe %DROP%
|
||||||
|
copy /y %WORK%\mod_security\iis\modsecurityiis.dll %DROP%
|
||||||
|
copy /y %WORK%\mod_security\iis\modsecurityiis.pdb %DROP%
|
4
iis/winbuild/build32.bat
Normal file
4
iis/winbuild/build32.bat
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
mkdir %DROP%
|
||||||
|
call vsvars32.bat
|
||||||
|
call init.bat
|
||||||
|
call build.bat
|
5
iis/winbuild/build64.bat
Normal file
5
iis/winbuild/build64.bat
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
mkdir %DROP%
|
||||||
|
call vcvars64.bat
|
||||||
|
call init.bat
|
||||||
|
SET CL=/D "WIN64" /D "_WIN64"
|
||||||
|
call build.bat
|
5
iis/winbuild/buildall.bat
Normal file
5
iis/winbuild/buildall.bat
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
set FULLBUILD=1
|
||||||
|
set DROP=c:\drop\amd64
|
||||||
|
cmd.exe /c build64.bat
|
||||||
|
set DROP=c:\drop\x86
|
||||||
|
cmd.exe /c build32.bat
|
238
iis/winbuild/dftables.mak
Normal file
238
iis/winbuild/dftables.mak
Normal file
@@ -0,0 +1,238 @@
|
|||||||
|
# Microsoft Developer Studio Generated NMAKE File, Based on dftables.dsp
|
||||||
|
!IF "$(CFG)" == ""
|
||||||
|
CFG=dftables - Win32 Debug
|
||||||
|
!MESSAGE No configuration specified. Defaulting to dftables - Win32 Debug.
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(CFG)" != "dftables - Win32 Release" && "$(CFG)" != "dftables - Win32 Debug"
|
||||||
|
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||||
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "dftables.mak" CFG="dftables - Win32 Debug"
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Possible choices for configuration are:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE "dftables - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE "dftables - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE
|
||||||
|
!ERROR An invalid configuration is specified.
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(OS)" == "Windows_NT"
|
||||||
|
NULL=
|
||||||
|
!ELSE
|
||||||
|
NULL=nul
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "dftables - Win32 Release"
|
||||||
|
|
||||||
|
OUTDIR=.
|
||||||
|
INTDIR=.\Release
|
||||||
|
# Begin Custom Macros
|
||||||
|
OutDir=.
|
||||||
|
# End Custom Macros
|
||||||
|
|
||||||
|
ALL : "$(OUTDIR)\dftables.exe"
|
||||||
|
|
||||||
|
|
||||||
|
CLEAN :
|
||||||
|
-@erase "$(INTDIR)\dftables.idb"
|
||||||
|
-@erase "$(INTDIR)\dftables.obj"
|
||||||
|
-@erase "$(OUTDIR)\dftables.exe"
|
||||||
|
|
||||||
|
"$(INTDIR)" :
|
||||||
|
if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
|
||||||
|
|
||||||
|
CPP=cl.exe
|
||||||
|
CPP_PROJ=/nologo /MD /W3 /O2 /D "_WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\dftables" /FD /c
|
||||||
|
|
||||||
|
.c{$(INTDIR)}.obj::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cpp{$(INTDIR)}.obj::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cxx{$(INTDIR)}.obj::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.c{$(INTDIR)}.sbr::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cpp{$(INTDIR)}.sbr::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cxx{$(INTDIR)}.sbr::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
RSC=rc.exe
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
BSC32_FLAGS=/nologo /o"$(OUTDIR)\dftables.bsc"
|
||||||
|
BSC32_SBRS= \
|
||||||
|
|
||||||
|
LINK32=link.exe
|
||||||
|
LINK32_FLAGS=kernel32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\Release\dftables.pdb" /out:"$(OUTDIR)\dftables.exe" /opt:ref
|
||||||
|
LINK32_OBJS= \
|
||||||
|
"$(INTDIR)\dftables.obj"
|
||||||
|
|
||||||
|
"$(OUTDIR)\dftables.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||||
|
$(LINK32) @<<
|
||||||
|
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||||
|
<<
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "dftables - Win32 Debug"
|
||||||
|
|
||||||
|
OUTDIR=.
|
||||||
|
INTDIR=.\Debug
|
||||||
|
# Begin Custom Macros
|
||||||
|
OutDir=.
|
||||||
|
# End Custom Macros
|
||||||
|
|
||||||
|
ALL : ".\pcre.h" ".\config.h" "$(OUTDIR)\dftables.exe"
|
||||||
|
|
||||||
|
|
||||||
|
CLEAN :
|
||||||
|
-@erase "$(INTDIR)\dftables.idb"
|
||||||
|
-@erase "$(INTDIR)\dftables.obj"
|
||||||
|
-@erase "$(OUTDIR)\Debug\dftables.pdb"
|
||||||
|
-@erase "$(OUTDIR)\dftables.exe"
|
||||||
|
-@erase ".\config.h"
|
||||||
|
-@erase ".\pcre.h"
|
||||||
|
|
||||||
|
"$(INTDIR)" :
|
||||||
|
if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
|
||||||
|
|
||||||
|
CPP=cl.exe
|
||||||
|
CPP_PROJ=/nologo /MDd /W3 /Zi /Od /D "_WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\dftables" /FD /EHsc /c
|
||||||
|
|
||||||
|
.c{$(INTDIR)}.obj::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cpp{$(INTDIR)}.obj::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cxx{$(INTDIR)}.obj::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.c{$(INTDIR)}.sbr::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cpp{$(INTDIR)}.sbr::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cxx{$(INTDIR)}.sbr::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
RSC=rc.exe
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
BSC32_FLAGS=/nologo /o"$(OUTDIR)\dftables.bsc"
|
||||||
|
BSC32_SBRS= \
|
||||||
|
|
||||||
|
LINK32=link.exe
|
||||||
|
LINK32_FLAGS=kernel32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\Debug\dftables.pdb" /debug /out:"$(OUTDIR)\dftables.exe"
|
||||||
|
LINK32_OBJS= \
|
||||||
|
"$(INTDIR)\dftables.obj"
|
||||||
|
|
||||||
|
"$(OUTDIR)\dftables.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||||
|
$(LINK32) @<<
|
||||||
|
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||||
|
<<
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||||
|
!IF EXISTS("dftables.dep")
|
||||||
|
!INCLUDE "dftables.dep"
|
||||||
|
!ELSE
|
||||||
|
!MESSAGE Warning: cannot find "dftables.dep"
|
||||||
|
!ENDIF
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "dftables - Win32 Release" || "$(CFG)" == "dftables - Win32 Debug"
|
||||||
|
SOURCE=.\dftables.c
|
||||||
|
|
||||||
|
"$(INTDIR)\dftables.obj" : $(SOURCE) "$(INTDIR)" ".\config.h" ".\pcre.h"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\config.hw
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "dftables - Win32 Release"
|
||||||
|
|
||||||
|
InputPath=.\config.hw
|
||||||
|
|
||||||
|
".\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
<<tempfile27.bat
|
||||||
|
@echo off
|
||||||
|
type .\config.hw > .\config.h
|
||||||
|
<<
|
||||||
|
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "dftables - Win32 Debug"
|
||||||
|
|
||||||
|
InputPath=.\config.hw
|
||||||
|
|
||||||
|
".\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
<<tempfile28.bat
|
||||||
|
@echo off
|
||||||
|
type .\config.hw > .\config.h
|
||||||
|
<<
|
||||||
|
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
SOURCE=.\maketables.c
|
||||||
|
SOURCE=.\pcre.hw
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "dftables - Win32 Release"
|
||||||
|
|
||||||
|
InputPath=.\pcre.hw
|
||||||
|
|
||||||
|
".\pcre.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
<<tempfile29.bat
|
||||||
|
@echo off
|
||||||
|
type .\pcre.hw > .\pcre.h
|
||||||
|
<<
|
||||||
|
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "dftables - Win32 Debug"
|
||||||
|
|
||||||
|
InputPath=.\pcre.hw
|
||||||
|
|
||||||
|
".\pcre.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
<<tempfile30.bat
|
||||||
|
@echo off
|
||||||
|
type .\pcre.hw > .\pcre.h
|
||||||
|
<<
|
||||||
|
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
BIN
iis/winbuild/fart.exe
Normal file
BIN
iis/winbuild/fart.exe
Normal file
Binary file not shown.
44
iis/winbuild/howto.txt
Normal file
44
iis/winbuild/howto.txt
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
WARNING!
|
||||||
|
|
||||||
|
Building ModSecurityIIS on Windows is a relatively complicated process. Understanding it requires advanced knowledge of Windows and Unix environments.
|
||||||
|
Using the same versions of libraries as listed below is strongly recommended.
|
||||||
|
|
||||||
|
--------------------------------------
|
||||||
|
Tested on:
|
||||||
|
|
||||||
|
Windows 7 x64
|
||||||
|
Vistual Studio 2010 Ultimate SP1
|
||||||
|
IIS enabled/installed
|
||||||
|
|
||||||
|
cmake 2.8.7
|
||||||
|
curl 7.24.0
|
||||||
|
apache 2.2.22
|
||||||
|
libxml2 2.7.7
|
||||||
|
lua 5.1.5
|
||||||
|
pcre 8.30
|
||||||
|
zlib 1.2.7
|
||||||
|
7-Zip
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
|
1. Create working directory c:\work and drop directory c:\drop
|
||||||
|
2. Sync SVN ModSecurity branch to c:\work\mod_security
|
||||||
|
3. Copy files from c:\work\mod_security\iis\winbuild to c:\work
|
||||||
|
4. Download and install cmake (unpack to c:\work\cmake-2.8.7-win32-x86)
|
||||||
|
5. Download and install 7-Zip
|
||||||
|
6. Adjust paths in c:\work\init.bat accordingly if needed
|
||||||
|
7. Download curl, apache, libxml2, lua, pcre and zlib, place them in zip files in c:\work
|
||||||
|
|
||||||
|
curl-7.24.0.zip
|
||||||
|
httpd-2.2.22-win32-src.zip
|
||||||
|
libxml2-2.7.7.zip
|
||||||
|
lua-5.1.5.zip
|
||||||
|
pcre-8.30.zip
|
||||||
|
zlib-1.2.7.zip
|
||||||
|
|
||||||
|
Modify c:\work\build.bat accordingly (if other versions were used)
|
||||||
|
|
||||||
|
8. Open cmd.exe window, go to c:\work and run buildall.bat
|
||||||
|
9. When done, the binaries should appear under c:\drop\x86 (32-bit) and c:\drop\amd64 (64-bit)
|
||||||
|
10. Open the VS ModSecurity IIS installer project
|
||||||
|
11. Copy new binaries to the installer's x86 and amd64 directories
|
||||||
|
12. Build installer from within VS
|
1
iis/winbuild/init.bat
Normal file
1
iis/winbuild/init.bat
Normal file
@@ -0,0 +1 @@
|
|||||||
|
set PATH=%PATH%;c:\work\cmake-2.8.7-win32-x86\bin;"c:\program files\7-zip"
|
1917
iis/winbuild/libapr.mak
Normal file
1917
iis/winbuild/libapr.mak
Normal file
File diff suppressed because it is too large
Load Diff
1465
iis/winbuild/libaprutil.mak
Normal file
1465
iis/winbuild/libaprutil.mak
Normal file
File diff suppressed because it is too large
Load Diff
1052
iis/winbuild/libhttpd.mak
Normal file
1052
iis/winbuild/libhttpd.mak
Normal file
File diff suppressed because it is too large
Load Diff
733
iis/winbuild/mod_ssl.mak
Normal file
733
iis/winbuild/mod_ssl.mak
Normal file
@@ -0,0 +1,733 @@
|
|||||||
|
# Microsoft Developer Studio Generated NMAKE File, Based on mod_ssl.dsp
|
||||||
|
!IF "$(CFG)" == ""
|
||||||
|
CFG=mod_ssl - Win32 Release
|
||||||
|
!MESSAGE No configuration specified. Defaulting to mod_ssl - Win32 Release.
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(CFG)" != "mod_ssl - Win32 Release" && "$(CFG)" != "mod_ssl - Win32 Debug" && "$(CFG)" != "mod_ssl - Win32 Lexical"
|
||||||
|
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||||
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "mod_ssl.mak" CFG="mod_ssl - Win32 Release"
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Possible choices for configuration are:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE "mod_ssl - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||||
|
!MESSAGE "mod_ssl - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||||
|
!MESSAGE "mod_ssl - Win32 Lexical" (based on "Win32 (x86) Dynamic-Link Library")
|
||||||
|
!MESSAGE
|
||||||
|
!ERROR An invalid configuration is specified.
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(OS)" == "Windows_NT"
|
||||||
|
NULL=
|
||||||
|
!ELSE
|
||||||
|
NULL=nul
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "mod_ssl - Win32 Release"
|
||||||
|
|
||||||
|
OUTDIR=.\Release
|
||||||
|
INTDIR=.\Release
|
||||||
|
DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
|
||||||
|
# Begin Custom Macros
|
||||||
|
OutDir=.\Release
|
||||||
|
# End Custom Macros
|
||||||
|
|
||||||
|
!IF "$(RECURSE)" == "0"
|
||||||
|
|
||||||
|
ALL : "$(OUTDIR)\mod_ssl.so" "$(DS_POSTBUILD_DEP)"
|
||||||
|
|
||||||
|
!ELSE
|
||||||
|
|
||||||
|
ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_ssl.so" "$(DS_POSTBUILD_DEP)"
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(RECURSE)" == "1"
|
||||||
|
CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN"
|
||||||
|
!ELSE
|
||||||
|
CLEAN :
|
||||||
|
!ENDIF
|
||||||
|
-@erase "$(INTDIR)\mod_ssl.obj"
|
||||||
|
-@erase "$(INTDIR)\mod_ssl.res"
|
||||||
|
-@erase "$(INTDIR)\mod_ssl_src.idb"
|
||||||
|
-@erase "$(INTDIR)\mod_ssl_src.pdb"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_config.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_dh.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_init.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_io.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_kernel.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_log.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_mutex.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_pphrase.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_rand.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_vars.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_expr.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_expr_eval.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_expr_parse.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_expr_scan.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_scache.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_scache_dbm.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_scache_dc.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_scache_shmcb.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_util.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_util_ssl.obj"
|
||||||
|
-@erase "$(OUTDIR)\mod_ssl.exp"
|
||||||
|
-@erase "$(OUTDIR)\mod_ssl.lib"
|
||||||
|
-@erase "$(OUTDIR)\mod_ssl.pdb"
|
||||||
|
-@erase "$(OUTDIR)\mod_ssl.so"
|
||||||
|
|
||||||
|
"$(OUTDIR)" :
|
||||||
|
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||||
|
|
||||||
|
CPP=cl.exe
|
||||||
|
CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../generators" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/openssl/inc32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "NO_IDEA" /D "NO_RC5" /D "NO_MDC2" /D "OPENSSL_NO_IDEA" /D "OPENSSL_NO_RC5" /D "OPENSSL_NO_MDC2" /D "HAVE_OPENSSL" /D "HAVE_SSL_SET_STATE" /D "HAVE_OPENSSL_ENGINE_H" /D "HAVE_ENGINE_INIT" /D "HAVE_ENGINE_LOAD_BUILTIN_ENGINES" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_ssl_src" /FD /c
|
||||||
|
|
||||||
|
.c{$(INTDIR)}.obj::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cpp{$(INTDIR)}.obj::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cxx{$(INTDIR)}.obj::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.c{$(INTDIR)}.sbr::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cpp{$(INTDIR)}.sbr::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cxx{$(INTDIR)}.sbr::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
MTL=midl.exe
|
||||||
|
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
|
RSC=rc.exe
|
||||||
|
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_ssl.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_ssl.so" /d LONG_NAME="proxy_ssl_module for Apache"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_ssl.bsc"
|
||||||
|
BSC32_SBRS= \
|
||||||
|
|
||||||
|
LINK32=link.exe
|
||||||
|
LINK32_FLAGS=kernel32.lib user32.lib wsock32.lib ws2_32.lib advapi32.lib gdi32.lib libeay32.lib ssleay32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_ssl.pdb" /debug /out:"$(OUTDIR)\mod_ssl.so" /implib:"$(OUTDIR)\mod_ssl.lib" /libpath:"../../srclib/openssl/out32dll" /libpath:"../../srclib/openssl/out32" /base:@..\..\os\win32\BaseAddr.ref,mod_ssl.so /opt:ref
|
||||||
|
LINK32_OBJS= \
|
||||||
|
"$(INTDIR)\mod_ssl.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_config.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_dh.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_init.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_io.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_kernel.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_log.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_mutex.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_pphrase.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_rand.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_vars.obj" \
|
||||||
|
"$(INTDIR)\ssl_expr.obj" \
|
||||||
|
"$(INTDIR)\ssl_expr_eval.obj" \
|
||||||
|
"$(INTDIR)\ssl_expr_parse.obj" \
|
||||||
|
"$(INTDIR)\ssl_expr_scan.obj" \
|
||||||
|
"$(INTDIR)\ssl_scache.obj" \
|
||||||
|
"$(INTDIR)\ssl_scache_dbm.obj" \
|
||||||
|
"$(INTDIR)\ssl_scache_shmcb.obj" \
|
||||||
|
"$(INTDIR)\ssl_scache_dc.obj" \
|
||||||
|
"$(INTDIR)\ssl_util.obj" \
|
||||||
|
"$(INTDIR)\ssl_util_ssl.obj" \
|
||||||
|
"$(INTDIR)\mod_ssl.res" \
|
||||||
|
"..\..\srclib\apr\Release\libapr-1.lib" \
|
||||||
|
"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
|
||||||
|
"..\..\Release\libhttpd.lib"
|
||||||
|
|
||||||
|
"$(OUTDIR)\mod_ssl.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||||
|
$(LINK32) @<<
|
||||||
|
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||||
|
<<
|
||||||
|
|
||||||
|
TargetPath=.\Release\mod_ssl.so
|
||||||
|
SOURCE="$(InputPath)"
|
||||||
|
PostBuild_Desc=Embed .manifest
|
||||||
|
DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
|
||||||
|
|
||||||
|
# Begin Custom Macros
|
||||||
|
OutDir=.\Release
|
||||||
|
# End Custom Macros
|
||||||
|
|
||||||
|
"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_ssl.so"
|
||||||
|
if exist .\Release\mod_ssl.so.manifest mt.exe -manifest .\Release\mod_ssl.so.manifest -outputresource:.\Release\mod_ssl.so;2
|
||||||
|
echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Debug"
|
||||||
|
|
||||||
|
OUTDIR=.\Debug
|
||||||
|
INTDIR=.\Debug
|
||||||
|
DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
|
||||||
|
# Begin Custom Macros
|
||||||
|
OutDir=.\Debug
|
||||||
|
# End Custom Macros
|
||||||
|
|
||||||
|
!IF "$(RECURSE)" == "0"
|
||||||
|
|
||||||
|
ALL : "$(OUTDIR)\mod_ssl.so" "$(DS_POSTBUILD_DEP)"
|
||||||
|
|
||||||
|
!ELSE
|
||||||
|
|
||||||
|
ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_ssl.so" "$(DS_POSTBUILD_DEP)"
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(RECURSE)" == "1"
|
||||||
|
CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN"
|
||||||
|
!ELSE
|
||||||
|
CLEAN :
|
||||||
|
!ENDIF
|
||||||
|
-@erase "$(INTDIR)\mod_ssl.obj"
|
||||||
|
-@erase "$(INTDIR)\mod_ssl.res"
|
||||||
|
-@erase "$(INTDIR)\mod_ssl_src.idb"
|
||||||
|
-@erase "$(INTDIR)\mod_ssl_src.pdb"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_config.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_dh.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_init.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_io.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_kernel.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_log.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_mutex.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_pphrase.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_rand.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_vars.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_expr.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_expr_eval.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_expr_parse.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_expr_scan.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_scache.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_scache_dbm.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_scache_dc.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_scache_shmcb.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_util.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_util_ssl.obj"
|
||||||
|
-@erase "$(OUTDIR)\mod_ssl.exp"
|
||||||
|
-@erase "$(OUTDIR)\mod_ssl.lib"
|
||||||
|
-@erase "$(OUTDIR)\mod_ssl.pdb"
|
||||||
|
-@erase "$(OUTDIR)\mod_ssl.so"
|
||||||
|
|
||||||
|
"$(OUTDIR)" :
|
||||||
|
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||||
|
|
||||||
|
CPP=cl.exe
|
||||||
|
CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../generators" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/openssl/inc32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "NO_IDEA" /D "NO_RC5" /D "NO_MDC2" /D "OPENSSL_NO_IDEA" /D "OPENSSL_NO_RC5" /D "OPENSSL_NO_MDC2" /D "HAVE_OPENSSL" /D "HAVE_SSL_SET_STATE" /D "HAVE_OPENSSL_ENGINE_H" /D "HAVE_ENGINE_INIT" /D "HAVE_ENGINE_LOAD_BUILTIN_ENGINES" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_ssl_src" /FD /EHsc /c
|
||||||
|
|
||||||
|
.c{$(INTDIR)}.obj::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cpp{$(INTDIR)}.obj::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cxx{$(INTDIR)}.obj::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.c{$(INTDIR)}.sbr::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cpp{$(INTDIR)}.sbr::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cxx{$(INTDIR)}.sbr::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
MTL=midl.exe
|
||||||
|
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
|
RSC=rc.exe
|
||||||
|
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_ssl.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_ssl.so" /d LONG_NAME="proxy_ssl_module for Apache"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_ssl.bsc"
|
||||||
|
BSC32_SBRS= \
|
||||||
|
|
||||||
|
LINK32=link.exe
|
||||||
|
LINK32_FLAGS=kernel32.lib user32.lib wsock32.lib ws2_32.lib advapi32.lib gdi32.lib libeay32.lib ssleay32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_ssl.pdb" /debug /out:"$(OUTDIR)\mod_ssl.so" /implib:"$(OUTDIR)\mod_ssl.lib" /libpath:"../../srclib/openssl/out32dll.dbg" /libpath:"../../srclib/openssl/out32.dbg" /libpath:"../../srclib/openssl/out32dll" /libpath:"../../srclib/openssl/out32" /base:@..\..\os\win32\BaseAddr.ref,mod_ssl.so
|
||||||
|
LINK32_OBJS= \
|
||||||
|
"$(INTDIR)\mod_ssl.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_config.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_dh.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_init.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_io.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_kernel.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_log.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_mutex.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_pphrase.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_rand.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_vars.obj" \
|
||||||
|
"$(INTDIR)\ssl_expr.obj" \
|
||||||
|
"$(INTDIR)\ssl_expr_eval.obj" \
|
||||||
|
"$(INTDIR)\ssl_expr_parse.obj" \
|
||||||
|
"$(INTDIR)\ssl_expr_scan.obj" \
|
||||||
|
"$(INTDIR)\ssl_scache.obj" \
|
||||||
|
"$(INTDIR)\ssl_scache_dbm.obj" \
|
||||||
|
"$(INTDIR)\ssl_scache_shmcb.obj" \
|
||||||
|
"$(INTDIR)\ssl_scache_dc.obj" \
|
||||||
|
"$(INTDIR)\ssl_util.obj" \
|
||||||
|
"$(INTDIR)\ssl_util_ssl.obj" \
|
||||||
|
"$(INTDIR)\mod_ssl.res" \
|
||||||
|
"..\..\srclib\apr\Debug\libapr-1.lib" \
|
||||||
|
"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
|
||||||
|
"..\..\Debug\libhttpd.lib"
|
||||||
|
|
||||||
|
"$(OUTDIR)\mod_ssl.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||||
|
$(LINK32) @<<
|
||||||
|
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||||
|
<<
|
||||||
|
|
||||||
|
TargetPath=.\Debug\mod_ssl.so
|
||||||
|
SOURCE="$(InputPath)"
|
||||||
|
PostBuild_Desc=Embed .manifest
|
||||||
|
DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
|
||||||
|
|
||||||
|
# Begin Custom Macros
|
||||||
|
OutDir=.\Debug
|
||||||
|
# End Custom Macros
|
||||||
|
|
||||||
|
"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_ssl.so"
|
||||||
|
if exist .\Debug\mod_ssl.so.manifest mt.exe -manifest .\Debug\mod_ssl.so.manifest -outputresource:.\Debug\mod_ssl.so;2
|
||||||
|
echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Lexical"
|
||||||
|
|
||||||
|
OUTDIR=.\Release
|
||||||
|
INTDIR=.\Release
|
||||||
|
DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
|
||||||
|
# Begin Custom Macros
|
||||||
|
OutDir=.\Release
|
||||||
|
# End Custom Macros
|
||||||
|
|
||||||
|
!IF "$(RECURSE)" == "0"
|
||||||
|
|
||||||
|
ALL : ".\ssl_expr_parse.h" ".\ssl_expr_parse.c" "$(OUTDIR)\mod_ssl.so" "$(DS_POSTBUILD_DEP)"
|
||||||
|
|
||||||
|
!ELSE
|
||||||
|
|
||||||
|
ALL : ".\ssl_expr_parse.h" ".\ssl_expr_parse.c" "$(OUTDIR)\mod_ssl.so" "$(DS_POSTBUILD_DEP)"
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(RECURSE)" == "1"
|
||||||
|
CLEAN :
|
||||||
|
!ELSE
|
||||||
|
CLEAN :
|
||||||
|
!ENDIF
|
||||||
|
-@erase "$(INTDIR)\mod_ssl.obj"
|
||||||
|
-@erase "$(INTDIR)\mod_ssl.res"
|
||||||
|
-@erase "$(INTDIR)\mod_ssl_src.idb"
|
||||||
|
-@erase "$(INTDIR)\mod_ssl_src.pdb"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_config.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_dh.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_init.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_io.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_kernel.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_log.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_mutex.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_pphrase.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_rand.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_engine_vars.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_expr.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_expr_eval.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_expr_parse.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_expr_scan.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_scache.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_scache_dbm.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_scache_dc.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_scache_shmcb.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_util.obj"
|
||||||
|
-@erase "$(INTDIR)\ssl_util_ssl.obj"
|
||||||
|
-@erase "$(OUTDIR)\mod_ssl.exp"
|
||||||
|
-@erase "$(OUTDIR)\mod_ssl.lib"
|
||||||
|
-@erase "$(OUTDIR)\mod_ssl.pdb"
|
||||||
|
-@erase "$(OUTDIR)\mod_ssl.so"
|
||||||
|
-@erase "ssl_expr_parse.c"
|
||||||
|
-@erase "ssl_expr_parse.h"
|
||||||
|
|
||||||
|
"$(OUTDIR)" :
|
||||||
|
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||||
|
|
||||||
|
CPP=cl.exe
|
||||||
|
CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../generators" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/openssl/inc32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "NO_IDEA" /D "NO_RC5" /D "NO_MDC2" /D "OPENSSL_NO_IDEA" /D "OPENSSL_NO_RC5" /D "OPENSSL_NO_MDC2" /D "HAVE_OPENSSL" /D "HAVE_SSL_SET_STATE" /D "HAVE_OPENSSL_ENGINE_H" /D "HAVE_ENGINE_INIT" /D "HAVE_ENGINE_LOAD_BUILTIN_ENGINES" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_ssl_src" /FD /c
|
||||||
|
|
||||||
|
.c{$(INTDIR)}.obj::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cpp{$(INTDIR)}.obj::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cxx{$(INTDIR)}.obj::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.c{$(INTDIR)}.sbr::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cpp{$(INTDIR)}.sbr::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cxx{$(INTDIR)}.sbr::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
MTL=midl.exe
|
||||||
|
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
|
RSC=rc.exe
|
||||||
|
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_ssl.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_ssl.so" /d LONG_NAME="proxy_ssl_module for Apache"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_ssl.bsc"
|
||||||
|
BSC32_SBRS= \
|
||||||
|
|
||||||
|
LINK32=link.exe
|
||||||
|
LINK32_FLAGS=kernel32.lib user32.lib wsock32.lib ws2_32.lib advapi32.lib gdi32.lib libeay32.lib ssleay32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_ssl.pdb" /debug /out:"$(OUTDIR)\mod_ssl.so" /implib:"$(OUTDIR)\mod_ssl.lib" /libpath:"../../srclib/openssl/out32dll" /libpath:"../../srclib/openssl/out32" /base:@..\..\os\win32\BaseAddr.ref,mod_ssl.so /opt:ref
|
||||||
|
LINK32_OBJS= \
|
||||||
|
"$(INTDIR)\mod_ssl.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_config.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_dh.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_init.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_io.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_kernel.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_log.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_mutex.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_pphrase.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_rand.obj" \
|
||||||
|
"$(INTDIR)\ssl_engine_vars.obj" \
|
||||||
|
"$(INTDIR)\ssl_expr.obj" \
|
||||||
|
"$(INTDIR)\ssl_expr_eval.obj" \
|
||||||
|
"$(INTDIR)\ssl_expr_parse.obj" \
|
||||||
|
"$(INTDIR)\ssl_expr_scan.obj" \
|
||||||
|
"$(INTDIR)\ssl_scache.obj" \
|
||||||
|
"$(INTDIR)\ssl_scache_dbm.obj" \
|
||||||
|
"$(INTDIR)\ssl_scache_shmcb.obj" \
|
||||||
|
"$(INTDIR)\ssl_scache_dc.obj" \
|
||||||
|
"$(INTDIR)\ssl_util.obj" \
|
||||||
|
"$(INTDIR)\ssl_util_ssl.obj" \
|
||||||
|
"$(INTDIR)\mod_ssl.res"
|
||||||
|
|
||||||
|
"$(OUTDIR)\mod_ssl.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||||
|
$(LINK32) @<<
|
||||||
|
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||||
|
<<
|
||||||
|
|
||||||
|
TargetPath=.\Release\mod_ssl.so
|
||||||
|
SOURCE="$(InputPath)"
|
||||||
|
PostBuild_Desc=Embed .manifest
|
||||||
|
DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
|
||||||
|
|
||||||
|
# Begin Custom Macros
|
||||||
|
OutDir=.\Release
|
||||||
|
# End Custom Macros
|
||||||
|
|
||||||
|
"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_ssl.so"
|
||||||
|
if exist .\Release\mod_ssl.so.manifest mt.exe -manifest .\Release\mod_ssl.so.manifest -outputresource:.\Release\mod_ssl.so;2
|
||||||
|
echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||||
|
!IF EXISTS("mod_ssl.dep")
|
||||||
|
!INCLUDE "mod_ssl.dep"
|
||||||
|
!ELSE
|
||||||
|
!MESSAGE Warning: cannot find "mod_ssl.dep"
|
||||||
|
!ENDIF
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "mod_ssl - Win32 Release" || "$(CFG)" == "mod_ssl - Win32 Debug" || "$(CFG)" == "mod_ssl - Win32 Lexical"
|
||||||
|
SOURCE=.\mod_ssl.c
|
||||||
|
|
||||||
|
"$(INTDIR)\mod_ssl.obj" : $(SOURCE) "$(INTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\ssl_engine_config.c
|
||||||
|
|
||||||
|
"$(INTDIR)\ssl_engine_config.obj" : $(SOURCE) "$(INTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\ssl_engine_dh.c
|
||||||
|
|
||||||
|
"$(INTDIR)\ssl_engine_dh.obj" : $(SOURCE) "$(INTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\ssl_engine_init.c
|
||||||
|
|
||||||
|
"$(INTDIR)\ssl_engine_init.obj" : $(SOURCE) "$(INTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\ssl_engine_io.c
|
||||||
|
|
||||||
|
"$(INTDIR)\ssl_engine_io.obj" : $(SOURCE) "$(INTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\ssl_engine_kernel.c
|
||||||
|
|
||||||
|
"$(INTDIR)\ssl_engine_kernel.obj" : $(SOURCE) "$(INTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\ssl_engine_log.c
|
||||||
|
|
||||||
|
"$(INTDIR)\ssl_engine_log.obj" : $(SOURCE) "$(INTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\ssl_engine_mutex.c
|
||||||
|
|
||||||
|
"$(INTDIR)\ssl_engine_mutex.obj" : $(SOURCE) "$(INTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\ssl_engine_pphrase.c
|
||||||
|
|
||||||
|
"$(INTDIR)\ssl_engine_pphrase.obj" : $(SOURCE) "$(INTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\ssl_engine_rand.c
|
||||||
|
|
||||||
|
"$(INTDIR)\ssl_engine_rand.obj" : $(SOURCE) "$(INTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\ssl_engine_vars.c
|
||||||
|
|
||||||
|
"$(INTDIR)\ssl_engine_vars.obj" : $(SOURCE) "$(INTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\ssl_expr.c
|
||||||
|
|
||||||
|
"$(INTDIR)\ssl_expr.obj" : $(SOURCE) "$(INTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\ssl_expr_eval.c
|
||||||
|
|
||||||
|
"$(INTDIR)\ssl_expr_eval.obj" : $(SOURCE) "$(INTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\ssl_expr_parse.c
|
||||||
|
|
||||||
|
"$(INTDIR)\ssl_expr_parse.obj" : $(SOURCE) "$(INTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\ssl_expr_scan.c
|
||||||
|
|
||||||
|
"$(INTDIR)\ssl_expr_scan.obj" : $(SOURCE) "$(INTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\ssl_scache.c
|
||||||
|
|
||||||
|
"$(INTDIR)\ssl_scache.obj" : $(SOURCE) "$(INTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\ssl_scache_dbm.c
|
||||||
|
|
||||||
|
"$(INTDIR)\ssl_scache_dbm.obj" : $(SOURCE) "$(INTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\ssl_scache_dc.c
|
||||||
|
|
||||||
|
"$(INTDIR)\ssl_scache_dc.obj" : $(SOURCE) "$(INTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\ssl_scache_shmcb.c
|
||||||
|
|
||||||
|
"$(INTDIR)\ssl_scache_shmcb.obj" : $(SOURCE) "$(INTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\ssl_util.c
|
||||||
|
|
||||||
|
"$(INTDIR)\ssl_util.obj" : $(SOURCE) "$(INTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\ssl_util_ssl.c
|
||||||
|
|
||||||
|
"$(INTDIR)\ssl_util_ssl.obj" : $(SOURCE) "$(INTDIR)"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\ssl_expr_parse.y
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "mod_ssl - Win32 Release"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Debug"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Lexical"
|
||||||
|
|
||||||
|
InputPath=.\ssl_expr_parse.y
|
||||||
|
|
||||||
|
".\ssl_expr_parse.c" ".\ssl_expr_parse.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
<<tempfile77.bat
|
||||||
|
@echo off
|
||||||
|
bison -y -d ssl_expr_parse.y
|
||||||
|
sed -e "s;yy;ssl_expr_yy;g" -e "/#if defined(c_plusplus) || defined(__cplusplus)/,/#endif/d" <y.tab.c >ssl_expr_parse.c
|
||||||
|
del y.tab.c
|
||||||
|
sed -e "s;yy;ssl_expr_yy;g" <y.tab.h >ssl_expr_parse.h
|
||||||
|
del y.tab.h
|
||||||
|
<<
|
||||||
|
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
SOURCE=.\ssl_expr_scan.l
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "mod_ssl - Win32 Release"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Debug"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Lexical"
|
||||||
|
|
||||||
|
InputPath=.\ssl_expr_scan.l
|
||||||
|
|
||||||
|
".\ssl_expr_scan.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
<<tempfile78.bat
|
||||||
|
@echo off
|
||||||
|
flex -Pssl_expr_yy -s -B ssl_expr_scan.l
|
||||||
|
sed -e "/$$Header:/d" <lex.ssl_expr_yy.c >ssl_expr_scan.c
|
||||||
|
del lex.ssl_expr_yy.c
|
||||||
|
<<
|
||||||
|
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "mod_ssl - Win32 Release"
|
||||||
|
|
||||||
|
"libapr - Win32 Release" :
|
||||||
|
cd ".\..\..\srclib\apr"
|
||||||
|
$(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release"
|
||||||
|
cd "..\..\modules\ssl"
|
||||||
|
|
||||||
|
"libapr - Win32 ReleaseCLEAN" :
|
||||||
|
cd ".\..\..\srclib\apr"
|
||||||
|
$(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN
|
||||||
|
cd "..\..\modules\ssl"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Debug"
|
||||||
|
|
||||||
|
"libapr - Win32 Debug" :
|
||||||
|
cd ".\..\..\srclib\apr"
|
||||||
|
$(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug"
|
||||||
|
cd "..\..\modules\ssl"
|
||||||
|
|
||||||
|
"libapr - Win32 DebugCLEAN" :
|
||||||
|
cd ".\..\..\srclib\apr"
|
||||||
|
$(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN
|
||||||
|
cd "..\..\modules\ssl"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Lexical"
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "mod_ssl - Win32 Release"
|
||||||
|
|
||||||
|
"libaprutil - Win32 Release" :
|
||||||
|
cd ".\..\..\srclib\apr-util"
|
||||||
|
$(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release"
|
||||||
|
cd "..\..\modules\ssl"
|
||||||
|
|
||||||
|
"libaprutil - Win32 ReleaseCLEAN" :
|
||||||
|
cd ".\..\..\srclib\apr-util"
|
||||||
|
$(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN
|
||||||
|
cd "..\..\modules\ssl"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Debug"
|
||||||
|
|
||||||
|
"libaprutil - Win32 Debug" :
|
||||||
|
cd ".\..\..\srclib\apr-util"
|
||||||
|
$(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug"
|
||||||
|
cd "..\..\modules\ssl"
|
||||||
|
|
||||||
|
"libaprutil - Win32 DebugCLEAN" :
|
||||||
|
cd ".\..\..\srclib\apr-util"
|
||||||
|
$(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN
|
||||||
|
cd "..\..\modules\ssl"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Lexical"
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "mod_ssl - Win32 Release"
|
||||||
|
|
||||||
|
"libhttpd - Win32 Release" :
|
||||||
|
cd ".\..\.."
|
||||||
|
$(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release"
|
||||||
|
cd ".\modules\ssl"
|
||||||
|
|
||||||
|
"libhttpd - Win32 ReleaseCLEAN" :
|
||||||
|
cd ".\..\.."
|
||||||
|
$(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN
|
||||||
|
cd ".\modules\ssl"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Debug"
|
||||||
|
|
||||||
|
"libhttpd - Win32 Debug" :
|
||||||
|
cd ".\..\.."
|
||||||
|
$(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug"
|
||||||
|
cd ".\modules\ssl"
|
||||||
|
|
||||||
|
"libhttpd - Win32 DebugCLEAN" :
|
||||||
|
cd ".\..\.."
|
||||||
|
$(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN
|
||||||
|
cd ".\modules\ssl"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Lexical"
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
SOURCE=..\..\build\win32\httpd.rc
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "mod_ssl - Win32 Release"
|
||||||
|
|
||||||
|
|
||||||
|
"$(INTDIR)\mod_ssl.res" : $(SOURCE) "$(INTDIR)"
|
||||||
|
$(RSC) /l 0x409 /fo"$(INTDIR)\mod_ssl.res" /i "../../include" /i "../../srclib/apr/include" /i ".\..\..\build\win32" /d "NDEBUG" /d BIN_NAME="mod_ssl.so" /d LONG_NAME="proxy_ssl_module for Apache" $(SOURCE)
|
||||||
|
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Debug"
|
||||||
|
|
||||||
|
|
||||||
|
"$(INTDIR)\mod_ssl.res" : $(SOURCE) "$(INTDIR)"
|
||||||
|
$(RSC) /l 0x409 /fo"$(INTDIR)\mod_ssl.res" /i "../../include" /i "../../srclib/apr/include" /i ".\..\..\build\win32" /d "_DEBUG" /d BIN_NAME="mod_ssl.so" /d LONG_NAME="proxy_ssl_module for Apache" $(SOURCE)
|
||||||
|
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "mod_ssl - Win32 Lexical"
|
||||||
|
|
||||||
|
|
||||||
|
"$(INTDIR)\mod_ssl.res" : $(SOURCE) "$(INTDIR)"
|
||||||
|
$(RSC) /l 0x409 /fo"$(INTDIR)\mod_ssl.res" /i "../../include" /i "../../srclib/apr/include" /i ".\..\..\build\win32" /d "NDEBUG" /d BIN_NAME="mod_ssl.so" /d LONG_NAME="proxy_ssl_module for Apache" $(SOURCE)
|
||||||
|
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
340
iis/winbuild/pcre.mak
Normal file
340
iis/winbuild/pcre.mak
Normal file
@@ -0,0 +1,340 @@
|
|||||||
|
# Microsoft Developer Studio Generated NMAKE File, Based on pcre.dsp
|
||||||
|
!IF "$(CFG)" == ""
|
||||||
|
CFG=pcre - Win32 Debug
|
||||||
|
!MESSAGE No configuration specified. Defaulting to pcre - Win32 Debug.
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(CFG)" != "pcre - Win32 Release" && "$(CFG)" != "pcre - Win32 Debug"
|
||||||
|
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||||
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "pcre.mak" CFG="pcre - Win32 Debug"
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Possible choices for configuration are:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE "pcre - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||||
|
!MESSAGE "pcre - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||||
|
!MESSAGE
|
||||||
|
!ERROR An invalid configuration is specified.
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(OS)" == "Windows_NT"
|
||||||
|
NULL=
|
||||||
|
!ELSE
|
||||||
|
NULL=nul
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "pcre - Win32 Release"
|
||||||
|
|
||||||
|
OUTDIR=.\LibR
|
||||||
|
INTDIR=.\LibR
|
||||||
|
# Begin Custom Macros
|
||||||
|
OutDir=.\LibR
|
||||||
|
# End Custom Macros
|
||||||
|
|
||||||
|
!IF "$(RECURSE)" == "0"
|
||||||
|
|
||||||
|
ALL : "$(OUTDIR)\pcre.lib"
|
||||||
|
|
||||||
|
!ELSE
|
||||||
|
|
||||||
|
ALL : "dftables - Win32 Release" "$(OUTDIR)\pcre.lib"
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(RECURSE)" == "1"
|
||||||
|
CLEAN :"dftables - Win32 ReleaseCLEAN"
|
||||||
|
!ELSE
|
||||||
|
CLEAN :
|
||||||
|
!ENDIF
|
||||||
|
-@erase "$(INTDIR)\get.obj"
|
||||||
|
-@erase "$(INTDIR)\maketables.obj"
|
||||||
|
-@erase "$(INTDIR)\pcre.obj"
|
||||||
|
-@erase "$(INTDIR)\pcre_src.idb"
|
||||||
|
-@erase "$(INTDIR)\pcre_src.pdb"
|
||||||
|
-@erase "$(INTDIR)\study.obj"
|
||||||
|
-@erase "$(OUTDIR)\pcre.lib"
|
||||||
|
|
||||||
|
"$(OUTDIR)" :
|
||||||
|
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||||
|
|
||||||
|
CPP=cl.exe
|
||||||
|
CPP_PROJ=/nologo /MD /W3 /Zi /O2 /D "_WIN32" /D "NDEBUG" /D "_WINDOWS" /D "PCRE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\pcre_src" /FD /c
|
||||||
|
|
||||||
|
.c{$(INTDIR)}.obj::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cpp{$(INTDIR)}.obj::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cxx{$(INTDIR)}.obj::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.c{$(INTDIR)}.sbr::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cpp{$(INTDIR)}.sbr::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cxx{$(INTDIR)}.sbr::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
RSC=rc.exe
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
BSC32_FLAGS=/nologo /o"$(OUTDIR)\pcre.bsc"
|
||||||
|
BSC32_SBRS= \
|
||||||
|
|
||||||
|
LIB32=link.exe -lib
|
||||||
|
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\pcre.lib"
|
||||||
|
LIB32_OBJS= \
|
||||||
|
"$(INTDIR)\get.obj" \
|
||||||
|
"$(INTDIR)\maketables.obj" \
|
||||||
|
"$(INTDIR)\pcre.obj" \
|
||||||
|
"$(INTDIR)\study.obj"
|
||||||
|
|
||||||
|
"$(OUTDIR)\pcre.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
|
||||||
|
$(LIB32) @<<
|
||||||
|
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
|
||||||
|
<<
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "pcre - Win32 Debug"
|
||||||
|
|
||||||
|
OUTDIR=.\LibD
|
||||||
|
INTDIR=.\LibD
|
||||||
|
# Begin Custom Macros
|
||||||
|
OutDir=.\LibD
|
||||||
|
# End Custom Macros
|
||||||
|
|
||||||
|
!IF "$(RECURSE)" == "0"
|
||||||
|
|
||||||
|
ALL : ".\pcre.h" ".\config.h" ".\chartables.c" "$(OUTDIR)\pcre.lib"
|
||||||
|
|
||||||
|
!ELSE
|
||||||
|
|
||||||
|
ALL : "dftables - Win32 Debug" ".\pcre.h" ".\config.h" ".\chartables.c" "$(OUTDIR)\pcre.lib"
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(RECURSE)" == "1"
|
||||||
|
CLEAN :"dftables - Win32 DebugCLEAN"
|
||||||
|
!ELSE
|
||||||
|
CLEAN :
|
||||||
|
!ENDIF
|
||||||
|
-@erase "$(INTDIR)\get.obj"
|
||||||
|
-@erase "$(INTDIR)\maketables.obj"
|
||||||
|
-@erase "$(INTDIR)\pcre.obj"
|
||||||
|
-@erase "$(INTDIR)\pcre_src.idb"
|
||||||
|
-@erase "$(INTDIR)\pcre_src.pdb"
|
||||||
|
-@erase "$(INTDIR)\study.obj"
|
||||||
|
-@erase "$(OUTDIR)\pcre.lib"
|
||||||
|
-@erase ".\chartables.c"
|
||||||
|
-@erase ".\config.h"
|
||||||
|
-@erase ".\pcre.h"
|
||||||
|
|
||||||
|
"$(OUTDIR)" :
|
||||||
|
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||||
|
|
||||||
|
CPP=cl.exe
|
||||||
|
CPP_PROJ=/nologo /MDd /W3 /Zi /Od /D "_WIN32" /D "_DEBUG" /D "_WINDOWS" /D "PCRE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\pcre_src" /FD /EHsc /c
|
||||||
|
|
||||||
|
.c{$(INTDIR)}.obj::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cpp{$(INTDIR)}.obj::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cxx{$(INTDIR)}.obj::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.c{$(INTDIR)}.sbr::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cpp{$(INTDIR)}.sbr::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
.cxx{$(INTDIR)}.sbr::
|
||||||
|
$(CPP) @<<
|
||||||
|
$(CPP_PROJ) $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
RSC=rc.exe
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
BSC32_FLAGS=/nologo /o"$(OUTDIR)\pcre.bsc"
|
||||||
|
BSC32_SBRS= \
|
||||||
|
|
||||||
|
LIB32=link.exe -lib
|
||||||
|
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\pcre.lib"
|
||||||
|
LIB32_OBJS= \
|
||||||
|
"$(INTDIR)\get.obj" \
|
||||||
|
"$(INTDIR)\maketables.obj" \
|
||||||
|
"$(INTDIR)\pcre.obj" \
|
||||||
|
"$(INTDIR)\study.obj"
|
||||||
|
|
||||||
|
"$(OUTDIR)\pcre.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
|
||||||
|
$(LIB32) @<<
|
||||||
|
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
|
||||||
|
<<
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||||
|
!IF EXISTS("pcre.dep")
|
||||||
|
!INCLUDE "pcre.dep"
|
||||||
|
!ELSE
|
||||||
|
!MESSAGE Warning: cannot find "pcre.dep"
|
||||||
|
!ENDIF
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "pcre - Win32 Release" || "$(CFG)" == "pcre - Win32 Debug"
|
||||||
|
SOURCE=.\dftables.exe
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "pcre - Win32 Release"
|
||||||
|
|
||||||
|
InputPath=.\dftables.exe
|
||||||
|
|
||||||
|
".\chartables.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
<<tempfile79.bat
|
||||||
|
@echo off
|
||||||
|
.\dftables.exe chartables.c
|
||||||
|
<<
|
||||||
|
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "pcre - Win32 Debug"
|
||||||
|
|
||||||
|
InputPath=.\dftables.exe
|
||||||
|
|
||||||
|
".\chartables.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
<<tempfile80.bat
|
||||||
|
@echo off
|
||||||
|
.\dftables.exe chartables.c
|
||||||
|
<<
|
||||||
|
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
SOURCE=.\get.c
|
||||||
|
|
||||||
|
"$(INTDIR)\get.obj" : $(SOURCE) "$(INTDIR)" ".\config.h" ".\pcre.h"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\maketables.c
|
||||||
|
|
||||||
|
"$(INTDIR)\maketables.obj" : $(SOURCE) "$(INTDIR)" ".\config.h" ".\pcre.h"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\pcre.c
|
||||||
|
|
||||||
|
"$(INTDIR)\pcre.obj" : $(SOURCE) "$(INTDIR)" ".\chartables.c" ".\config.h" ".\pcre.h"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\study.c
|
||||||
|
|
||||||
|
"$(INTDIR)\study.obj" : $(SOURCE) "$(INTDIR)" ".\config.h" ".\pcre.h"
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE=.\config.hw
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "pcre - Win32 Release"
|
||||||
|
|
||||||
|
InputPath=.\config.hw
|
||||||
|
|
||||||
|
".\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
<<tempfile81.bat
|
||||||
|
@echo off
|
||||||
|
type .\config.hw > .\config.h
|
||||||
|
<<
|
||||||
|
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "pcre - Win32 Debug"
|
||||||
|
|
||||||
|
InputPath=.\config.hw
|
||||||
|
|
||||||
|
".\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
<<tempfile82.bat
|
||||||
|
@echo off
|
||||||
|
type .\config.hw > .\config.h
|
||||||
|
<<
|
||||||
|
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
SOURCE=.\pcre.hw
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "pcre - Win32 Release"
|
||||||
|
|
||||||
|
InputPath=.\pcre.hw
|
||||||
|
|
||||||
|
".\pcre.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
<<tempfile83.bat
|
||||||
|
@echo off
|
||||||
|
type .\pcre.hw > .\pcre.h
|
||||||
|
<<
|
||||||
|
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "pcre - Win32 Debug"
|
||||||
|
|
||||||
|
InputPath=.\pcre.hw
|
||||||
|
|
||||||
|
".\pcre.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
<<tempfile84.bat
|
||||||
|
@echo off
|
||||||
|
type .\pcre.hw > .\pcre.h
|
||||||
|
<<
|
||||||
|
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "pcre - Win32 Release"
|
||||||
|
|
||||||
|
"dftables - Win32 Release" :
|
||||||
|
cd "."
|
||||||
|
$(MAKE) /$(MAKEFLAGS) /F ".\dftables.mak" CFG="dftables - Win32 Release"
|
||||||
|
cd "."
|
||||||
|
|
||||||
|
"dftables - Win32 ReleaseCLEAN" :
|
||||||
|
cd "."
|
||||||
|
$(MAKE) /$(MAKEFLAGS) /F ".\dftables.mak" CFG="dftables - Win32 Release" RECURSE=1 CLEAN
|
||||||
|
cd "."
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "pcre - Win32 Debug"
|
||||||
|
|
||||||
|
"dftables - Win32 Debug" :
|
||||||
|
cd "."
|
||||||
|
$(MAKE) /$(MAKEFLAGS) /F ".\dftables.mak" CFG="dftables - Win32 Debug"
|
||||||
|
cd "."
|
||||||
|
|
||||||
|
"dftables - Win32 DebugCLEAN" :
|
||||||
|
cd "."
|
||||||
|
$(MAKE) /$(MAKEFLAGS) /F ".\dftables.mak" CFG="dftables - Win32 Debug" RECURSE=1 CLEAN
|
||||||
|
cd "."
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
113
iis/winbuild/vcvars64.bat
Normal file
113
iis/winbuild/vcvars64.bat
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
@echo Setting environment for using Microsoft Visual Studio 2010 x64 tools.
|
||||||
|
|
||||||
|
@call :GetVSCommonToolsDir
|
||||||
|
@if "%VS100COMNTOOLS%"=="" goto error_no_VS100COMNTOOLSDIR
|
||||||
|
|
||||||
|
@call "%VS100COMNTOOLS%VCVarsQueryRegistry.bat" No32bit 64bit
|
||||||
|
|
||||||
|
@if "%VSINSTALLDIR%"=="" goto error_no_VSINSTALLDIR
|
||||||
|
@if "%VCINSTALLDIR%"=="" goto error_no_VCINSTALLDIR
|
||||||
|
@if "%FrameworkDir64%"=="" goto error_no_FrameworkDIR64
|
||||||
|
@if "%FrameworkVersion64%"=="" goto error_no_FrameworkVer64
|
||||||
|
@if "%Framework35Version%"=="" goto error_no_Framework35Version
|
||||||
|
|
||||||
|
@set FrameworkDir=%FrameworkDir64%
|
||||||
|
@set FrameworkVersion=%FrameworkVersion64%
|
||||||
|
|
||||||
|
@if not "%WindowsSdkDir%" == "" (
|
||||||
|
@set "PATH=%WindowsSdkDir%bin\NETFX 4.0 Tools\x64;%WindowsSdkDir%bin\x64;%WindowsSdkDir%bin;%PATH%"
|
||||||
|
@set "INCLUDE=%WindowsSdkDir%include;%INCLUDE%"
|
||||||
|
@set "LIB=%WindowsSdkDir%lib\x64;%LIB%"
|
||||||
|
)
|
||||||
|
|
||||||
|
@rem PATH
|
||||||
|
@rem ----
|
||||||
|
@if exist "%VSINSTALLDIR%Team Tools\Performance Tools\x64" (
|
||||||
|
@set "PATH=%VSINSTALLDIR%Team Tools\Performance Tools\x64;%VSINSTALLDIR%Team Tools\Performance Tools;%PATH%"
|
||||||
|
)
|
||||||
|
@if exist "%ProgramFiles%\HTML Help Workshop" set PATH=%ProgramFiles%\HTML Help Workshop;%PATH%
|
||||||
|
@if exist "%ProgramFiles(x86)%\HTML Help Workshop" set PATH=%ProgramFiles(x86)%\HTML Help Workshop;%PATH%
|
||||||
|
@set PATH=%VSINSTALLDIR%Common7\Tools;%PATH%
|
||||||
|
@set PATH=%VSINSTALLDIR%Common7\IDE;%PATH%
|
||||||
|
@set PATH=%VCINSTALLDIR%VCPackages;%PATH%
|
||||||
|
@set PATH=%FrameworkDir%\%Framework35Version%;%PATH%
|
||||||
|
@set PATH=%FrameworkDir%\%FrameworkVersion%;%PATH%
|
||||||
|
@set PATH=%VCINSTALLDIR%BIN\amd64;%PATH%
|
||||||
|
|
||||||
|
@rem INCLUDE
|
||||||
|
@rem -------
|
||||||
|
@if exist "%VCINSTALLDIR%ATLMFC\INCLUDE" set INCLUDE=%VCINSTALLDIR%ATLMFC\INCLUDE;%INCLUDE%
|
||||||
|
@set INCLUDE=%VCINSTALLDIR%INCLUDE;%INCLUDE%
|
||||||
|
|
||||||
|
@rem LIB
|
||||||
|
@rem ---
|
||||||
|
@if exist "%VCINSTALLDIR%ATLMFC\LIB\amd64" set LIB=%VCINSTALLDIR%ATLMFC\LIB\amd64;%LIB%
|
||||||
|
@set LIB=%VCINSTALLDIR%LIB\amd64;%LIB%
|
||||||
|
|
||||||
|
@rem LIBPATH
|
||||||
|
@rem -------
|
||||||
|
@if exist "%VCINSTALLDIR%ATLMFC\LIB\amd64" set LIBPATH=%VCINSTALLDIR%ATLMFC\LIB\amd64;%LIBPATH%
|
||||||
|
@set LIBPATH=%VCINSTALLDIR%LIB\amd64;%LIBPATH%
|
||||||
|
@set LIBPATH=%FrameworkDir%\%Framework35Version%;%LIBPATH%
|
||||||
|
@set LIBPATH=%FrameworkDir%\%FrameworkVersion%;%LIBPATH%
|
||||||
|
|
||||||
|
@set Platform=X64
|
||||||
|
@set CommandPromptType=Native
|
||||||
|
|
||||||
|
@goto end
|
||||||
|
|
||||||
|
@REM -----------------------------------------------------------------------
|
||||||
|
:GetVSCommonToolsDir
|
||||||
|
@set VS100COMNTOOLS=
|
||||||
|
@call :GetVSCommonToolsDirHelper32 HKLM > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetVSCommonToolsDirHelper32 HKCU > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetVSCommonToolsDirHelper64 HKLM > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetVSCommonToolsDirHelper64 HKCU > nul 2>&1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
:GetVSCommonToolsDirHelper32
|
||||||
|
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v "10.0"') DO (
|
||||||
|
@if "%%i"=="10.0" (
|
||||||
|
@SET "VS100COMNTOOLS=%%k"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@if "%VS100COMNTOOLS%"=="" exit /B 1
|
||||||
|
@SET "VS100COMNTOOLS=%VS100COMNTOOLS%Common7\Tools\"
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
:GetVSCommonToolsDirHelper64
|
||||||
|
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" /v "10.0"') DO (
|
||||||
|
@if "%%i"=="10.0" (
|
||||||
|
@SET "VS100COMNTOOLS=%%k"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@if "%VS100COMNTOOLS%"=="" exit /B 1
|
||||||
|
@SET "VS100COMNTOOLS=%VS100COMNTOOLS%Common7\Tools\"
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
@REM -----------------------------------------------------------------------
|
||||||
|
:error_no_VS100COMNTOOLSDIR
|
||||||
|
@echo ERROR: Cannot determine the location of the VS Common Tools folder.
|
||||||
|
@goto end
|
||||||
|
|
||||||
|
:error_no_VSINSTALLDIR
|
||||||
|
@echo ERROR: Cannot determine the location of the VS installation.
|
||||||
|
@goto end
|
||||||
|
|
||||||
|
:error_no_VCINSTALLDIR
|
||||||
|
@echo ERROR: Cannot determine the location of the VC installation.
|
||||||
|
@goto end
|
||||||
|
|
||||||
|
:error_no_FrameworkDIR64
|
||||||
|
@echo ERROR: Cannot determine the location of the .NET Framework 64bit installation.
|
||||||
|
@goto end
|
||||||
|
|
||||||
|
:error_no_FrameworkVer64
|
||||||
|
@echo ERROR: Cannot determine the version of the .NET Framework 64bit installation.
|
||||||
|
@goto end
|
||||||
|
|
||||||
|
:error_no_Framework35Version
|
||||||
|
@echo ERROR: Cannot determine the .NET Framework 3.5 version.
|
||||||
|
@goto end
|
||||||
|
|
||||||
|
:end
|
118
iis/winbuild/vsvars32.bat
Normal file
118
iis/winbuild/vsvars32.bat
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
@echo Setting environment for using Microsoft Visual Studio 2010 x86 tools.
|
||||||
|
|
||||||
|
@call :GetVSCommonToolsDir
|
||||||
|
@if "%VS100COMNTOOLS%"=="" goto error_no_VS100COMNTOOLSDIR
|
||||||
|
|
||||||
|
@call "%VS100COMNTOOLS%VCVarsQueryRegistry.bat" 32bit No64bit
|
||||||
|
|
||||||
|
@if "%VSINSTALLDIR%"=="" goto error_no_VSINSTALLDIR
|
||||||
|
@if "%FrameworkDir32%"=="" goto error_no_FrameworkDIR32
|
||||||
|
@if "%FrameworkVersion32%"=="" goto error_no_FrameworkVer32
|
||||||
|
@if "%Framework35Version%"=="" goto error_no_Framework35Version
|
||||||
|
|
||||||
|
@set FrameworkDir=%FrameworkDir32%
|
||||||
|
@set FrameworkVersion=%FrameworkVersion32%
|
||||||
|
|
||||||
|
@if not "%WindowsSdkDir%" == "" (
|
||||||
|
@set "PATH=%WindowsSdkDir%bin\NETFX 4.0 Tools;%WindowsSdkDir%bin;%PATH%"
|
||||||
|
@set "INCLUDE=%WindowsSdkDir%include;%INCLUDE%"
|
||||||
|
@set "LIB=%WindowsSdkDir%lib;%LIB%"
|
||||||
|
)
|
||||||
|
|
||||||
|
@rem
|
||||||
|
@rem Root of Visual Studio IDE installed files.
|
||||||
|
@rem
|
||||||
|
@set DevEnvDir=%VSINSTALLDIR%Common7\IDE\
|
||||||
|
|
||||||
|
@rem PATH
|
||||||
|
@rem ----
|
||||||
|
@if exist "%VSINSTALLDIR%Team Tools\Performance Tools" (
|
||||||
|
@set "PATH=%VSINSTALLDIR%Team Tools\Performance Tools;%PATH%"
|
||||||
|
)
|
||||||
|
@if exist "%ProgramFiles%\HTML Help Workshop" set PATH=%ProgramFiles%\HTML Help Workshop;%PATH%
|
||||||
|
@if exist "%ProgramFiles(x86)%\HTML Help Workshop" set PATH=%ProgramFiles(x86)%\HTML Help Workshop;%PATH%
|
||||||
|
@if exist "%VCINSTALLDIR%VCPackages" set PATH=%VCINSTALLDIR%VCPackages;%PATH%
|
||||||
|
@set PATH=%FrameworkDir%%Framework35Version%;%PATH%
|
||||||
|
@set PATH=%FrameworkDir%%FrameworkVersion%;%PATH%
|
||||||
|
@set PATH=%VSINSTALLDIR%Common7\Tools;%PATH%
|
||||||
|
@if exist "%VCINSTALLDIR%BIN" set PATH=%VCINSTALLDIR%BIN;%PATH%
|
||||||
|
@set PATH=%DevEnvDir%;%PATH%
|
||||||
|
|
||||||
|
@if exist "%VSINSTALLDIR%VSTSDB\Deploy" (
|
||||||
|
@set "PATH=%VSINSTALLDIR%VSTSDB\Deploy;%PATH%"
|
||||||
|
)
|
||||||
|
|
||||||
|
@if not "%FSHARPINSTALLDIR%" == "" (
|
||||||
|
@set "PATH=%FSHARPINSTALLDIR%;%PATH%"
|
||||||
|
)
|
||||||
|
|
||||||
|
@rem INCLUDE
|
||||||
|
@rem -------
|
||||||
|
@if exist "%VCINSTALLDIR%ATLMFC\INCLUDE" set INCLUDE=%VCINSTALLDIR%ATLMFC\INCLUDE;%INCLUDE%
|
||||||
|
@if exist "%VCINSTALLDIR%INCLUDE" set INCLUDE=%VCINSTALLDIR%INCLUDE;%INCLUDE%
|
||||||
|
|
||||||
|
@rem LIB
|
||||||
|
@rem ---
|
||||||
|
@if exist "%VCINSTALLDIR%ATLMFC\LIB" set LIB=%VCINSTALLDIR%ATLMFC\LIB;%LIB%
|
||||||
|
@if exist "%VCINSTALLDIR%LIB" set LIB=%VCINSTALLDIR%LIB;%LIB%
|
||||||
|
|
||||||
|
@rem LIBPATH
|
||||||
|
@rem -------
|
||||||
|
@if exist "%VCINSTALLDIR%ATLMFC\LIB" set LIBPATH=%VCINSTALLDIR%ATLMFC\LIB;%LIBPATH%
|
||||||
|
@if exist "%VCINSTALLDIR%LIB" set LIBPATH=%VCINSTALLDIR%LIB;%LIBPATH%
|
||||||
|
@set LIBPATH=%FrameworkDir%%Framework35Version%;%LIBPATH%
|
||||||
|
@set LIBPATH=%FrameworkDir%%FrameworkVersion%;%LIBPATH%
|
||||||
|
|
||||||
|
@goto end
|
||||||
|
|
||||||
|
@REM -----------------------------------------------------------------------
|
||||||
|
:GetVSCommonToolsDir
|
||||||
|
@set VS100COMNTOOLS=
|
||||||
|
@call :GetVSCommonToolsDirHelper32 HKLM > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetVSCommonToolsDirHelper32 HKCU > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetVSCommonToolsDirHelper64 HKLM > nul 2>&1
|
||||||
|
@if errorlevel 1 call :GetVSCommonToolsDirHelper64 HKCU > nul 2>&1
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
:GetVSCommonToolsDirHelper32
|
||||||
|
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v "10.0"') DO (
|
||||||
|
@if "%%i"=="10.0" (
|
||||||
|
@SET "VS100COMNTOOLS=%%k"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@if "%VS100COMNTOOLS%"=="" exit /B 1
|
||||||
|
@SET "VS100COMNTOOLS=%VS100COMNTOOLS%Common7\Tools\"
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
:GetVSCommonToolsDirHelper64
|
||||||
|
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" /v "10.0"') DO (
|
||||||
|
@if "%%i"=="10.0" (
|
||||||
|
@SET "VS100COMNTOOLS=%%k"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@if "%VS100COMNTOOLS%"=="" exit /B 1
|
||||||
|
@SET "VS100COMNTOOLS=%VS100COMNTOOLS%Common7\Tools\"
|
||||||
|
@exit /B 0
|
||||||
|
|
||||||
|
@REM -----------------------------------------------------------------------
|
||||||
|
:error_no_VS100COMNTOOLSDIR
|
||||||
|
@echo ERROR: Cannot determine the location of the VS Common Tools folder.
|
||||||
|
@goto end
|
||||||
|
|
||||||
|
:error_no_VSINSTALLDIR
|
||||||
|
@echo ERROR: Cannot determine the location of the VS installation.
|
||||||
|
@goto end
|
||||||
|
|
||||||
|
:error_no_FrameworkDIR32
|
||||||
|
@echo ERROR: Cannot determine the location of the .NET Framework 32bit installation.
|
||||||
|
@goto end
|
||||||
|
|
||||||
|
:error_no_FrameworkVer32
|
||||||
|
@echo ERROR: Cannot determine the version of the .NET Framework 32bit installation.
|
||||||
|
@goto end
|
||||||
|
|
||||||
|
:error_no_Framework35Version
|
||||||
|
@echo ERROR: Cannot determine the .NET Framework 3.5 version.
|
||||||
|
@goto end
|
||||||
|
|
||||||
|
:end
|
15
nginx/TODO
Normal file
15
nginx/TODO
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
Modsecurity NGINX TODO
|
||||||
|
|
||||||
|
* Code Cleanup
|
||||||
|
|
||||||
|
* Create a method for action DROP as in Apache
|
||||||
|
|
||||||
|
* Add CRS Support
|
||||||
|
|
||||||
|
* Specific NGINX config file
|
||||||
|
|
||||||
|
* Separate nginx/ IIS/ apache/ and generic/ folders
|
||||||
|
|
||||||
|
* Source code documentation (insert doxygen headers)
|
||||||
|
|
||||||
|
* Create better build infrastructure with support for tests and automated regression
|
6
nginx/modsecurity/config
Normal file
6
nginx/modsecurity/config
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
ngx_addon_name=ngx_http_modsecurity_module
|
||||||
|
HTTP_MODULES="$HTTP_MODULES ngx_http_modsecurity_module"
|
||||||
|
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_modsecurity_module.c"
|
||||||
|
NGX_ADDON_DEPS="$NGX_ADDON_DEPS"
|
||||||
|
CORE_LIBS="$CORE_LIBS $ngx_addon_dir/../../standalone/.libs/standalone.a -lapr-1 -laprutil-1 -lxml2 -lm"
|
||||||
|
CORE_INCS="$CORE_INCS /usr/include/apache2 /usr/include/apr-1.0 $ngx_addon_dir/../../standalone $ngx_addon_dir/../../apache2 /usr/include/libxml2"
|
413
nginx/modsecurity/ngx_http_modsecurity_module.c
Normal file
413
nginx/modsecurity/ngx_http_modsecurity_module.c
Normal file
@@ -0,0 +1,413 @@
|
|||||||
|
#include <nginx.h>
|
||||||
|
#include <ngx_config.h>
|
||||||
|
#include <ngx_core.h>
|
||||||
|
#include <ngx_http.h>
|
||||||
|
#include <ngx_event.h>
|
||||||
|
#include <ngx_http_core_module.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <sys/times.h>
|
||||||
|
|
||||||
|
#undef CR
|
||||||
|
#undef LF
|
||||||
|
#undef CRLF
|
||||||
|
|
||||||
|
#include "api.h"
|
||||||
|
|
||||||
|
extern ngx_module_t ngx_http_modsecurity_module;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
ngx_log_t *log;
|
||||||
|
} ngx_http_modsecurity_main_conf_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
ngx_int_t request_processed;
|
||||||
|
ngx_int_t request_blocked;
|
||||||
|
ngx_int_t error;
|
||||||
|
ngx_flag_t enabled;
|
||||||
|
ngx_str_t config_path;
|
||||||
|
directory_config *config;
|
||||||
|
} ngx_http_modsecurity_loc_conf_t;
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Module's registred function/handlers.
|
||||||
|
*/
|
||||||
|
static ngx_int_t ngx_http_modsecurity_access_handler(ngx_http_request_t *r);
|
||||||
|
static ngx_int_t ngx_http_modsecurity_init(ngx_conf_t *cf);
|
||||||
|
static ngx_int_t ngx_http_modsecurity_init_process(ngx_cycle_t *cycle);
|
||||||
|
static void ngx_http_modsecurity_exit_process(ngx_cycle_t *cycle);
|
||||||
|
static void *ngx_http_modsecurity_create_loc_conf(ngx_conf_t *cf);
|
||||||
|
static char *ngx_http_modsecurity_merge_loc_conf(ngx_conf_t *cf,
|
||||||
|
void *parent,
|
||||||
|
void *child);
|
||||||
|
static ngx_int_t ngx_http_read_request_body(ngx_http_request_t *req,
|
||||||
|
ngx_http_client_body_handler_pt handler);
|
||||||
|
void *ngx_http_modsecurity_create_main_conf(ngx_conf_t *cf);
|
||||||
|
|
||||||
|
|
||||||
|
/* command handled by the module */
|
||||||
|
static ngx_command_t ngx_http_modsecurity_commands[] = {
|
||||||
|
{ ngx_string("ModSecurityConfig"),
|
||||||
|
NGX_HTTP_LOC_CONF|NGX_CONF_1MORE,
|
||||||
|
ngx_conf_set_str_slot,
|
||||||
|
NGX_HTTP_LOC_CONF_OFFSET,
|
||||||
|
offsetof(ngx_http_modsecurity_loc_conf_t, config_path),
|
||||||
|
NULL },
|
||||||
|
{ ngx_string("ModSecurityEnabled"),
|
||||||
|
NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
|
||||||
|
ngx_conf_set_flag_slot,
|
||||||
|
NGX_HTTP_LOC_CONF_OFFSET,
|
||||||
|
offsetof(ngx_http_modsecurity_loc_conf_t, enabled),
|
||||||
|
NULL },
|
||||||
|
ngx_null_command
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
** handlers for configuration phases of the module
|
||||||
|
*/
|
||||||
|
|
||||||
|
static ngx_http_module_t ngx_http_modsecurity_module_ctx = {
|
||||||
|
NULL, /* preconfiguration */
|
||||||
|
ngx_http_modsecurity_init, /* postconfiguration */
|
||||||
|
ngx_http_modsecurity_create_main_conf, /* create main configuration */
|
||||||
|
NULL, /* init main configuration */
|
||||||
|
NULL, /* create server configuration */
|
||||||
|
NULL, /* merge server configuration */
|
||||||
|
ngx_http_modsecurity_create_loc_conf, /* create location configuration */
|
||||||
|
ngx_http_modsecurity_merge_loc_conf /* merge location configuration */
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
ngx_module_t ngx_http_modsecurity_module = {
|
||||||
|
NGX_MODULE_V1,
|
||||||
|
&ngx_http_modsecurity_module_ctx, /* module context */
|
||||||
|
ngx_http_modsecurity_commands, /* module directives */
|
||||||
|
NGX_HTTP_MODULE, /* module type */
|
||||||
|
NULL, /* init master */
|
||||||
|
NULL, /* init module */
|
||||||
|
ngx_http_modsecurity_init_process, /* init process */
|
||||||
|
NULL, /* init thread */
|
||||||
|
NULL, /* exit thread */
|
||||||
|
ngx_http_modsecurity_exit_process, /* exit process */
|
||||||
|
NULL, /* exit master */
|
||||||
|
NGX_MODULE_V1_PADDING
|
||||||
|
};
|
||||||
|
|
||||||
|
#define DEFAULT_MAX_LOC_T 10
|
||||||
|
|
||||||
|
void *
|
||||||
|
ngx_http_modsecurity_create_main_conf(ngx_conf_t *cf)
|
||||||
|
{
|
||||||
|
ngx_http_modsecurity_main_conf_t *mc;
|
||||||
|
|
||||||
|
mc = ngx_pcalloc(cf->pool, sizeof(ngx_http_modsecurity_main_conf_t));
|
||||||
|
if (!mc)
|
||||||
|
return (NGX_CONF_ERROR);
|
||||||
|
|
||||||
|
return (mc);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* create log conf struct */
|
||||||
|
static void *
|
||||||
|
ngx_http_modsecurity_create_loc_conf(ngx_conf_t *cf)
|
||||||
|
{
|
||||||
|
ngx_http_modsecurity_loc_conf_t *conf;
|
||||||
|
|
||||||
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_modsecurity_loc_conf_t));
|
||||||
|
if (conf == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
conf->enabled = NGX_CONF_UNSET;
|
||||||
|
|
||||||
|
return (conf);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* merge loc conf */
|
||||||
|
static char *
|
||||||
|
ngx_http_modsecurity_merge_loc_conf(ngx_conf_t *cf, void *parent,
|
||||||
|
void *child)
|
||||||
|
{
|
||||||
|
ngx_http_modsecurity_loc_conf_t *prev = parent;
|
||||||
|
ngx_http_modsecurity_loc_conf_t *conf = child;
|
||||||
|
|
||||||
|
if(conf->config_path.len == 0)
|
||||||
|
conf->config_path = prev->config_path;
|
||||||
|
|
||||||
|
ngx_conf_merge_value(conf->enabled, prev->enabled, 0);
|
||||||
|
|
||||||
|
return NGX_CONF_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void modsecLog(void *obj, int level, char *str)
|
||||||
|
{
|
||||||
|
if(obj != NULL)
|
||||||
|
ngx_log_error(NGX_LOG_INFO, (ngx_log_t *)obj, 0, str);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** This function sets up handlers for ACCESS_PHASE,
|
||||||
|
*/
|
||||||
|
static ngx_int_t
|
||||||
|
ngx_http_modsecurity_init(ngx_conf_t *cf)
|
||||||
|
{
|
||||||
|
ngx_http_handler_pt *h;
|
||||||
|
ngx_http_core_main_conf_t *cmcf;
|
||||||
|
ngx_http_modsecurity_main_conf_t *main_cf;
|
||||||
|
// ngx_http_modsecurity_loc_conf_t **loc_cf;
|
||||||
|
// unsigned int i;
|
||||||
|
|
||||||
|
cmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module);
|
||||||
|
main_cf = ngx_http_conf_get_module_main_conf(cf, ngx_http_modsecurity_module);
|
||||||
|
if (cmcf == NULL ||
|
||||||
|
main_cf == NULL)
|
||||||
|
return (NGX_ERROR);
|
||||||
|
|
||||||
|
/* Register for access phase */
|
||||||
|
//h = ngx_array_push(&cmcf->phases[NGX_HTTP_ACCESS_PHASE].handlers);
|
||||||
|
h = ngx_array_push(&cmcf->phases[NGX_HTTP_REWRITE_PHASE].handlers);
|
||||||
|
if (h == NULL)
|
||||||
|
return (NGX_ERROR);
|
||||||
|
*h = ngx_http_modsecurity_access_handler;
|
||||||
|
|
||||||
|
return (NGX_OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
static ngx_int_t
|
||||||
|
ngx_http_modsecurity_init_process(ngx_cycle_t *cycle)
|
||||||
|
{
|
||||||
|
cycle->log->log_level = NGX_LOG_INFO;
|
||||||
|
|
||||||
|
modsecSetLogHook(cycle->log, modsecLog);
|
||||||
|
|
||||||
|
modsecInit();
|
||||||
|
|
||||||
|
modsecStartConfig();
|
||||||
|
|
||||||
|
modsecFinalizeConfig();
|
||||||
|
|
||||||
|
modsecInitProcess();
|
||||||
|
|
||||||
|
return NGX_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
ngx_http_modsecurity_exit_process(ngx_cycle_t *cycle)
|
||||||
|
{
|
||||||
|
modsecTerminate();
|
||||||
|
}
|
||||||
|
|
||||||
|
// This is a temporary hack to make PCRE work with ModSecurity
|
||||||
|
// nginx hijacks pcre_malloc and pcre_free, so we have to re-hijack them
|
||||||
|
//
|
||||||
|
|
||||||
|
extern apr_pool_t *pool;
|
||||||
|
|
||||||
|
void *modsec_pcre_malloc(size_t size)
|
||||||
|
{
|
||||||
|
return apr_palloc(pool, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void modsec_pcre_free(void *ptr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
char *ConvertNgxStringToUTF8(ngx_str_t str, apr_pool_t *pool)
|
||||||
|
{
|
||||||
|
char *t = (char *)apr_palloc(pool, str.len + 1);
|
||||||
|
|
||||||
|
memcpy(t, str.data, str.len);
|
||||||
|
t[str.len] = 0;
|
||||||
|
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Create payload handler for calling request body function
|
||||||
|
*/
|
||||||
|
|
||||||
|
void
|
||||||
|
ngx_http_dummy_payload_handler(ngx_http_request_t *req)
|
||||||
|
{
|
||||||
|
ngx_http_finalize_request(req, NGX_DONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
** If method is POST or PUT, read request body and put in req->request_body->bufs
|
||||||
|
*/
|
||||||
|
|
||||||
|
static ngx_int_t
|
||||||
|
ngx_http_read_request_body(ngx_http_request_t *req,
|
||||||
|
ngx_http_client_body_handler_pt handler)
|
||||||
|
{
|
||||||
|
// If has body request treat it
|
||||||
|
ngx_int_t rc = 0;
|
||||||
|
|
||||||
|
if(req->method == NGX_HTTP_POST || req->method==NGX_HTTP_PUT)
|
||||||
|
{
|
||||||
|
//calling request body function
|
||||||
|
rc = ngx_http_read_client_request_body(req, ngx_http_dummy_payload_handler);
|
||||||
|
}
|
||||||
|
//If some error, returns rc
|
||||||
|
if (rc == NGX_ERROR || rc >= NGX_HTTP_SPECIAL_RESPONSE) {
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
//Has the end of request body?
|
||||||
|
if (rc == NGX_AGAIN) {
|
||||||
|
return NGX_DONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NGX_DECLINED;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** [ENTRY POINT] does : this is the function called by nginx :
|
||||||
|
*/
|
||||||
|
static ngx_int_t ngx_http_modsecurity_access_handler(ngx_http_request_t *req)
|
||||||
|
{
|
||||||
|
/* ngx_http_request_ctx_t *ctx;
|
||||||
|
ngx_int_t rc;
|
||||||
|
ngx_http_core_loc_conf_t *clcf;
|
||||||
|
struct tms tmsstart, tmsend;
|
||||||
|
clock_t start, end;
|
||||||
|
|
||||||
|
ctx = ngx_http_get_module_ctx(r, ngx_http_modsecurity_module);
|
||||||
|
|
||||||
|
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
|
||||||
|
|
||||||
|
if (ctx && ctx->over)
|
||||||
|
return (NGX_DECLINED);
|
||||||
|
if (ctx && ctx->wait_for_body) {
|
||||||
|
return (NGX_DONE);
|
||||||
|
}
|
||||||
|
// the module is not enabled here
|
||||||
|
//if (!cf->enabled || cf->force_disabled)
|
||||||
|
// return (NGX_DECLINED);
|
||||||
|
// don't process internal requests.
|
||||||
|
//if (r->internal) {
|
||||||
|
// return (NGX_DECLINED);
|
||||||
|
}
|
||||||
|
|
||||||
|
//nothing: return (NGX_OK);
|
||||||
|
//redirect : return (NGX_HTTP_OK);
|
||||||
|
*/
|
||||||
|
ngx_http_modsecurity_loc_conf_t *cf;
|
||||||
|
conn_rec *c;
|
||||||
|
request_rec *r;
|
||||||
|
|
||||||
|
cf = ngx_http_get_module_loc_conf(req, ngx_http_modsecurity_module);
|
||||||
|
|
||||||
|
if (!cf)
|
||||||
|
return (NGX_ERROR);
|
||||||
|
|
||||||
|
if(!cf->enabled)
|
||||||
|
return (NGX_DECLINED);
|
||||||
|
|
||||||
|
// temporary hack, nginx uses pcre as well and hijacks these two
|
||||||
|
//
|
||||||
|
pcre_malloc = modsec_pcre_malloc;
|
||||||
|
pcre_free = modsec_pcre_free;
|
||||||
|
|
||||||
|
if(cf->config == NULL)
|
||||||
|
{
|
||||||
|
cf->config = modsecGetDefaultConfig();
|
||||||
|
|
||||||
|
if(cf->config_path.len != 0)
|
||||||
|
{
|
||||||
|
char *path = ngx_pcalloc(req->pool, cf->config_path.len+1);
|
||||||
|
|
||||||
|
memcpy(path, cf->config_path.data, cf->config_path.len);
|
||||||
|
|
||||||
|
const char *msg = modsecProcessConfig(cf->config, path);
|
||||||
|
|
||||||
|
if(msg != NULL)
|
||||||
|
ngx_log_error(NGX_LOG_INFO, req->connection->log, 0, msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//if(r->connection->requests == 0)
|
||||||
|
//{
|
||||||
|
c = modsecNewConnection();
|
||||||
|
|
||||||
|
modsecProcessConnection(c);
|
||||||
|
//}
|
||||||
|
|
||||||
|
r = modsecNewRequest(c, cf->config);
|
||||||
|
|
||||||
|
r->request_time = apr_time_now();
|
||||||
|
|
||||||
|
r->path_info = ConvertNgxStringToUTF8(req->unparsed_uri, r->pool);
|
||||||
|
|
||||||
|
r->unparsed_uri = ConvertNgxStringToUTF8(req->unparsed_uri, r->pool);
|
||||||
|
r->uri = r->unparsed_uri;
|
||||||
|
|
||||||
|
r->the_request = ConvertNgxStringToUTF8(req->request_line, r->pool);
|
||||||
|
|
||||||
|
r->args = ConvertNgxStringToUTF8(req->args, r->pool);
|
||||||
|
|
||||||
|
r->filename = r->path_info;
|
||||||
|
|
||||||
|
r->parsed_uri.scheme = "http";
|
||||||
|
r->parsed_uri.path = r->path_info;
|
||||||
|
r->parsed_uri.is_initialized = 1;
|
||||||
|
r->parsed_uri.port = 80;
|
||||||
|
r->parsed_uri.port_str = "80";
|
||||||
|
r->parsed_uri.query = r->args;
|
||||||
|
r->parsed_uri.dns_looked_up = 0;
|
||||||
|
r->parsed_uri.dns_resolved = 0;
|
||||||
|
r->parsed_uri.password = NULL;
|
||||||
|
r->parsed_uri.user = NULL;
|
||||||
|
r->parsed_uri.fragment = ConvertNgxStringToUTF8(req->exten, r->pool);
|
||||||
|
|
||||||
|
ngx_list_part_t *part = &req->headers_in.headers.part;
|
||||||
|
ngx_table_elt_t *h = part->elts;
|
||||||
|
u_int i;
|
||||||
|
|
||||||
|
for(i = 0; ; i++)
|
||||||
|
{
|
||||||
|
if(i >= part->nelts)
|
||||||
|
{
|
||||||
|
if(part->next == NULL)
|
||||||
|
break;
|
||||||
|
|
||||||
|
part = part->next;
|
||||||
|
h = part->elts;
|
||||||
|
i = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
apr_table_setn(r->headers_in, ConvertNgxStringToUTF8(h[i].key, r->pool),
|
||||||
|
ConvertNgxStringToUTF8(h[i].value, r->pool));
|
||||||
|
}
|
||||||
|
|
||||||
|
apr_table_setn(r->subprocess_env, "UNIQUE_ID", "12345");
|
||||||
|
|
||||||
|
ngx_log_error(NGX_LOG_INFO, req->connection->log, 0, r->uri);
|
||||||
|
|
||||||
|
int status = modsecProcessRequest(r);
|
||||||
|
ngx_log_error(NGX_LOG_INFO, req->connection->log, 0, "status: %d", status);
|
||||||
|
|
||||||
|
ngx_http_read_request_body(req, ngx_http_dummy_payload_handler);
|
||||||
|
|
||||||
|
if(req->headers_in.content_length)
|
||||||
|
{
|
||||||
|
ngx_log_error(NGX_LOG_INFO, req->connection->log, 0, "request body: %s", req->request_body->bufs);
|
||||||
|
} else {
|
||||||
|
ngx_log_error(NGX_LOG_INFO, req->connection->log, 0, "request body: ");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(status == DECLINED)
|
||||||
|
{
|
||||||
|
// this function would work here, but it is only internal
|
||||||
|
//ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
|
||||||
|
return (NGX_DECLINED);
|
||||||
|
|
||||||
|
// If DECLINED, finalize connection (sent FIN) and return HTTP 500
|
||||||
|
ngx_log_error(NGX_LOG_INFO, req->connection->log, 0, "Invalid Request");
|
||||||
|
ngx_http_finalize_request(req, NGX_HTTP_INTERNAL_SERVER_ERROR);
|
||||||
|
return NGX_HTTP_INTERNAL_SERVER_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
Reference in New Issue
Block a user