1- From 6f69b0440cf3eccda2bed832bd985287248ff6b3 Mon Sep 17 00:00:00 2001
1+ From 0fe38386a63c0294fa0a25766554d3430ea909b4 Mon Sep 17 00:00:00 2001
22From: Nehal J Wani <nehaljw.kkd1@gmail.com>
33Date: Sat, 24 Nov 2018 20:38:02 -0600
44Subject: [PATCH 05/24] Unvendor openssl
55
66Co-authored-by: Isuru Fernando <isuruf@gmail.com>
77---
8- PCbuild/_ssl.vcxproj | 3 --
9- PCbuild/_ssl.vcxproj.filters | 5 +---
10- PCbuild/openssl.props | 14 ++-------
11- PCbuild/openssl.vcxproj | 58 +-----------------------------------
12- PCbuild/python.props | 11 +------
13- PCbuild/python.vcxproj | 3 ++
14- PCbuild/pythonw.vcxproj | 5 +++-
15- 7 files changed, 12 insertions(+), 87 deletions(-)
8+ PCbuild/openssl.props | 14 ++------------
9+ PCbuild/openssl.vcxproj | 32 --------------------------------
10+ PCbuild/python.props | 11 +----------
11+ PCbuild/python.vcxproj | 3 +++
12+ PCbuild/pythonw.vcxproj | 3 +++
13+ 5 files changed, 9 insertions(+), 54 deletions(-)
1614
17- diff --git a/PCbuild/_ssl.vcxproj b/PCbuild/_ssl.vcxproj
18- index d4e1affab03..ce21f992ff8 100644
19- --- a/PCbuild/_ssl.vcxproj
20- +++ b/PCbuild/_ssl.vcxproj
21- @@ -99,9 +99,6 @@
22- </ItemDefinitionGroup>
23- <ItemGroup>
24- <ClCompile Include="..\Modules\_ssl.c" />
25- - <ClCompile Include="$(opensslIncludeDir)\applink.c">
26- - <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;$(PreprocessorDefinitions)</PreprocessorDefinitions>
27- - </ClCompile>
28- </ItemGroup>
29- <ItemGroup>
30- <ResourceCompile Include="..\PC\python_nt.rc" />
31- diff --git a/PCbuild/_ssl.vcxproj.filters b/PCbuild/_ssl.vcxproj.filters
32- index 716a69a41af..7e8e5800a0d 100644
33- --- a/PCbuild/_ssl.vcxproj.filters
34- +++ b/PCbuild/_ssl.vcxproj.filters
35- @@ -12,13 +12,10 @@
36- <ClCompile Include="..\Modules\_ssl.c">
37- <Filter>Source Files</Filter>
38- </ClCompile>
39- - <ClCompile Include="$(opensslIncludeDir)\applink.c">
40- - <Filter>Source Files</Filter>
41- - </ClCompile>
42- </ItemGroup>
43- <ItemGroup>
44- <ResourceCompile Include="..\PC\python_nt.rc">
45- <Filter>Resource Files</Filter>
46- </ResourceCompile>
47- </ItemGroup>
48- - </Project>
49- \ No newline at end of file
50- + </Project>
5115diff --git a/PCbuild/openssl.props b/PCbuild/openssl.props
5216index 5fd708b211e..044cefd95ea 100644
5317--- a/PCbuild/openssl.props
@@ -81,10 +45,10 @@ index 5fd708b211e..044cefd95ea 100644
8145- </Target>
8246 </Project>
8347diff --git a/PCbuild/openssl.vcxproj b/PCbuild/openssl.vcxproj
84- index 0da6f674958..b79f35b2c7d 100644
48+ index 7ca750dda8f..17eee400ebb 100644
8549--- a/PCbuild/openssl.vcxproj
8650+++ b/PCbuild/openssl.vcxproj
87- @@ -60,64 +60,8 @@
51+ @@ -60,40 +60,8 @@
8852 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
8953 <Import Project="pyproject.props" />
9054
@@ -95,47 +59,23 @@ index 0da6f674958..b79f35b2c7d 100644
9559- set VCINSTALLDIR=$(VCInstallDir)
9660- if not exist "$(IntDir.TrimEnd('\'))" mkdir "$(IntDir.TrimEnd('\'))"
9761- cd /D "$(IntDir.TrimEnd('\'))"
98- - $(Perl) "$(opensslDir)\configure" $(OpenSSLPlatform) no-asm
62+ - $(Perl) "$(opensslDir)\configure" $(OpenSSLPlatform) no-asm no-uplink
9963- nmake
10064- </NMakeBuildCommandLine>
10165- </PropertyGroup>
10266-
10367 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
10468
105- - <Target Name="_PatchUplink" BeforeTargets="Build">
106- - <PropertyGroup>
107- - <Uplink>$(opensslDir)\ms\uplink.c</Uplink>
108- - <BeforePatch>((h = GetModuleHandle(NULL)) == NULL)</BeforePatch>
109- - <AfterPatch>((h = GetModuleHandleA("_ssl.pyd")) == NULL) if ((h = GetModuleHandleA("_ssl_d.pyd")) == NULL) if ((h = GetModuleHandle(NULL)) == NULL /*patched*/)</AfterPatch>
110- - </PropertyGroup>
111- - <Error Text="Cannot find $(Uplink)" Condition="!Exists($(Uplink))" />
112- - <PropertyGroup>
113- - <_Original>$([System.IO.File]::ReadAllText($(Uplink)))</_Original>
114- - <_Patched>$(_Original.Replace($(BeforePatch), $(AfterPatch)))</_Patched>
115- - <IsPatched>false</IsPatched>
116- - <IsPatched Condition="$(_Patched) == $(_Original)">true</IsPatched>
117- - </PropertyGroup>
118- - <Message Text="$(Uplink) is already patched" Importance="normal" Condition="$(IsPatched)" />
119- - <Message Text="Patching $(Uplink)" Importance="high" Condition="!$(IsPatched)" />
120- - <WriteLinesToFile File="$(Uplink)"
121- - Lines="$(_Patched)"
122- - Overwrite="true"
123- - Encoding="ASCII"
124- - Condition="!$(IsPatched)" />
125- - </Target>
126- -
12769- <Target Name="_CopyToOutput" AfterTargets="Build">
12870- <ItemGroup>
12971- <_Built Include="$(opensslDir)\LICENSE" />
13072- <_Built Include="$(IntDir)\libcrypto.lib;$(IntDir)\libcrypto-*.dll;$(IntDir)\libcrypto-*.pdb" />
13173- <_Built Include="$(IntDir)\libssl.lib;$(IntDir)\libssl-*.dll;$(IntDir)\libssl-*.pdb" />
132- - <_AppLink Include="$(opensslDir)\ms\applink.c" />
13374- <_Include Include="$(opensslDir)\Include\openssl\*.h" />
13475- <_Include Include="$(IntDir)\include\openssl\*.h" />
13576- </ItemGroup>
13677- <MakeDir Directories="$(opensslOutDir)\include\openssl" />
13778- <Copy SourceFiles="@(_Built)" DestinationFolder="$(opensslOutDir)" />
138- - <Copy SourceFiles="@(_AppLink)" DestinationFolder="$(opensslOutDir)\include" />
13979- <Copy SourceFiles="@(_Include)" DestinationFolder="$(opensslOutDir)\include\openssl" />
14080- </Target>
14181-
@@ -149,15 +89,8 @@ index 0da6f674958..b79f35b2c7d 100644
14989 <Target Name="Clean" />
15090 <Target Name="CleanAll">
15191 <Delete Files="$(TargetPath);$(BuildPath)$(tclDLLName)" />
152- @@ -136,4 +80,4 @@ nmake
153- </Target>
154-
155- <Target Name="ResolveAssemblyReferences" />
156- - </Project>
157- \ No newline at end of file
158- + </Project>
15992diff --git a/PCbuild/python.props b/PCbuild/python.props
160- index c8ecdb4515a ..0ec0914facd 100644
93+ index 42f11754218 ..0ec0914facd 100644
16194--- a/PCbuild/python.props
16295+++ b/PCbuild/python.props
16396@@ -61,6 +61,7 @@
@@ -172,15 +105,15 @@ index c8ecdb4515a..0ec0914facd 100644
172105 <Import Project="$(ExternalProps)" Condition="$(ExternalProps) != '' and Exists('$(ExternalProps)')" />
173106
174107 <PropertyGroup>
175- - <sqlite3Dir Condition="$(sqlite3Dir) == ''">$(ExternalsDir)sqlite-3.45.3 .0\</sqlite3Dir>
108+ - <sqlite3Dir Condition="$(sqlite3Dir) == ''">$(ExternalsDir)sqlite-3.49.1 .0\</sqlite3Dir>
176109- <bz2Dir Condition="$(bz2Dir) == ''">$(ExternalsDir)bzip2-1.0.8\</bz2Dir>
177110- <lzmaDir Condition="$(lzmaDir) == ''">$(ExternalsDir)xz-5.2.5\</lzmaDir>
178111- <libffiDir Condition="$(libffiDir) == ''">$(ExternalsDir)libffi-3.4.4\</libffiDir>
179112- <libffiOutDir Condition="$(libffiOutDir) == ''">$(libffiDir)$(ArchName)\</libffiOutDir>
180113- <libffiIncludeDir Condition="$(libffiIncludeDir) == ''">$(libffiOutDir)include</libffiIncludeDir>
181114 <mpdecimalDir Condition="$(mpdecimalDir) == ''">$(ExternalsDir)\mpdecimal-4.0.0\</mpdecimalDir>
182- - <opensslDir Condition="$(opensslDir) == ''">$(ExternalsDir)openssl-3.0.15 \</opensslDir>
183- - <opensslOutDir Condition="$(opensslOutDir) == ''">$(ExternalsDir)openssl-bin-3.0.15 \$(ArchName)\</opensslOutDir>
115+ - <opensslDir Condition="$(opensslDir) == ''">$(ExternalsDir)openssl-3.0.16 \</opensslDir>
116+ - <opensslOutDir Condition="$(opensslOutDir) == ''">$(ExternalsDir)openssl-bin-3.0.16.2 \$(ArchName)\</opensslOutDir>
184117- <opensslIncludeDir Condition="$(opensslIncludeDir) == ''">$(opensslOutDir)include</opensslIncludeDir>
185118 <nasmDir Condition="$(nasmDir) == ''">$(ExternalsDir)\nasm-2.11.06\</nasmDir>
186119- <zlibDir Condition="$(zlibDir) == ''">$(ExternalsDir)\zlib-1.3.1\</zlibDir>
@@ -202,7 +135,7 @@ index 4a99ffc677c..b11fb617963 100644
202135 <ItemGroup>
203136 <ProjectReference Include="pythoncore.vcxproj">
204137diff --git a/PCbuild/pythonw.vcxproj b/PCbuild/pythonw.vcxproj
205- index d08c210ef8a..58a9e852bed 100644
138+ index d08c210ef8a..87f71ca59d1 100644
206139--- a/PCbuild/pythonw.vcxproj
207140+++ b/PCbuild/pythonw.vcxproj
208141@@ -102,6 +102,9 @@
@@ -215,10 +148,3 @@ index d08c210ef8a..58a9e852bed 100644
215148 </ItemGroup>
216149 <ItemGroup>
217150 <ProjectReference Include="pythoncore.vcxproj">
218- @@ -112,4 +115,4 @@
219- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
220- <ImportGroup Label="ExtensionTargets">
221- </ImportGroup>
222- - </Project>
223- \ No newline at end of file
224- + </Project>
0 commit comments