From: Gregg Lewis Smith Date: Tue, 14 Nov 2017 21:01:37 +0000 (+0000) Subject: Win32 legacy bits for mod_md X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0e295e2e1597209535eb34a4c33caa479dd9d776;p=apache Win32 legacy bits for mod_md git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1815264 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/Makefile.win b/Makefile.win index 9d261ae3df..044ae5f302 100644 --- a/Makefile.win +++ b/Makefile.win @@ -274,6 +274,34 @@ _trynghttp2: !ENDIF +!IF EXIST("srclib\openssl") && EXIST("srclib\jansson") && EXIST("srclib\curl") + +_trymd: +!IF $(USEMAK) == 1 + cd modules\md + $(MAKE) $(MAKEOPT) $(SSLOPT) -f mod_md.mak CFG="mod_md - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) $(SSLOPT) -f a2md.mak CFG="a2md - Win32 $(LONG)" RECURSE=0 $(CTARGET) + cd ..\.. +!ELSEIF $(USESLN) == 1 + devenv $(TLP).sln /useenv $(CTARGET) $(LONG) /project mod_md + devenv $(TLP).sln /useenv $(CTARGET) $(LONG) /project a2md +!ELSE + @msdev $(TLP).dsw /USEENV /MAKE \ + "mod_md - Win32 $(LONG)" /NORECURSE $(CTARGET) + @msdev $(TLP).dsw /USEENV /MAKE \ + "a2md - Win32 $(LONG)" /NORECURSE $(CTARGET) +!ENDIF + +!ELSE +# NOT EXIST("srclib\openssl") && EXIST("srclib\jansson") && EXIST("srclib\curl") + +_trymd: + @echo ----- + @echo mod_md and a2md will not build unless OpenSSL, Jansson and Curl are built in placed + @echo in srclib. Example: srclib/openssl, srclib/jansson and srclib/curl + +!ENDIF + _trydb: !IF $(USEMAK) == 1 cd srclib\$(UTILDIR)\dbd @@ -620,6 +648,12 @@ _build: $(MAKE) $(MAKEOPT) -f mod_slotmem_shm.mak CFG="mod_slotmem_shm - Win32 $(LONG)" RECURSE=0 $(CTARGET) cd ..\.. !IF EXIST("srclib\openssl") +!IF EXIST("srclib\jansson") && EXIST("srclib\curl") + cd modules\md + $(MAKE) $(MAKEOPT) $(SSLOPT) -f a2md.mak CFG="a2md - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) $(SSLOPT) -f mod_md.mak CFG="mod_md - Win32 $(LONG)" RECURSE=0 $(CTARGET) + cd ..\.. +!ENDIF # cd modules\session # $(MAKE) $(MAKEOPT) -f mod_session_crypto.mak CFG="mod_session_crypto - Win32 $(LONG)" RECURSE=0 $(CTARGET) # cd ..\.. @@ -903,6 +937,12 @@ _copybin: copy modules\slotmem\$(LONG)\mod_slotmem_plain.$(src_so) "$(inst_so)" <.y copy modules\slotmem\$(LONG)\mod_slotmem_shm.$(src_so) "$(inst_so)" <.y !IF EXIST("srclib\openssl") +!IF EXIST("srclib\jansson") && EXIST("srclib\curl") + copy modules\md\$(LONG)\mod_md.$(src_so) "$(inst_so)" <.y + copy modules\md\$(LONG)\a2md.$(src_exe) "$(inst_exe)" <.y + -copy srclib\jansson\bin\jansson.$(src_dll) "$(inst_dll)" <.y + -copy srclib\curl\bin\libcurl.$(src_dll) "$(inst_dll)" <.y +!ENDIF # copy modules\session\$(LONG)\mod_session_crypto.$(src_so) "$(inst_so)" <.y copy modules\ssl\$(LONG)\mod_ssl.$(src_so) "$(inst_so)" <.y -copy srclib\openssl\$(SSLBIN)\libeay32.$(src_dll) "$(inst_dll)" <.y diff --git a/build/installwinconf.awk b/build/installwinconf.awk index e3ed08423d..8765eee0b2 100644 --- a/build/installwinconf.awk +++ b/build/installwinconf.awk @@ -159,6 +159,7 @@ BEGIN { print "#LoadModule log_forensic_module modules/mod_log_forensic.so" > dstfl; print "#LoadModule lua_module modules/mod_lua.so" > dstfl; print "#LoadModule macro_module modules/mod_macro.so" > dstfl; + print "#LoadModule md_module modules/mod_md.so" > dstfl; print "LoadModule mime_module modules/mod_mime.so" > dstfl; print "#LoadModule mime_magic_module modules/mod_mime_magic.so" > dstfl; print "LoadModule negotiation_module modules/mod_negotiation.so" > dstfl; diff --git a/modules/md/a2md.dsp b/modules/md/a2md.dsp new file mode 100644 index 0000000000..c60096ab3c --- /dev/null +++ b/modules/md/a2md.dsp @@ -0,0 +1,179 @@ +# Microsoft Developer Studio Project File - Name="a2md" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=a2md - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "a2md.mak". +!MESSAGE +!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 "a2md.mak" CFG="a2md - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "a2md - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "a2md - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "a2md - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /FD /c +# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../server/mpm/winnt" /I "../../srclib/openssl/inc32" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/jansson/include" /I "../../srclib/curl/include" /I "../core" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ssize_t=long" /Fd"Release\a2md_src" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /fo"Release/a2md.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d "APP_FILE" /d "BIN_NAME=a2md.exe" /d "LONG_NAME=a2md command line utility" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console +# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib libhttpd.lib libapr-1.lib libaprutil-1.lib libeay32.lib ssleay32.lib jansson.lib libcurl.lib /libpath:"../../Release/" /libpath:"../../srclib/apr/Release" /libpath:"../../srclib/apr-util/Release" /libpath:"../../srclib/openssl/out32dll" /libpath:"../../srclib/curl/lib" /libpath:"../../srclib/jansson/lib" /nologo /subsystem:console /debug /opt:ref +# Begin Special Build Tool +TargetPath=.\Release\a2md.exe +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);1 +# End Special Build Tool + +!ELSEIF "$(CFG)" == "a2md - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /FD /c +# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../srclib/apr/include" /I "../srclib/apr-util/include" /I "../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fd"Debug/a2md_src" /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /fo"Debug/a2md.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d "APP_FILE" /d "BIN_NAME=a2md.exe" /d "LONG_NAME=a2md command line utility" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib libhttpd.lib libapr-1.lib libaprutil-1.lib libeay32.lib ssleay32.lib jansson_d.lib libcurl.lib /libpath:"../../Debug/" /libpath:"../../srclib/apr/Debug" /libpath:"../../srclib/apr-util/Debug" /libpath:"../../srclib/openssl/out32dll" /libpath:"../../srclib/curl/lib" /libpath:"../../srclib/jansson/lib" /nologo /subsystem:console /debug /opt:ref +# Begin Special Build Tool +TargetPath=.\Debug\a2md.exe +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);1 +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "a2md - Win32 Release" +# Name "a2md - Win32 Debug" +# Begin Source File + +SOURCE=./md_cmd_main.c +# End Source File +# Begin Source File + +SOURCE=./md_cmd_acme.c +# End Source File +# Begin Source File + +SOURCE=./md_cmd_reg.c +# End Source File +# Begin Source File + +SOURCE=./md_cmd_store.c +# End Source File +# Begin Source File + +SOURCE=./md_core.c +# End Source File +# Begin Source File + +SOURCE=./md_crypt.c +# End Source File +# Begin Source File + +SOURCE=./md_curl.c +# End Source File +# Begin Source File + +SOURCE=./md_http.c +# End Source File +# Begin Source File + +SOURCE=./md_json.c +# End Source File +# Begin Source File + +SOURCE=./md_jws.c +# End Source File +# Begin Source File + +SOURCE=./md_log.c +# End Source File +# Begin Source File + +SOURCE=./md_reg.c +# End Source File +# Begin Source File + +SOURCE=./md_store.c +# End Source File +# Begin Source File + +SOURCE=./md_store_fs.c +# End Source File +# Begin Source File + +SOURCE=./md_util.c +# End Source File +# Begin Source File + +SOURCE=./md_acme.c +# End Source File +# Begin Source File + +SOURCE=./md_acme_acct.c +# End Source File +# Begin Source File + +SOURCE=./md_acme_authz.c +# End Source File +# Begin Source File + +SOURCE=./md_acme_drive.c +# End Source File +# Begin Source File + + +SOURCE=..\..\build\win32\httpd.rc +# End Source File +# End Target +# End Project diff --git a/modules/md/mod_md.dsp b/modules/md/mod_md.dsp new file mode 100644 index 0000000000..3f8b9fdbdf --- /dev/null +++ b/modules/md/mod_md.dsp @@ -0,0 +1,181 @@ +# Microsoft Developer Studio Project File - Name="mod_md" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=mod_md - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "mod_md.mak". +!MESSAGE +!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_md.mak" CFG="mod_md - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "mod_md - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "mod_md - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "mod_md - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "ssize_t=long" /FD /c +# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../server/mpm/winnt" "/I ../ssl" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/openssl/inc32" /I "../../srclib/jansson/include" /I "../../srclib/curl/include" /I "../core" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ssize_t=long" /Fd"Release\mod_md_src" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /fo"Release/mod_md.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d "BIN_NAME=mod_md.so" /d "LONG_NAME=Letsencrypt module for Apache" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /dll /out:".\Release\mod_md.so" /base:@..\..\os\win32\BaseAddr.ref,mod_md.so +# ADD LINK32 kernel32.lib libhttpd.lib libapr-1.lib libaprutil-1.lib ssleay32.lib libeay32.lib jansson.lib libcurl.lib /libpath:"../../srclib/apr/Release" /libpath:"../../srclib/apr-util/Release" /libpath:"../../Release/" /libpath:"../../srclib/openssl/out32dll" /libpath:"../../srclib/jansson/lib" /libpath:"../../srclib/curl/lib" /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Release\mod_md.so" /base:@..\..\os\win32\BaseAddr.ref,mod_md.so /opt:ref +# Begin Special Build Tool +TargetPath=.\Release\mod_md.so +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2 +# End Special Build Tool + +!ELSEIF "$(CFG)" == "mod_md - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "ssize_t=long" /FD /c +# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../ssl" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/openssl/inc32" /I "../../srclib/jansson/include" /I "../../srclib/curl/include" /I "../core" /src" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "ssize_t=long" /Fd"Debug\mod_md_src" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /fo"Debug/mod_md.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d "BIN_NAME=mod_md.so" /d "LONG_NAME=md_module for Apache" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Debug\mod_md.so" /base:@..\..\os\win32\BaseAddr.ref,mod_md.so +# ADD LINK32 kernel32.lib libhttpd.lib libapr-1.lib libaprutil-1.lib ssleay32.lib libeay32.lib jansson_d.lib libcurl.lib /nologo /subsystem:windows /dll /libpath:"../../srclib/openssl/out32dll" /libpath:"../../srclib/jansson/lib" /libpath:"../../srclib/curl/lib" /incremental:no /debug /out:".\Debug\mod_md.so" /base:@..\..\os\win32\BaseAddr.ref,mod_md.so +# Begin Special Build Tool +TargetPath=.\Debug\mod_md.so +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2 +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "mod_md - Win32 Release" +# Name "mod_md - Win32 Debug" +# Begin Source File + +SOURCE=./mod_md.c +# End Source File +# Begin Source File + +SOURCE=./mod_md_config.c +# End Source File +# Begin Source File + +SOURCE=./mod_md_os.c +# End Source File +# Begin Source File + +SOURCE=./md_core.c +# End Source File +# Begin Source File + +SOURCE=./md_crypt.c +# End Source File +# Begin Source File + +SOURCE=./md_curl.c +# End Source File +# Begin Source File + +SOURCE=./md_http.c +# End Source File +# Begin Source File + +SOURCE=./md_json.c +# End Source File +# Begin Source File + +SOURCE=./md_jws.c +# End Source File +# Begin Source File + +SOURCE=./md_log.c +# End Source File +# Begin Source File + +SOURCE=./md_reg.c +# End Source File +# Begin Source File + +SOURCE=./md_store.c +# End Source File +# Begin Source File + +SOURCE=./md_store_fs.c +# End Source File +# Begin Source File + +SOURCE=./md_util.c +# End Source File +# Begin Source File + + +SOURCE=./md_acme.c +# End Source File +# Begin Source File + +SOURCE=./md_acme_acct.c +# End Source File +# Begin Source File + +SOURCE=./md_acme_authz.c +# End Source File +# Begin Source File + +SOURCE=./md_acme_drive.c +# End Source File +# Begin Source File + + +SOURCE=..\..\build\win32\httpd.rc +# End Source File +# End Target +# End Project diff --git a/os/win32/BaseAddr.ref b/os/win32/BaseAddr.ref index c4b7d63b1f..0db86dae97 100644 --- a/os/win32/BaseAddr.ref +++ b/os/win32/BaseAddr.ref @@ -136,3 +136,4 @@ mod_proxy_http2.so 0x70CC0000 0x00030000 mod_http2.so 0x70D00000 0x00030000 mod_brotli.so 0x70D30000 0x000C0000 mod_proxy_hcheck.so 0x70DF0000 0x00020000 +mod_md.so 0x70E10000 0x00020000