Skip to content

Commit a54b3f9

Browse files
authored
Remove OpenSSL dependency (#15606) (#15973)
1 parent ed883e1 commit a54b3f9

32 files changed

+87
-803
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "Remove dependency ReactWindows.OpenSSL.StdCall.Static",
4+
"packageName": "react-native-windows",
5+
"email": "julio.rocha@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

vnext/Desktop.IntegrationTests/HttpOriginPolicyIntegrationTest.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
#include <CppRuntimeOptions.h>
77
#include <Networking/IHttpResource.h>
88
#include <Networking/OriginPolicy.h>
9-
#include <Test/HttpServer.h>
109

1110
// Standard Library
1211
#include <future>
1312

13+
#include "HttpServer.h"
14+
1415
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
1516

1617
namespace http = boost::beast::http;
@@ -110,7 +111,7 @@ TEST_CLASS(HttpOriginPolicyIntegrationTest)
110111

111112
case http::verb::options:
112113
default:
113-
Assert::Fail(L"Unsupported request method");
114+
Assert::Fail(L"Unsupported request method");
114115
}
115116

116117
return server;

vnext/Desktop.IntegrationTests/HttpResourceIntegrationTests.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include <Networking/IHttpResource.h>
1010
#include <Networking/OriginPolicy.h>
1111
#include <RuntimeOptions.h>
12-
#include <Test/HttpServer.h>
1312
#include <unicode.h>
1413

1514
// Boost Library
@@ -18,6 +17,8 @@
1817
// Standard Library
1918
#include <future>
2019

20+
#include "HttpServer.h"
21+
2122
using namespace Microsoft::React;
2223
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
2324

vnext/Test/HttpServer.cpp renamed to vnext/Desktop.IntegrationTests/HttpServer.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
// clang-format off
2+
3+
// C4996: 'gethostbyaddr': Use getnameinfo() or GetNameInfoW() instead
4+
#define _WINSOCK_DEPRECATED_NO_WARNINGS
5+
26
#include "HttpServer.h"
37

48
#include <boost/beast/core/multi_buffer.hpp>
@@ -360,7 +364,7 @@ void HttpServer::Start()
360364
Accept();
361365

362366
m_ioThreads.reserve(m_ioThreadCount);
363-
for (int i = 0; i < m_ioThreadCount; i++)
367+
for (size_t i = 0; i < m_ioThreadCount; i++)
364368
{
365369
m_ioThreads.emplace_back([self = shared_from_this()]()
366370
{
File renamed without changes.

vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,11 @@
113113
<ItemGroup>
114114
<ClCompile Include="HttpOriginPolicyIntegrationTest.cpp" />
115115
<ClCompile Include="HttpResourceIntegrationTests.cpp" />
116+
<ClCompile Include="HttpServer.cpp" />
116117
<ClCompile Include="Modules\TestDevSettingsModule.cpp" DisableSpecificWarnings="4996;%(DisableSpecificWarnings)" />
117118
<ClCompile Include="Modules\TestImageLoaderModule.cpp" DisableSpecificWarnings="4996;%(DisableSpecificWarnings)" />
118119
<ClCompile Include="WebSocketIntegrationTest.cpp" />
119-
<ClCompile Include="WebSocketResourcePerformanceTests.cpp" />
120+
<ClCompile Include="WebSocketServer.cpp" />
120121
</ItemGroup>
121122
<ItemGroup>
122123
<ProjectReference Include="..\Desktop.DLL\React.Windows.Desktop.DLL.vcxproj">
@@ -125,9 +126,6 @@
125126
<ProjectReference Include="..\IntegrationTests\React.Windows.IntegrationTests.vcxproj">
126127
<Project>{700A84FD-F92A-43F1-8D06-B0E0745DF9B5}</Project>
127128
</ProjectReference>
128-
<ProjectReference Include="..\Test\React.Windows.Test.vcxproj">
129-
<Project>{cd0415c6-d908-4212-9481-49be41f58d27}</Project>
130-
</ProjectReference>
131129
</ItemGroup>
132130
<ItemGroup>
133131
<!--
@@ -137,12 +135,13 @@
137135
<ReferenceCopyLocalPaths Include="$(OutDir)\..\React.Windows.Desktop.DLL\react-native-win32.dll" />
138136
</ItemGroup>
139137
<ItemGroup>
138+
<ClInclude Include="HttpServer.h" />
140139
<ClInclude Include="Modules\TestDevSettingsModule.h" />
141140
<ClInclude Include="Modules\TestImageLoaderModule.h" />
141+
<ClInclude Include="WebSocketServer.h" />
142142
</ItemGroup>
143143
<ItemGroup>
144144
<PackageReference Include="boost" Version="1.84.0.0" />
145-
<PackageReference Include="ReactWindows.OpenSSL.StdCall.Static" Version="1.0.2-p.5" />
146145
<!-- TODO: Remove!!! -->
147146
<PackageReference Include="Microsoft.Windows.CppWinRT" Version="$(CppWinRTVersion)" PrivateAssets="all" />
148147
<PackageReference Include="$(V8PackageName)" Version="$(V8Version)" Condition="'$(UseV8)' == 'true'" />

vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj.filters

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
<ClCompile Include="HttpResourceIntegrationTests.cpp">
2525
<Filter>Integration Tests</Filter>
2626
</ClCompile>
27-
<ClCompile Include="WebSocketResourcePerformanceTests.cpp">
28-
<Filter>Integration Tests</Filter>
29-
</ClCompile>
3027
<ClCompile Include="Modules\TestDevSettingsModule.cpp">
3128
<Filter>Source Files\Modules</Filter>
3229
</ClCompile>
@@ -36,6 +33,12 @@
3633
<ClCompile Include="HttpOriginPolicyIntegrationTest.cpp">
3734
<Filter>Integration Tests</Filter>
3835
</ClCompile>
36+
<ClCompile Include="HttpServer.cpp">
37+
<Filter>Source Files</Filter>
38+
</ClCompile>
39+
<ClCompile Include="WebSocketServer.cpp">
40+
<Filter>Source Files</Filter>
41+
</ClCompile>
3942
</ItemGroup>
4043
<ItemGroup>
4144
<ClInclude Include="Modules\TestDevSettingsModule.h">
@@ -44,5 +47,11 @@
4447
<ClInclude Include="Modules\TestImageLoaderModule.h">
4548
<Filter>Header Files\Modules</Filter>
4649
</ClInclude>
50+
<ClInclude Include="HttpServer.h">
51+
<Filter>Header Files</Filter>
52+
</ClInclude>
53+
<ClInclude Include="WebSocketServer.h">
54+
<Filter>Header Files</Filter>
55+
</ClInclude>
4756
</ItemGroup>
4857
</Project>

vnext/Desktop.IntegrationTests/WebSocketIntegrationTest.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@
44
// cspell:disable
55

66
// clang-format off
7+
8+
// C4996: 'gethostbyaddr': Use getnameinfo() or GetNameInfoW() instead
9+
#define _WINSOCK_DEPRECATED_NO_WARNINGS
10+
711
#include <CppUnitTest.h>
812
#include <Networking/IWebSocketResource.h>
9-
#include <Test/WebSocketServer.h>
1013

1114
// Standard Library
1215
#include <future>
1316

17+
#include "WebSocketServer.h"
18+
1419
using namespace Microsoft::React;
1520
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
1621

vnext/Desktop.IntegrationTests/WebSocketResourcePerformanceTests.cpp

Lines changed: 0 additions & 138 deletions
This file was deleted.

0 commit comments

Comments
 (0)