Skip to content

Commit 7f8af89

Browse files
committed
Crypto: Replace OpenSSL with Crypto++
1 parent 9a47507 commit 7f8af89

28 files changed

+805
-155
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@
3434
[submodule "src/Externals/FreeImage"]
3535
path = src/Externals/FreeImage
3636
url = https://github.com/OpenXRay/ext-win-freeimage.git
37+
[submodule "src/Externals/cryptopp"]
38+
path = src/Externals/cryptopp
39+
url = https://github.com/weidai11/cryptopp.git

src/Common.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
</PropertyGroup>
4242
<ItemDefinitionGroup>
4343
<ClCompile>
44-
<AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);$(xrSdkDir)include;$(DXSDK_DIR)Include;$(SolutionDir)Externals\luajit\src;$(SolutionDir)Externals\luabind;$(SolutionDir)Externals\GameSpy\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
44+
<AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);$(xrSdkDir)include;$(SolutionDir)Externals;$(DXSDK_DIR)Include;$(SolutionDir)Externals\luajit\src;$(SolutionDir)Externals\luabind;$(SolutionDir)Externals\GameSpy\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
4545
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
4646
<!--
4747
4251 : class 'x' needs to have dll-interface to be used by clients of class 'y'

src/Externals/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ MagicSoftware
55
maya
66
nvapi
77
OpenAutomate
8-
OpenSSL

src/Externals/cryptdll.vcxproj

Lines changed: 280 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,280 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Debug|x64">
9+
<Configuration>Debug</Configuration>
10+
<Platform>x64</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Release|Win32">
13+
<Configuration>Release</Configuration>
14+
<Platform>Win32</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<ProjectGuid>{94a428a1-9ba8-4db2-b76e-bd2e3c08f257}</ProjectGuid>
23+
<RootNamespace>cryptdll</RootNamespace>
24+
<PlatformToolset>v140</PlatformToolset>
25+
<ConfigurationType>DynamicLibrary</ConfigurationType>
26+
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
27+
</PropertyGroup>
28+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
29+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
30+
<ImportGroup Label="ExtensionSettings" />
31+
<ImportGroup Label="PropertySheets">
32+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
33+
</ImportGroup>
34+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
35+
<Import Project="..\Common.props" />
36+
</ImportGroup>
37+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
38+
<Import Project="..\Common.props" />
39+
</ImportGroup>
40+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
41+
<Import Project="..\Common.props" />
42+
</ImportGroup>
43+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
44+
<Import Project="..\Common.props" />
45+
</ImportGroup>
46+
<PropertyGroup Label="UserMacros" />
47+
<!-- End of Visual Studio boilerplate -->
48+
<!-- All Configurations -->
49+
<PropertyGroup Label="All Configurations">
50+
<ConfigurationType>DynamicLibrary</ConfigurationType>
51+
<TargetName>cryptopp</TargetName>
52+
<TargetExt>.dll</TargetExt>
53+
<UseOfMfc>false</UseOfMfc>
54+
<CharacterSet>MultiByte</CharacterSet>
55+
<WholeProgramOptimization>true</WholeProgramOptimization>
56+
</PropertyGroup>
57+
<!-- All Configurations -->
58+
<ItemDefinitionGroup Label="All Configurations">
59+
<ClCompile>
60+
<SuppressStartupBanner>true</SuppressStartupBanner>
61+
<ErrorReporting>None</ErrorReporting>
62+
<WarningLevel>Level4</WarningLevel>
63+
<PrecompiledHeader>Use</PrecompiledHeader>
64+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
65+
</ClCompile>
66+
<Link>
67+
<ErrorReporting>NoErrorReport</ErrorReporting>
68+
<GenerateDebugInformation>true</GenerateDebugInformation>
69+
<ProgramDatabaseFile>$(OutDir)\cryptopp.pdb</ProgramDatabaseFile>
70+
<BaseAddress>0x42900000</BaseAddress>
71+
<RandomizedBaseAddress>false</RandomizedBaseAddress>
72+
<PreventDllBinding>true</PreventDllBinding>
73+
</Link>
74+
</ItemDefinitionGroup>
75+
<!-- Debug Configurations -->
76+
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'" Label="Debug Configuration">
77+
<ClCompile>
78+
<PreprocessorDefinitions>CRYPTOPP_EXPORTS;USE_PRECOMPILED_HEADERS</PreprocessorDefinitions>
79+
<Optimization>Disabled</Optimization>
80+
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
81+
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
82+
<IntrinsicFunctions>true</IntrinsicFunctions>
83+
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
84+
</ClCompile>
85+
<ResourceCompile>
86+
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
87+
<Culture>0x0409</Culture>
88+
</ResourceCompile>
89+
</ItemDefinitionGroup>
90+
<!-- Release Configurations -->
91+
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'" Label="Release Configuration">
92+
<ClCompile>
93+
<PreprocessorDefinitions>NDEBUG;CRYPTOPP_EXPORTS;USE_PRECOMPILED_HEADERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
94+
<OmitFramePointers>true</OmitFramePointers>
95+
<Optimization>MaxSpeed</Optimization>
96+
<IntrinsicFunctions>true</IntrinsicFunctions>
97+
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
98+
<FunctionLevelLinking>true</FunctionLevelLinking>
99+
<StringPooling>true</StringPooling>
100+
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
101+
</ClCompile>
102+
<ResourceCompile>
103+
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
104+
<Culture>0x0409</Culture>
105+
</ResourceCompile>
106+
<Link>
107+
<OptimizeReferences>true</OptimizeReferences>
108+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
109+
</Link>
110+
</ItemDefinitionGroup>
111+
<!-- X86 Configurations -->
112+
<ItemDefinitionGroup Condition="'$(Platform)'=='Win32'" Label="X86 Configuration">
113+
<ClCompile>
114+
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
115+
</ClCompile>
116+
<Link>
117+
<TargetMachine>MachineX86</TargetMachine>
118+
<ImageHasSafeExceptionHandlers>true</ImageHasSafeExceptionHandlers>
119+
</Link>
120+
</ItemDefinitionGroup>
121+
<!-- X64 Configurations -->
122+
<ItemDefinitionGroup Condition="'$(Platform)'=='x64'" Label="X64 Configuration">
123+
<ClCompile>
124+
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
125+
</ClCompile>
126+
<Link>
127+
<TargetMachine>MachineX64</TargetMachine>
128+
</Link>
129+
</ItemDefinitionGroup>
130+
<!-- Original File with special treatment -->
131+
<ItemGroup>
132+
<CustomBuild Condition="'$(Platform)'=='x64' AND ('$(Configuration)'=='Debug' Or '$(Configuration)'=='Release')" Include="cryptopp\x64dll.asm">
133+
<Message>Building and assembling x64dll.asm</Message>
134+
<Command>ml64.exe /c /nologo /D_M_X64 /W3 /Zi /Fo"$(IntDir)x64dll.obj" "%(FullPath)"</Command>
135+
<Outputs>$(IntDir)x64dll.obj;%(Outputs)</Outputs>
136+
</CustomBuild>
137+
</ItemGroup>
138+
<!-- Source Files -->
139+
<ItemGroup>
140+
<ClCompile Include="cryptopp\pch.cpp">
141+
<PrecompiledHeader>Create</PrecompiledHeader>
142+
</ClCompile>
143+
<ClCompile Include="cryptopp\dll.cpp">
144+
<PrecompiledHeader />
145+
</ClCompile>
146+
<ClCompile Include="cryptopp\iterhash.cpp">
147+
<PrecompiledHeader />
148+
</ClCompile>
149+
<ClCompile Include="cryptopp\algebra.cpp" />
150+
<ClCompile Include="cryptopp\algparam.cpp" />
151+
<ClCompile Include="cryptopp\asn.cpp" />
152+
<ClCompile Include="cryptopp\authenc.cpp" />
153+
<ClCompile Include="cryptopp\basecode.cpp" />
154+
<ClCompile Include="cryptopp\cbcmac.cpp" />
155+
<ClCompile Include="cryptopp\ccm.cpp" />
156+
<ClCompile Include="cryptopp\channels.cpp" />
157+
<ClCompile Include="cryptopp\cmac.cpp" />
158+
<ClCompile Include="cryptopp\cpu.cpp" />
159+
<ClCompile Include="cryptopp\cryptlib.cpp" />
160+
<ClCompile Include="cryptopp\des.cpp" />
161+
<ClCompile Include="cryptopp\dessp.cpp" />
162+
<ClCompile Include="cryptopp\dh.cpp" />
163+
<ClCompile Include="cryptopp\dsa.cpp" />
164+
<ClCompile Include="cryptopp\ec2n.cpp" />
165+
<ClCompile Include="cryptopp\eccrypto.cpp" />
166+
<ClCompile Include="cryptopp\ecp.cpp" />
167+
<ClCompile Include="cryptopp\emsa2.cpp" />
168+
<ClCompile Include="cryptopp\eprecomp.cpp" />
169+
<ClCompile Include="cryptopp\files.cpp" />
170+
<ClCompile Include="cryptopp\filters.cpp" />
171+
<ClCompile Include="cryptopp\fips140.cpp" />
172+
<ClCompile Include="cryptopp\fipstest.cpp" />
173+
<ClCompile Include="cryptopp\gcm.cpp" />
174+
<ClCompile Include="cryptopp\gf2n.cpp" />
175+
<ClCompile Include="cryptopp\gfpcrypt.cpp" />
176+
<ClCompile Include="cryptopp\hex.cpp" />
177+
<ClCompile Include="cryptopp\hmac.cpp" />
178+
<ClCompile Include="cryptopp\hrtimer.cpp" />
179+
<ClCompile Include="cryptopp\integer.cpp" />
180+
<ClCompile Include="cryptopp\misc.cpp" />
181+
<ClCompile Include="cryptopp\modes.cpp" />
182+
<ClCompile Include="cryptopp\mqueue.cpp" />
183+
<ClCompile Include="cryptopp\nbtheory.cpp" />
184+
<ClCompile Include="cryptopp\oaep.cpp" />
185+
<ClCompile Include="cryptopp\osrng.cpp" />
186+
<ClCompile Include="cryptopp\pkcspad.cpp" />
187+
<ClCompile Include="cryptopp\pssr.cpp" />
188+
<ClCompile Include="cryptopp\pubkey.cpp" />
189+
<ClCompile Include="cryptopp\queue.cpp" />
190+
<ClCompile Include="cryptopp\randpool.cpp" />
191+
<ClCompile Include="cryptopp\rdtables.cpp" />
192+
<ClCompile Include="cryptopp\rijndael.cpp" />
193+
<ClCompile Include="cryptopp\rng.cpp" />
194+
<ClCompile Include="cryptopp\rsa.cpp" />
195+
<ClCompile Include="cryptopp\rw.cpp" />
196+
<ClCompile Include="cryptopp\sha.cpp" />
197+
<ClCompile Include="cryptopp\simple.cpp" />
198+
<ClCompile Include="cryptopp\skipjack.cpp" />
199+
<ClCompile Include="cryptopp\strciphr.cpp" />
200+
<ClCompile Include="cryptopp\trdlocal.cpp" />
201+
</ItemGroup>
202+
<!-- Header Files -->
203+
<ItemGroup>
204+
<ClInclude Include="cryptopp\aes.h" />
205+
<ClInclude Include="cryptopp\algebra.h" />
206+
<ClInclude Include="cryptopp\algparam.h" />
207+
<ClInclude Include="cryptopp\argnames.h" />
208+
<ClInclude Include="cryptopp\asn.h" />
209+
<ClInclude Include="cryptopp\authenc.h" />
210+
<ClInclude Include="cryptopp\basecode.h" />
211+
<ClInclude Include="cryptopp\cbcmac.h" />
212+
<ClInclude Include="cryptopp\ccm.h" />
213+
<ClInclude Include="cryptopp\channels.h" />
214+
<ClInclude Include="cryptopp\cmac.h" />
215+
<ClInclude Include="cryptopp\config.h" />
216+
<ClInclude Include="cryptopp\cpu.h" />
217+
<ClInclude Include="cryptopp\cryptlib.h" />
218+
<ClInclude Include="cryptopp\des.h" />
219+
<ClInclude Include="cryptopp\dh.h" />
220+
<ClInclude Include="cryptopp\dll.h" />
221+
<ClInclude Include="cryptopp\dsa.h" />
222+
<ClInclude Include="cryptopp\ec2n.h" />
223+
<ClInclude Include="cryptopp\eccrypto.h" />
224+
<ClInclude Include="cryptopp\ecp.h" />
225+
<ClInclude Include="cryptopp\ecpoint.h" />
226+
<ClInclude Include="cryptopp\emsa2.h" />
227+
<ClInclude Include="cryptopp\eprecomp.h" />
228+
<ClInclude Include="cryptopp\files.h" />
229+
<ClInclude Include="cryptopp\filters.h" />
230+
<ClInclude Include="cryptopp\fips140.h" />
231+
<ClInclude Include="cryptopp\fltrimpl.h" />
232+
<ClInclude Include="cryptopp\gcm.h" />
233+
<ClInclude Include="cryptopp\gf2n.h" />
234+
<ClInclude Include="cryptopp\gfpcrypt.h" />
235+
<ClInclude Include="cryptopp\hex.h" />
236+
<ClInclude Include="cryptopp\hmac.h" />
237+
<ClInclude Include="cryptopp\integer.h" />
238+
<ClInclude Include="cryptopp\iterhash.h" />
239+
<ClInclude Include="cryptopp\mdc.h" />
240+
<ClInclude Include="cryptopp\misc.h" />
241+
<ClInclude Include="cryptopp\modarith.h" />
242+
<ClInclude Include="cryptopp\modes.h" />
243+
<ClInclude Include="cryptopp\modexppc.h" />
244+
<ClInclude Include="cryptopp\mqueue.h" />
245+
<ClInclude Include="cryptopp\mqv.h" />
246+
<ClInclude Include="cryptopp\nbtheory.h" />
247+
<ClInclude Include="cryptopp\oaep.h" />
248+
<ClInclude Include="cryptopp\oids.h" />
249+
<ClInclude Include="cryptopp\osrng.h" />
250+
<ClInclude Include="cryptopp\pch.h" />
251+
<ClInclude Include="cryptopp\pkcspad.h" />
252+
<ClInclude Include="cryptopp\pssr.h" />
253+
<ClInclude Include="cryptopp\pubkey.h" />
254+
<ClInclude Include="cryptopp\queue.h" />
255+
<ClInclude Include="cryptopp\randpool.h" />
256+
<ClInclude Include="cryptopp\rijndael.h" />
257+
<ClInclude Include="cryptopp\rng.h" />
258+
<ClInclude Include="cryptopp\rsa.h" />
259+
<ClInclude Include="cryptopp\rw.h" />
260+
<ClInclude Include="cryptopp\secblock.h" />
261+
<ClInclude Include="cryptopp\seckey.h" />
262+
<ClInclude Include="cryptopp\sha.h" />
263+
<ClInclude Include="cryptopp\simple.h" />
264+
<ClInclude Include="cryptopp\skipjack.h" />
265+
<ClInclude Include="cryptopp\smartptr.h" />
266+
<ClInclude Include="cryptopp\stdcpp.h" />
267+
<ClInclude Include="cryptopp\strciphr.h" />
268+
<ClInclude Include="cryptopp\trap.h" />
269+
<ClInclude Include="cryptopp\trdlocal.h" />
270+
<ClInclude Include="cryptopp\words.h" />
271+
</ItemGroup>
272+
<!-- Back to Visual Studio boilerplate -->
273+
<ItemGroup>
274+
<ResourceCompile Include="cryptopp\cryptopp.rc" />
275+
</ItemGroup>
276+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
277+
<ImportGroup Label="ExtensionTargets">
278+
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
279+
</ImportGroup>
280+
</Project>

0 commit comments

Comments
 (0)