backport EVPPKey file/stream load/save capabilities

This commit is contained in:
Alex Fabijanic 2017-09-19 22:04:32 -05:00
parent dbd82953cb
commit ab90c48da2
55 changed files with 1244 additions and 832 deletions

View File

@ -20,7 +20,7 @@
CharacterSet="1">
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;exit 0"/>
CommandLine="xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib\* 1&gt;nul&#xA;exit 0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
@ -99,7 +99,7 @@
CharacterSet="2">
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;exit 0"/>
CommandLine="xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib\* 1&gt;nul&#xA;exit 0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
@ -179,7 +179,7 @@
CharacterSet="1">
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.pdb ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;exit 0"/>
CommandLine="xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.lib ..\lib\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.pdb ..\lib\* 1&gt;nul&#xA;exit 0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
@ -245,7 +245,7 @@
CharacterSet="1">
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy /y ..\openssl\VS_120\win32\lib\release\*32MT.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;exit 0"/>
CommandLine="xcopy /y ..\openssl\VS_120\win32\lib\release\*32MT.lib ..\lib\* 1&gt;nul&#xA;exit 0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
@ -312,7 +312,7 @@
CharacterSet="1">
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;exit 0"/>
CommandLine="xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib\* 1&gt;nul&#xA;exit 0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
@ -378,7 +378,7 @@
CharacterSet="1">
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;exit 0"/>
CommandLine="xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib\* 1&gt;nul&#xA;exit 0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool

View File

@ -20,7 +20,7 @@
CharacterSet="2">
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;exit 0"/>
CommandLine="xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib\* 1&gt;nul&#xA;exit 0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
@ -91,7 +91,7 @@
CharacterSet="2">
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;exit 0"/>
CommandLine="xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib\* 1&gt;nul&#xA;exit 0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
@ -165,7 +165,7 @@
CharacterSet="2">
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.pdb ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;exit 0"/>
CommandLine="xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.lib ..\lib\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.pdb ..\lib\* 1&gt;nul&#xA;exit 0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
@ -223,7 +223,7 @@
CharacterSet="2">
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy /y ..\openssl\VS_120\win32\lib\release\*32MT.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;exit 0"/>
CommandLine="xcopy /y ..\openssl\VS_120\win32\lib\release\*32MT.lib ..\lib\* 1&gt;nul&#xA;exit 0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
@ -282,7 +282,7 @@
CharacterSet="2">
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;exit 0"/>
CommandLine="xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib\* 1&gt;nul&#xA;exit 0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
@ -340,7 +340,7 @@
CharacterSet="2">
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;exit 0"/>
CommandLine="xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib\* 1&gt;nul&#xA;exit 0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool

View File

@ -2,58 +2,58 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Cipher">
<UniqueIdentifier>{52a87638-79b0-4c5b-a43e-28b013024276}</UniqueIdentifier>
<UniqueIdentifier>{dfa444ea-d828-4f53-bb72-bc28df30934f}</UniqueIdentifier>
</Filter>
<Filter Include="Cipher\Header Files">
<UniqueIdentifier>{0da5c65a-0145-4344-b8f5-46fcdb774247}</UniqueIdentifier>
<UniqueIdentifier>{eff875da-7db3-4aaa-9eb0-ce9d44a5196f}</UniqueIdentifier>
</Filter>
<Filter Include="Cipher\Source Files">
<UniqueIdentifier>{66968020-91f9-49bb-8ea3-68bd104f16bd}</UniqueIdentifier>
<UniqueIdentifier>{4286f389-2b20-4834-87c3-64ef736fbcd8}</UniqueIdentifier>
</Filter>
<Filter Include="RSA">
<UniqueIdentifier>{704039ee-6735-4f52-b6d1-ad53782324f5}</UniqueIdentifier>
<UniqueIdentifier>{5374021e-f4d6-41f2-917f-f2968bcd969a}</UniqueIdentifier>
</Filter>
<Filter Include="RSA\Header Files">
<UniqueIdentifier>{a06d38bd-be92-4b32-a5cf-7467c7372b53}</UniqueIdentifier>
<UniqueIdentifier>{dd5e126e-c600-4924-bf2b-cf2685654e71}</UniqueIdentifier>
</Filter>
<Filter Include="RSA\Source Files">
<UniqueIdentifier>{692f74eb-12ba-4ae9-9894-4cdb28706603}</UniqueIdentifier>
<UniqueIdentifier>{605aa85b-e876-4d73-ac9b-ecc9cb6fe642}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate">
<UniqueIdentifier>{f04a635d-4f69-4c9f-8596-f6cda82f83fe}</UniqueIdentifier>
<UniqueIdentifier>{32bb879f-1bfd-4cbd-b8ed-038d8105b9e4}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate\Header Files">
<UniqueIdentifier>{7a574bf6-0c83-4dc6-a3b2-0a53fb3b708c}</UniqueIdentifier>
<UniqueIdentifier>{5514fa19-e7be-49f4-925f-673936ff1d68}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate\Source Files">
<UniqueIdentifier>{820f4b9a-9fc0-410e-88de-2939a931d14d}</UniqueIdentifier>
<UniqueIdentifier>{e98b2d02-aff7-4439-9427-3e847dd4a81d}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore">
<UniqueIdentifier>{c929c29d-645d-4664-9fc7-b0096b6fc8e7}</UniqueIdentifier>
<UniqueIdentifier>{9e6414dc-b910-4a4e-9452-8d450d4b0813}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore\Header Files">
<UniqueIdentifier>{954fe408-8d04-49df-a9c5-33e1b1d727c3}</UniqueIdentifier>
<UniqueIdentifier>{e23d9365-dd4c-4f33-9722-ffbe05127de1}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore\Source Files">
<UniqueIdentifier>{a8a27d00-a02f-49e4-b279-7b1264fd0b1b}</UniqueIdentifier>
<UniqueIdentifier>{ca8f048a-7e1a-4a4f-bf12-2b6a696d2310}</UniqueIdentifier>
</Filter>
<Filter Include="Digest">
<UniqueIdentifier>{219baece-b662-4931-be03-28b56481c95c}</UniqueIdentifier>
<UniqueIdentifier>{8948ba96-8cfb-4207-ab6b-f025bee4c8b5}</UniqueIdentifier>
</Filter>
<Filter Include="Digest\Header Files">
<UniqueIdentifier>{0a4096ea-dbb6-4fbb-93e4-5d28b1642137}</UniqueIdentifier>
<UniqueIdentifier>{f0c253ba-71c2-4fd2-acd0-a26212204866}</UniqueIdentifier>
</Filter>
<Filter Include="Digest\Source Files">
<UniqueIdentifier>{5ddac9a1-0f80-49b4-9189-18963a89d474}</UniqueIdentifier>
<UniqueIdentifier>{7595732a-16f7-45c4-9fcb-0cb74ffcaf8e}</UniqueIdentifier>
</Filter>
<Filter Include="EC">
<UniqueIdentifier>{e34aafa6-7051-446d-bb28-c973411e8c58}</UniqueIdentifier>
<UniqueIdentifier>{555b26b6-3021-4788-8d72-64dfa5b309b4}</UniqueIdentifier>
</Filter>
<Filter Include="EC\Header Files">
<UniqueIdentifier>{58d8e2e8-4055-48ae-ba83-f79ef796b976}</UniqueIdentifier>
<UniqueIdentifier>{b80fd2cc-7eb6-4c0b-a5cf-1b266cff4637}</UniqueIdentifier>
</Filter>
<Filter Include="EC\Source Files">
<UniqueIdentifier>{5175debb-478d-4bcc-af9d-54586e4f9c1e}</UniqueIdentifier>
<UniqueIdentifier>{e27eaa4c-22ed-4f39-b075-cbb08a17bf59}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -103,8 +103,8 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -141,8 +141,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -182,8 +182,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.pdb ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.lib ..\lib\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.pdb ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -212,7 +212,7 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\lib\release\*32MT.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\lib\release\*32MT.lib ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -242,8 +242,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -272,8 +272,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>

View File

@ -2,58 +2,58 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Cipher">
<UniqueIdentifier>{de0c4809-96f7-4d8e-aeb5-662fc48aad3d}</UniqueIdentifier>
<UniqueIdentifier>{c24d0a01-7fad-4742-9227-8c7427aac7c5}</UniqueIdentifier>
</Filter>
<Filter Include="Cipher\Header Files">
<UniqueIdentifier>{94fd2b37-0a0c-4189-b3ab-3c5a11454416}</UniqueIdentifier>
<UniqueIdentifier>{9457f2f8-8fdc-41ee-b57a-37fc1edc9876}</UniqueIdentifier>
</Filter>
<Filter Include="Cipher\Source Files">
<UniqueIdentifier>{f1fb979a-57ca-46b5-bd1d-4d648b5e8107}</UniqueIdentifier>
<UniqueIdentifier>{3bf44e1e-7018-414b-88bf-a48b43eb321f}</UniqueIdentifier>
</Filter>
<Filter Include="RSA">
<UniqueIdentifier>{d47eb973-6e17-4962-abc1-29d43d5d1cfc}</UniqueIdentifier>
<UniqueIdentifier>{057fd60a-0af2-4c14-b77f-c9d5e49f4d40}</UniqueIdentifier>
</Filter>
<Filter Include="RSA\Header Files">
<UniqueIdentifier>{f455f3cf-ec25-4ca0-9006-13104ddd3820}</UniqueIdentifier>
<UniqueIdentifier>{1bf447a6-d238-4074-8dd5-c64af9cadda0}</UniqueIdentifier>
</Filter>
<Filter Include="RSA\Source Files">
<UniqueIdentifier>{80889b15-db9b-4dbe-8c83-a034ba4210a1}</UniqueIdentifier>
<UniqueIdentifier>{6dea2c1d-11cd-4fdb-a848-fcf6a0d45c7c}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate">
<UniqueIdentifier>{8866f83a-7c8f-487e-8d82-9f0dbdab5980}</UniqueIdentifier>
<UniqueIdentifier>{47bc0ff9-85ef-4a9d-a1de-310e414964ef}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate\Header Files">
<UniqueIdentifier>{268bc325-f7c1-43c3-aee5-5da23547097b}</UniqueIdentifier>
<UniqueIdentifier>{2538c671-f9e3-4fa2-a21b-b132d0171ea6}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate\Source Files">
<UniqueIdentifier>{bba8395b-6d43-492f-9e03-59b72c368301}</UniqueIdentifier>
<UniqueIdentifier>{135dc8f2-c326-42af-b409-163388e7358c}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore">
<UniqueIdentifier>{9b9fe10a-6fe3-4a88-b8a9-e368ba7fc214}</UniqueIdentifier>
<UniqueIdentifier>{41abc44b-05de-4ccc-a145-39201de9fd3b}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore\Header Files">
<UniqueIdentifier>{2815a4aa-14f5-4d2a-8812-845f777e53b9}</UniqueIdentifier>
<UniqueIdentifier>{b805b9b7-679c-4d2e-bad8-6cc7b5fb6305}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore\Source Files">
<UniqueIdentifier>{7164b269-e5fc-4922-8b47-791fd3e060c4}</UniqueIdentifier>
<UniqueIdentifier>{d4d0ff65-a184-46d6-904c-3eebac8093cb}</UniqueIdentifier>
</Filter>
<Filter Include="Digest">
<UniqueIdentifier>{53328768-6bdb-4f81-85bf-c2879db5c1fe}</UniqueIdentifier>
<UniqueIdentifier>{f9d84476-6968-4662-9178-092e4f93dca7}</UniqueIdentifier>
</Filter>
<Filter Include="Digest\Header Files">
<UniqueIdentifier>{abecec73-f5a6-4fd3-90d6-8dae862dd3f1}</UniqueIdentifier>
<UniqueIdentifier>{de3b14e0-309e-4363-b33a-53e22c2c5bcb}</UniqueIdentifier>
</Filter>
<Filter Include="Digest\Source Files">
<UniqueIdentifier>{29e7f5e0-01c9-4816-a579-e3766d125e71}</UniqueIdentifier>
<UniqueIdentifier>{9c029bdf-558a-462a-9fba-f0dd3161a045}</UniqueIdentifier>
</Filter>
<Filter Include="EC">
<UniqueIdentifier>{c89c9a7a-a040-4e2f-849d-6ad21f0523ef}</UniqueIdentifier>
<UniqueIdentifier>{59b4b2cf-7608-4052-90c5-50bbf58c9f65}</UniqueIdentifier>
</Filter>
<Filter Include="EC\Header Files">
<UniqueIdentifier>{1628d9fe-0981-4d80-95e1-e05136b474f8}</UniqueIdentifier>
<UniqueIdentifier>{a54cea68-0351-46d5-acb3-95ebb9ae1f5f}</UniqueIdentifier>
</Filter>
<Filter Include="EC\Source Files">
<UniqueIdentifier>{5f6106a8-f77a-4f0e-a99a-7c1f0c8532af}</UniqueIdentifier>
<UniqueIdentifier>{ce451e73-29d7-4ef7-868e-bd6f29230811}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -121,8 +121,8 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -156,8 +156,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -194,8 +194,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.pdb ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.lib ..\lib\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.pdb ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -222,7 +222,7 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\lib\release\*32MT.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\lib\release\*32MT.lib ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -250,8 +250,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -278,8 +278,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>

View File

@ -2,58 +2,58 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Cipher">
<UniqueIdentifier>{4fbc7688-5e88-4267-8a9f-088036458fc0}</UniqueIdentifier>
<UniqueIdentifier>{fc79031a-125e-4d56-a65b-2682436d858f}</UniqueIdentifier>
</Filter>
<Filter Include="Cipher\Header Files">
<UniqueIdentifier>{8b96d623-60d5-4aca-bd5c-a8eb6bb85197}</UniqueIdentifier>
<UniqueIdentifier>{b17075b8-7f28-4422-aa5c-bf1d4a063a94}</UniqueIdentifier>
</Filter>
<Filter Include="Cipher\Source Files">
<UniqueIdentifier>{bc455431-5b00-4c7c-9ba7-94ae74892bc1}</UniqueIdentifier>
<UniqueIdentifier>{f6e1ab07-9a89-4546-a4b3-69b03ecc91b6}</UniqueIdentifier>
</Filter>
<Filter Include="RSA">
<UniqueIdentifier>{0cb94b84-9795-4bc2-912b-7aa6ec6ec519}</UniqueIdentifier>
<UniqueIdentifier>{7b225db1-51bb-448b-8091-768f4bd1c26e}</UniqueIdentifier>
</Filter>
<Filter Include="RSA\Header Files">
<UniqueIdentifier>{db5804fd-f710-40e4-929c-ac069ca736c8}</UniqueIdentifier>
<UniqueIdentifier>{3225e924-b68a-434d-a25e-41425862b283}</UniqueIdentifier>
</Filter>
<Filter Include="RSA\Source Files">
<UniqueIdentifier>{4cd4e1c7-7217-4be6-a8f5-4c261e904ece}</UniqueIdentifier>
<UniqueIdentifier>{b8200bae-b358-4b3a-9792-ad4297703d53}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate">
<UniqueIdentifier>{0f97ea6d-b434-4e1e-93f8-6a90af79280f}</UniqueIdentifier>
<UniqueIdentifier>{df6cd997-57da-44c0-87d4-a8464eb94e41}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate\Header Files">
<UniqueIdentifier>{ff34ec09-cd95-4b9b-baaf-8d652c6f0df4}</UniqueIdentifier>
<UniqueIdentifier>{849f8251-bb01-4325-bf75-861f39a1f7ec}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate\Source Files">
<UniqueIdentifier>{842af386-a77b-44b4-95ab-c14032b96a13}</UniqueIdentifier>
<UniqueIdentifier>{fea84aba-13bd-4607-8c16-524e19f8b1e6}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore">
<UniqueIdentifier>{870a256f-1d0e-4e6d-bdbe-3713632c2f6d}</UniqueIdentifier>
<UniqueIdentifier>{9fe690cf-d173-45dd-a0e7-627932df9440}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore\Header Files">
<UniqueIdentifier>{d3a1d991-9952-40d2-bbc9-81b486e9660e}</UniqueIdentifier>
<UniqueIdentifier>{30f11329-4919-4f47-9c0d-3edc2b0efd62}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore\Source Files">
<UniqueIdentifier>{d929ca4e-aa0c-44a5-805a-80c703e914a8}</UniqueIdentifier>
<UniqueIdentifier>{ce0365f7-5b92-4574-b5c6-00afd7479ad7}</UniqueIdentifier>
</Filter>
<Filter Include="Digest">
<UniqueIdentifier>{c1001bb3-89d6-4d97-943f-251bc080fe3c}</UniqueIdentifier>
<UniqueIdentifier>{c3bf2e9f-9e66-48a5-a008-68d382a7a10c}</UniqueIdentifier>
</Filter>
<Filter Include="Digest\Header Files">
<UniqueIdentifier>{d7577a29-b605-4532-8a8d-3ab64fe47a98}</UniqueIdentifier>
<UniqueIdentifier>{3a0ec51c-4d7d-428d-970a-f625ec58710f}</UniqueIdentifier>
</Filter>
<Filter Include="Digest\Source Files">
<UniqueIdentifier>{b3e0e465-588a-490e-b7ac-b34df6323ca3}</UniqueIdentifier>
<UniqueIdentifier>{23caef59-202a-4650-959f-86891450ca5c}</UniqueIdentifier>
</Filter>
<Filter Include="EC">
<UniqueIdentifier>{8dfe53db-bba3-4013-bf72-09cafaaff86f}</UniqueIdentifier>
<UniqueIdentifier>{3de6b7c7-d9fd-4165-8c78-4b77f3ec19e7}</UniqueIdentifier>
</Filter>
<Filter Include="EC\Header Files">
<UniqueIdentifier>{34456d4e-e859-487d-8912-f2d3ea5ee383}</UniqueIdentifier>
<UniqueIdentifier>{75c998f1-635f-4829-a6ed-f39a1559fbbd}</UniqueIdentifier>
</Filter>
<Filter Include="EC\Source Files">
<UniqueIdentifier>{63d796b7-eb83-4513-be28-83d00f456921}</UniqueIdentifier>
<UniqueIdentifier>{38102bdd-10f1-4971-9edc-bbc87d5ee797}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -121,8 +121,8 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -156,8 +156,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -194,8 +194,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.pdb ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.lib ..\lib\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.pdb ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -222,7 +222,7 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\lib\release\*32MT.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\lib\release\*32MT.lib ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -250,8 +250,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -278,8 +278,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>

View File

@ -2,58 +2,58 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Cipher">
<UniqueIdentifier>{61a7bc27-adf9-4bc4-9059-4d86ac37e298}</UniqueIdentifier>
<UniqueIdentifier>{fbefecfe-e1b8-4272-91c5-c1712f257466}</UniqueIdentifier>
</Filter>
<Filter Include="Cipher\Header Files">
<UniqueIdentifier>{6280c266-93c5-4760-a66c-6e80fc5169b3}</UniqueIdentifier>
<UniqueIdentifier>{af6ac1eb-376f-4ffb-85bb-e4ed846a0efb}</UniqueIdentifier>
</Filter>
<Filter Include="Cipher\Source Files">
<UniqueIdentifier>{a16a7973-740e-4a2c-a9b5-f7ac3938cc8b}</UniqueIdentifier>
<UniqueIdentifier>{920c7ae4-e866-4a00-8aaa-193c04fb198d}</UniqueIdentifier>
</Filter>
<Filter Include="RSA">
<UniqueIdentifier>{ed9d011e-0895-457c-b82d-363f083b4931}</UniqueIdentifier>
<UniqueIdentifier>{7e69ba5f-a073-4b98-82ac-47c2cfaf0fd2}</UniqueIdentifier>
</Filter>
<Filter Include="RSA\Header Files">
<UniqueIdentifier>{8c29253f-7bc7-4650-bcef-dcf1111aed5d}</UniqueIdentifier>
<UniqueIdentifier>{0277c830-9c8b-491c-b08b-0e649d6f0f18}</UniqueIdentifier>
</Filter>
<Filter Include="RSA\Source Files">
<UniqueIdentifier>{1677c90a-63df-4531-8fa0-c8fbfb6f9db5}</UniqueIdentifier>
<UniqueIdentifier>{ac2d3033-18bf-44e5-a73a-b77c7c8c3651}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate">
<UniqueIdentifier>{f553b9ce-648f-4a7f-bc97-f579932ed84b}</UniqueIdentifier>
<UniqueIdentifier>{2df59f4b-2c84-4c4a-85ec-7f36dc167004}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate\Header Files">
<UniqueIdentifier>{80b1c7ba-778b-426b-9b72-d673a2739b94}</UniqueIdentifier>
<UniqueIdentifier>{d58730c6-b84d-45cb-b0de-92fb8b58cbe2}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate\Source Files">
<UniqueIdentifier>{726f1f0a-04ee-4569-bc5a-03f161818850}</UniqueIdentifier>
<UniqueIdentifier>{711c39bb-82f2-46f6-9a19-6aefb2362fe5}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore">
<UniqueIdentifier>{61e7d1c1-7326-4b4d-af8b-3aa6c00e284f}</UniqueIdentifier>
<UniqueIdentifier>{ab8b8bae-a100-4d60-bb78-def016bc3a7f}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore\Header Files">
<UniqueIdentifier>{5573d619-5663-44f3-88ee-421cba5c8099}</UniqueIdentifier>
<UniqueIdentifier>{046e4c64-8f19-4d28-bd3c-31db46211538}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore\Source Files">
<UniqueIdentifier>{3ec6622d-8b9b-4d2a-9b3f-4172fbdc2093}</UniqueIdentifier>
<UniqueIdentifier>{8c21c715-c568-4623-b8bf-83dc7995971f}</UniqueIdentifier>
</Filter>
<Filter Include="Digest">
<UniqueIdentifier>{9cdc8ee5-890a-445e-bca7-6a0a39d93818}</UniqueIdentifier>
<UniqueIdentifier>{a6756110-bd4b-4091-98c1-b49286460307}</UniqueIdentifier>
</Filter>
<Filter Include="Digest\Header Files">
<UniqueIdentifier>{c2a19b0d-9d2f-4b9a-8381-cb8f7f1f0ccd}</UniqueIdentifier>
<UniqueIdentifier>{c075bc9e-3d3d-41c8-8a37-acf1560a90f3}</UniqueIdentifier>
</Filter>
<Filter Include="Digest\Source Files">
<UniqueIdentifier>{95ed2926-d4b3-4963-a972-5387ea33ec60}</UniqueIdentifier>
<UniqueIdentifier>{42610355-fbbe-449b-8191-20da324ce05e}</UniqueIdentifier>
</Filter>
<Filter Include="EC">
<UniqueIdentifier>{3a5b87b0-3703-45bf-b3fe-f52349a34785}</UniqueIdentifier>
<UniqueIdentifier>{00d74096-b471-4c92-a200-6d6cb3fe0fa2}</UniqueIdentifier>
</Filter>
<Filter Include="EC\Header Files">
<UniqueIdentifier>{2ccaea34-3fb4-40e1-b8c1-cbbe60b8856c}</UniqueIdentifier>
<UniqueIdentifier>{fa200180-1611-430f-85f8-bc4d7cecc8d7}</UniqueIdentifier>
</Filter>
<Filter Include="EC\Source Files">
<UniqueIdentifier>{5676fb16-cf50-43aa-a88a-982c8f1b7f5b}</UniqueIdentifier>
<UniqueIdentifier>{be85dc86-e4ff-4f0e-8c5f-6253d9efe094}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -121,8 +121,8 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -156,8 +156,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -194,8 +194,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.pdb ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.lib ..\lib\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.pdb ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -222,7 +222,7 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\lib\release\*32MT.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\lib\release\*32MT.lib ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -250,8 +250,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -278,8 +278,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>

View File

@ -2,58 +2,58 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Cipher">
<UniqueIdentifier>{eb5bbe82-8c72-45b0-ab97-decffbff67dc}</UniqueIdentifier>
<UniqueIdentifier>{59e0c7e5-8a65-4e04-ae8e-27d90d927e33}</UniqueIdentifier>
</Filter>
<Filter Include="Cipher\Header Files">
<UniqueIdentifier>{a16e9b99-2ace-49cf-9164-8ab9f689dda5}</UniqueIdentifier>
<UniqueIdentifier>{9c50c9fa-3432-405a-9396-f138fc2d086d}</UniqueIdentifier>
</Filter>
<Filter Include="Cipher\Source Files">
<UniqueIdentifier>{1ba12752-bee5-443e-b2fb-38218b0fd566}</UniqueIdentifier>
<UniqueIdentifier>{6dbdf680-8e62-4acf-9d3f-d612701053ae}</UniqueIdentifier>
</Filter>
<Filter Include="RSA">
<UniqueIdentifier>{2a6167ba-1558-416f-9fba-ee12602947a9}</UniqueIdentifier>
<UniqueIdentifier>{6a8a6eb5-b385-4fc4-8318-b5e6e613a6c8}</UniqueIdentifier>
</Filter>
<Filter Include="RSA\Header Files">
<UniqueIdentifier>{9f1ff060-96c7-4862-a105-3fe61ae5b19a}</UniqueIdentifier>
<UniqueIdentifier>{ab123168-a535-4a6a-8bd4-2b1359041863}</UniqueIdentifier>
</Filter>
<Filter Include="RSA\Source Files">
<UniqueIdentifier>{355e772b-1891-45c2-8b97-20078e37a6a9}</UniqueIdentifier>
<UniqueIdentifier>{bfa7b963-6df2-4f55-b73b-672dc5ac9809}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate">
<UniqueIdentifier>{6ba67cd7-7c15-4604-a96f-ed0d88c42a28}</UniqueIdentifier>
<UniqueIdentifier>{d72b2130-1c1c-40f6-8330-edf02c78a1f0}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate\Header Files">
<UniqueIdentifier>{f5177bab-fc92-435d-a192-f740602f6af7}</UniqueIdentifier>
<UniqueIdentifier>{53704d11-de39-4d19-b2df-d53662816358}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate\Source Files">
<UniqueIdentifier>{03f04ceb-17d9-4a49-b02a-7bb916de73ec}</UniqueIdentifier>
<UniqueIdentifier>{968b4b08-89e7-45ec-ad8b-7bc4334cde91}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore">
<UniqueIdentifier>{596a063b-67fa-4b24-9d91-17c77d1e903c}</UniqueIdentifier>
<UniqueIdentifier>{07e4c7f5-8998-4a47-b463-a6f0274b02bf}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore\Header Files">
<UniqueIdentifier>{4880f8d3-3ec5-47c7-953f-342fc84a9533}</UniqueIdentifier>
<UniqueIdentifier>{37f56e15-dc52-4c28-a571-ce98e14e5b63}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore\Source Files">
<UniqueIdentifier>{dd63ac66-9f22-4c59-93e6-7586ebad7f2f}</UniqueIdentifier>
<UniqueIdentifier>{b6327327-f13c-4849-9369-795a98e4f959}</UniqueIdentifier>
</Filter>
<Filter Include="Digest">
<UniqueIdentifier>{bd739d2f-7b2c-49e4-bc33-84fa144a71d3}</UniqueIdentifier>
<UniqueIdentifier>{132c45fe-7d91-4051-b8a8-3caef8a27b7c}</UniqueIdentifier>
</Filter>
<Filter Include="Digest\Header Files">
<UniqueIdentifier>{e0953c21-eebe-4e54-82cd-e5d0f1385899}</UniqueIdentifier>
<UniqueIdentifier>{f58f5278-9490-4a59-a821-cd38782c1b9f}</UniqueIdentifier>
</Filter>
<Filter Include="Digest\Source Files">
<UniqueIdentifier>{6b5abed4-da41-4d1c-8be5-5132453530ba}</UniqueIdentifier>
<UniqueIdentifier>{6e18660f-78d9-4100-a98d-c4c5bf3e8bcb}</UniqueIdentifier>
</Filter>
<Filter Include="EC">
<UniqueIdentifier>{5006c57f-98e9-4109-8fbe-0d35b8621ac1}</UniqueIdentifier>
<UniqueIdentifier>{b56c5c11-eda6-4212-affd-037413bd04d7}</UniqueIdentifier>
</Filter>
<Filter Include="EC\Header Files">
<UniqueIdentifier>{a9b1a415-b2a4-484e-9532-9b94568052ed}</UniqueIdentifier>
<UniqueIdentifier>{865cafcf-91d6-484a-a7b7-f24185edbd39}</UniqueIdentifier>
</Filter>
<Filter Include="EC\Source Files">
<UniqueIdentifier>{eba62bba-2622-48d1-a0cc-4d4c2b14f7ef}</UniqueIdentifier>
<UniqueIdentifier>{433fff9b-1f4f-45ab-97a5-6caec92a767f}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -103,8 +103,8 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -141,8 +141,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -182,8 +182,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.pdb ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.lib ..\lib64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.pdb ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -212,7 +212,7 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\lib\release\*64MT.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\lib\release\*64MT.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -242,8 +242,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -272,8 +272,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>

View File

@ -2,58 +2,58 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Cipher">
<UniqueIdentifier>{dfaeb0de-f7fd-4e2d-b9b5-637b346538a4}</UniqueIdentifier>
<UniqueIdentifier>{86cfe8d6-8b57-446a-bb1f-b2515c8b1440}</UniqueIdentifier>
</Filter>
<Filter Include="Cipher\Header Files">
<UniqueIdentifier>{3287b871-2577-436a-894f-4b4202bdc396}</UniqueIdentifier>
<UniqueIdentifier>{c282c27b-a31d-453a-8311-2c4877dcb826}</UniqueIdentifier>
</Filter>
<Filter Include="Cipher\Source Files">
<UniqueIdentifier>{a4730690-6b69-421e-bd41-c7ed80e04b9a}</UniqueIdentifier>
<UniqueIdentifier>{b00db0ff-abb0-4bca-bcf9-bcdcfa83b365}</UniqueIdentifier>
</Filter>
<Filter Include="RSA">
<UniqueIdentifier>{5606789e-bfef-4e6b-ba5b-c7283f0c6dac}</UniqueIdentifier>
<UniqueIdentifier>{8e9ee556-8140-478e-bea0-66c92cf3f8c5}</UniqueIdentifier>
</Filter>
<Filter Include="RSA\Header Files">
<UniqueIdentifier>{2ac8b366-3158-42f5-b5db-48a8d1639eaa}</UniqueIdentifier>
<UniqueIdentifier>{eeebef5b-5340-4151-9f5b-59a9bf72ad37}</UniqueIdentifier>
</Filter>
<Filter Include="RSA\Source Files">
<UniqueIdentifier>{a6634a3c-2c9a-428c-9551-dd98d2e7db14}</UniqueIdentifier>
<UniqueIdentifier>{7b0ee7f6-968a-4073-a991-ffb856b780f0}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate">
<UniqueIdentifier>{9ed7d995-9e73-4340-8713-e5e608034c9f}</UniqueIdentifier>
<UniqueIdentifier>{d6522321-6003-4d31-b1d2-76a6101b6e02}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate\Header Files">
<UniqueIdentifier>{34272cdc-a627-420f-9e0f-d60ef1ba502a}</UniqueIdentifier>
<UniqueIdentifier>{8f27d29d-3f5d-44e7-ba56-e33a74b6e7f1}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate\Source Files">
<UniqueIdentifier>{01b1b99e-374a-4edb-a152-fe5b3eb5da9d}</UniqueIdentifier>
<UniqueIdentifier>{52e3edfb-da53-4f9e-bec8-4fd2019729c7}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore">
<UniqueIdentifier>{7317857e-f937-4046-8bec-cc9ae5d96b73}</UniqueIdentifier>
<UniqueIdentifier>{4218ab29-a4d3-44f6-8bf7-ee7ecd686b9e}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore\Header Files">
<UniqueIdentifier>{18f928a1-053d-408e-b110-b05331790b08}</UniqueIdentifier>
<UniqueIdentifier>{7aebc66a-3ad8-4673-9566-aa78401c9fee}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore\Source Files">
<UniqueIdentifier>{c8501461-82c8-436d-9c91-3825cfc6538e}</UniqueIdentifier>
<UniqueIdentifier>{5edee4fb-49db-49e8-9711-3ce1a3e695bd}</UniqueIdentifier>
</Filter>
<Filter Include="Digest">
<UniqueIdentifier>{fd0124b8-7243-47da-8d67-5e57583579cb}</UniqueIdentifier>
<UniqueIdentifier>{7b34acae-1430-40ce-bd54-6296ddd099a9}</UniqueIdentifier>
</Filter>
<Filter Include="Digest\Header Files">
<UniqueIdentifier>{eb400d4b-b682-4892-99f8-a567ec2a56b8}</UniqueIdentifier>
<UniqueIdentifier>{d1d14af0-221e-4a6e-b9a5-aa692eedb1ef}</UniqueIdentifier>
</Filter>
<Filter Include="Digest\Source Files">
<UniqueIdentifier>{b0484812-36bd-4711-80ec-1b2a78911e15}</UniqueIdentifier>
<UniqueIdentifier>{3e150c1d-e80b-4980-88a5-6bdaa301263f}</UniqueIdentifier>
</Filter>
<Filter Include="EC">
<UniqueIdentifier>{bd7a5b72-ad52-4beb-a41c-1971ba7da648}</UniqueIdentifier>
<UniqueIdentifier>{b180b3d5-991d-49e6-852b-0de650942b2a}</UniqueIdentifier>
</Filter>
<Filter Include="EC\Header Files">
<UniqueIdentifier>{811be083-ec4b-43f2-af30-1213341e6cc9}</UniqueIdentifier>
<UniqueIdentifier>{05c2feb9-0664-46ea-b612-ef2a9bbe7c69}</UniqueIdentifier>
</Filter>
<Filter Include="EC\Source Files">
<UniqueIdentifier>{4694dc54-9f3d-431f-a260-ace6949a500a}</UniqueIdentifier>
<UniqueIdentifier>{797dab42-34f9-443c-bb34-c276bfcc9025}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -121,8 +121,8 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -156,8 +156,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -194,8 +194,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.pdb ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.lib ..\lib64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.pdb ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -222,7 +222,7 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\lib\release\*64MT.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\lib\release\*64MT.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -250,8 +250,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -278,8 +278,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>

View File

@ -2,58 +2,58 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Cipher">
<UniqueIdentifier>{ec9a0cfe-e65a-41f5-a50b-2cfc5c7a229e}</UniqueIdentifier>
<UniqueIdentifier>{30227098-2c8e-44d9-a31e-9906ad17b46d}</UniqueIdentifier>
</Filter>
<Filter Include="Cipher\Header Files">
<UniqueIdentifier>{189451cf-7056-4433-8e34-2a98c9617251}</UniqueIdentifier>
<UniqueIdentifier>{7b465244-dbbb-4c15-bc42-c210c8c0d41f}</UniqueIdentifier>
</Filter>
<Filter Include="Cipher\Source Files">
<UniqueIdentifier>{d213b27c-b121-413e-9749-72cf2d787e35}</UniqueIdentifier>
<UniqueIdentifier>{dfd1af1c-3841-4d20-8e81-6f2d3e66dfc9}</UniqueIdentifier>
</Filter>
<Filter Include="RSA">
<UniqueIdentifier>{4cb112da-f918-487d-9fc3-a9c786aab7c6}</UniqueIdentifier>
<UniqueIdentifier>{58af187b-4671-4688-8246-8e094cd77c72}</UniqueIdentifier>
</Filter>
<Filter Include="RSA\Header Files">
<UniqueIdentifier>{4beb9598-9945-4474-b1a8-28bdaf2c7e08}</UniqueIdentifier>
<UniqueIdentifier>{6215373b-eb35-417b-9917-ba3ec2850d10}</UniqueIdentifier>
</Filter>
<Filter Include="RSA\Source Files">
<UniqueIdentifier>{948c50c3-b53d-46b1-8836-76df471c89a8}</UniqueIdentifier>
<UniqueIdentifier>{42d365bc-cb4a-4d04-b3f4-a5ecda8c5205}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate">
<UniqueIdentifier>{622d199d-5c29-4bae-9acf-974700a46a8f}</UniqueIdentifier>
<UniqueIdentifier>{aa306d58-78bf-4281-ba9f-d1d5c650e987}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate\Header Files">
<UniqueIdentifier>{615cbeb5-0e72-4ae9-b567-881a62d70bbd}</UniqueIdentifier>
<UniqueIdentifier>{c11cbc9c-552d-4e1c-8ca6-c93515bc6cd5}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate\Source Files">
<UniqueIdentifier>{256597f5-3d9c-47dd-ab2d-0c25610775bf}</UniqueIdentifier>
<UniqueIdentifier>{e389f9c5-866e-47d5-add5-b55754ba6a88}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore">
<UniqueIdentifier>{d8ecd4e2-d09d-4be4-b18e-640d2198ca9b}</UniqueIdentifier>
<UniqueIdentifier>{60e60ef5-bc93-47df-ac76-aebb1ab7ef34}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore\Header Files">
<UniqueIdentifier>{e0bed99b-b3fb-4f2e-bc5f-d6b9d241ca54}</UniqueIdentifier>
<UniqueIdentifier>{3a760d59-701e-4c7f-be8a-ecfea29327f1}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore\Source Files">
<UniqueIdentifier>{d14b5c44-f2c5-4eac-aabf-c2027c971133}</UniqueIdentifier>
<UniqueIdentifier>{a5a3221e-2709-409f-8fcd-d2d2e58045ad}</UniqueIdentifier>
</Filter>
<Filter Include="Digest">
<UniqueIdentifier>{fdd9860d-f1f2-4f44-aada-cf3ed13fbe2f}</UniqueIdentifier>
<UniqueIdentifier>{5a3aa7b9-b7d4-4c9f-ac07-93369f88f5d6}</UniqueIdentifier>
</Filter>
<Filter Include="Digest\Header Files">
<UniqueIdentifier>{10821441-eac5-46ce-ab87-19048e92f736}</UniqueIdentifier>
<UniqueIdentifier>{e0df7092-be13-4a50-9af2-1ab9ce33e609}</UniqueIdentifier>
</Filter>
<Filter Include="Digest\Source Files">
<UniqueIdentifier>{3e5eb12f-6999-45eb-aa4e-41d2987ebd70}</UniqueIdentifier>
<UniqueIdentifier>{1487a274-9639-4232-b215-1845672b7aa3}</UniqueIdentifier>
</Filter>
<Filter Include="EC">
<UniqueIdentifier>{5c9bc82d-2188-4623-99f7-921b8f4eef84}</UniqueIdentifier>
<UniqueIdentifier>{4effdb5c-762d-4a71-82cb-ff0819a457ad}</UniqueIdentifier>
</Filter>
<Filter Include="EC\Header Files">
<UniqueIdentifier>{e8cdd43a-19b1-482f-98f8-c7f794a35e11}</UniqueIdentifier>
<UniqueIdentifier>{57073741-df3a-410d-885e-aa6d449eeb09}</UniqueIdentifier>
</Filter>
<Filter Include="EC\Source Files">
<UniqueIdentifier>{b849724b-bfde-45b2-8995-66cd353071ef}</UniqueIdentifier>
<UniqueIdentifier>{5bb16653-715f-4be0-8b0c-6edc0d6fd19a}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -121,8 +121,8 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -156,8 +156,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -194,8 +194,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.pdb ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.lib ..\lib64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.pdb ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -222,7 +222,7 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\lib\release\*64MT.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\lib\release\*64MT.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -250,8 +250,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -278,8 +278,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>

View File

@ -2,58 +2,58 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Cipher">
<UniqueIdentifier>{ff650bbf-a0b8-4116-8045-06f7b969693f}</UniqueIdentifier>
<UniqueIdentifier>{6e4051c8-5069-4345-b421-b65a27fd3631}</UniqueIdentifier>
</Filter>
<Filter Include="Cipher\Header Files">
<UniqueIdentifier>{59567b15-1c58-404c-899c-d43cbe7f57bb}</UniqueIdentifier>
<UniqueIdentifier>{8fd9c1c3-469d-48b0-a111-8fb1f0ef0a96}</UniqueIdentifier>
</Filter>
<Filter Include="Cipher\Source Files">
<UniqueIdentifier>{9747af12-2d36-4a5f-b708-e576c7dcb774}</UniqueIdentifier>
<UniqueIdentifier>{1a67ca41-19cf-4703-a390-6d0b5fbc5158}</UniqueIdentifier>
</Filter>
<Filter Include="RSA">
<UniqueIdentifier>{b3e1f05e-bbb0-4f82-872d-a72e761f406a}</UniqueIdentifier>
<UniqueIdentifier>{fb37b6d5-facd-4ffc-9d1f-b3b190d31b7a}</UniqueIdentifier>
</Filter>
<Filter Include="RSA\Header Files">
<UniqueIdentifier>{f5a9a149-3dcd-45b4-a640-e469b1141e7e}</UniqueIdentifier>
<UniqueIdentifier>{8b2c3017-219c-41f6-99bb-19e1dcb6e42e}</UniqueIdentifier>
</Filter>
<Filter Include="RSA\Source Files">
<UniqueIdentifier>{8b3a63f8-257d-4bf1-8c47-f214aea6d675}</UniqueIdentifier>
<UniqueIdentifier>{632b62a6-503a-4443-9b51-75597f118ee0}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate">
<UniqueIdentifier>{705dc855-7275-4572-a34e-59de5e2bb246}</UniqueIdentifier>
<UniqueIdentifier>{8aea64b4-6094-4a4a-950a-2d16ede325ff}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate\Header Files">
<UniqueIdentifier>{b94796d4-5426-403d-b733-683ba25c6152}</UniqueIdentifier>
<UniqueIdentifier>{1bac455c-4a73-429c-b03c-a2f59cdd9b38}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate\Source Files">
<UniqueIdentifier>{b48bc78c-8233-4aa3-81aa-27a322ccf2f4}</UniqueIdentifier>
<UniqueIdentifier>{861b0ee2-7aed-4ebd-8f6e-9f10d99ba946}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore">
<UniqueIdentifier>{f06ec594-a032-4c51-83b7-0ca13201858f}</UniqueIdentifier>
<UniqueIdentifier>{c99955a7-6989-4130-9916-084467afec07}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore\Header Files">
<UniqueIdentifier>{760ab1ff-7ede-4a7c-94fb-c88822aa9e08}</UniqueIdentifier>
<UniqueIdentifier>{31eac1c6-6760-4966-9b25-7a14ede469f8}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore\Source Files">
<UniqueIdentifier>{3cda2765-2000-4d74-b475-e7157d1da62c}</UniqueIdentifier>
<UniqueIdentifier>{fa6136ba-8c51-4c51-a8bf-037ab67df76d}</UniqueIdentifier>
</Filter>
<Filter Include="Digest">
<UniqueIdentifier>{f6e439a4-ac60-4a51-a40f-3f8e33e6ccc1}</UniqueIdentifier>
<UniqueIdentifier>{8f886582-7ae6-4bc4-a8b2-62d996b52e89}</UniqueIdentifier>
</Filter>
<Filter Include="Digest\Header Files">
<UniqueIdentifier>{b454f78b-9878-4fd2-ae8f-29c4030acf46}</UniqueIdentifier>
<UniqueIdentifier>{5fa77495-38f0-4da5-b6ea-b84f96ae3806}</UniqueIdentifier>
</Filter>
<Filter Include="Digest\Source Files">
<UniqueIdentifier>{4c8960ed-69b1-4fef-bd3c-3910fb27c9cf}</UniqueIdentifier>
<UniqueIdentifier>{803803b5-c3bf-4efc-86e2-0c9f28032e46}</UniqueIdentifier>
</Filter>
<Filter Include="EC">
<UniqueIdentifier>{50acab45-70a3-4143-b1b7-2f5f1692bb01}</UniqueIdentifier>
<UniqueIdentifier>{1add83bf-eaec-4676-88eb-c830151a7515}</UniqueIdentifier>
</Filter>
<Filter Include="EC\Header Files">
<UniqueIdentifier>{b58e0819-3a76-45a3-ae15-1c732748c80a}</UniqueIdentifier>
<UniqueIdentifier>{3e90851c-1cda-402c-9674-16db05224925}</UniqueIdentifier>
</Filter>
<Filter Include="EC\Source Files">
<UniqueIdentifier>{4359db01-00c3-4751-aecb-135899103444}</UniqueIdentifier>
<UniqueIdentifier>{0bb38bb2-1263-48e9-9b60-4c97a55ea977}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -121,8 +121,8 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -156,8 +156,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -194,8 +194,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.pdb ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.lib ..\lib64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.pdb ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -222,7 +222,7 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\lib\release\*64MT.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\lib\release\*64MT.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -250,8 +250,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -278,8 +278,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>

View File

@ -2,58 +2,58 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Cipher">
<UniqueIdentifier>{1222cedf-f4ee-4001-af94-690fa42a87bc}</UniqueIdentifier>
<UniqueIdentifier>{1faab222-da48-4354-8283-92992d3ccf31}</UniqueIdentifier>
</Filter>
<Filter Include="Cipher\Header Files">
<UniqueIdentifier>{6b0feebf-7b2b-4f82-a427-7d018ebe268e}</UniqueIdentifier>
<UniqueIdentifier>{961b7b0e-2f1f-4d27-b156-e3f4da8f7a8c}</UniqueIdentifier>
</Filter>
<Filter Include="Cipher\Source Files">
<UniqueIdentifier>{11d6fe46-de05-46a9-a5c0-b70678de992d}</UniqueIdentifier>
<UniqueIdentifier>{707c2ddb-f358-4452-b602-6ed5ec530cf9}</UniqueIdentifier>
</Filter>
<Filter Include="RSA">
<UniqueIdentifier>{a93857e5-024a-45ed-b52e-70e4fb2fb040}</UniqueIdentifier>
<UniqueIdentifier>{807f8938-1e6d-4506-b223-ed02c4a07c57}</UniqueIdentifier>
</Filter>
<Filter Include="RSA\Header Files">
<UniqueIdentifier>{ac06fb32-1250-4203-9821-415bac0dbab1}</UniqueIdentifier>
<UniqueIdentifier>{336381ef-671f-4b98-bffb-738066c95239}</UniqueIdentifier>
</Filter>
<Filter Include="RSA\Source Files">
<UniqueIdentifier>{f00950fa-f3a7-4c24-9f5f-81c4f3ed69c6}</UniqueIdentifier>
<UniqueIdentifier>{954bd574-21a8-4171-a6e8-e839f749091d}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate">
<UniqueIdentifier>{5396fdf2-9d10-4752-836e-5b151c4c7264}</UniqueIdentifier>
<UniqueIdentifier>{4b79b870-4ab0-4f5f-b270-6f017a2f5fb2}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate\Header Files">
<UniqueIdentifier>{c04fac79-3b1d-46a1-9329-bdc228717be1}</UniqueIdentifier>
<UniqueIdentifier>{a8b9aa67-b522-4e40-8035-901d9288700e}</UniqueIdentifier>
</Filter>
<Filter Include="Certificate\Source Files">
<UniqueIdentifier>{61b42b6c-07f4-4301-a1e9-e4a980d7a81c}</UniqueIdentifier>
<UniqueIdentifier>{567e010c-6e86-4747-a69a-46f66b43fb3e}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore">
<UniqueIdentifier>{c1105e92-2936-4855-8f46-f0c4c4d538d7}</UniqueIdentifier>
<UniqueIdentifier>{f419d792-92d8-4a46-8919-b58ec49154d3}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore\Header Files">
<UniqueIdentifier>{81dbd9fc-5456-4187-957c-6183744aa35e}</UniqueIdentifier>
<UniqueIdentifier>{c60d8ac0-fb75-4238-b548-7e4df986c8b5}</UniqueIdentifier>
</Filter>
<Filter Include="CryptoCore\Source Files">
<UniqueIdentifier>{2c95a82d-8c4a-4ad1-abd7-e72405da7eae}</UniqueIdentifier>
<UniqueIdentifier>{0466822c-e00f-46b3-97d3-5fdf5003ea1d}</UniqueIdentifier>
</Filter>
<Filter Include="Digest">
<UniqueIdentifier>{2c7ed289-5aee-4bfc-91ad-5420ac600db0}</UniqueIdentifier>
<UniqueIdentifier>{687367ce-bfda-4191-b96f-6dc4922cc44f}</UniqueIdentifier>
</Filter>
<Filter Include="Digest\Header Files">
<UniqueIdentifier>{e6eed7e4-157d-4c67-805d-99ee70c2e937}</UniqueIdentifier>
<UniqueIdentifier>{abc74a65-819b-400e-80f0-168b93143d5c}</UniqueIdentifier>
</Filter>
<Filter Include="Digest\Source Files">
<UniqueIdentifier>{9d8b88ea-7e7b-4819-8e54-287a943393c2}</UniqueIdentifier>
<UniqueIdentifier>{39f5c154-cd59-4433-8ca0-4f681b0079e6}</UniqueIdentifier>
</Filter>
<Filter Include="EC">
<UniqueIdentifier>{156f025e-b02e-4a42-9219-75b947d1f8c2}</UniqueIdentifier>
<UniqueIdentifier>{88e0de54-35e8-43d1-b69c-10f4eafe5db0}</UniqueIdentifier>
</Filter>
<Filter Include="EC\Header Files">
<UniqueIdentifier>{b00dcc0a-1ca7-4bbe-8d75-8eb68a614846}</UniqueIdentifier>
<UniqueIdentifier>{12c5ab15-1d35-471f-b5e9-f36a41f93ce5}</UniqueIdentifier>
</Filter>
<Filter Include="EC\Source Files">
<UniqueIdentifier>{b69b2001-6d8c-4bf1-8904-b06e940afd53}</UniqueIdentifier>
<UniqueIdentifier>{7647103a-7c13-4996-aedd-e407a6057120}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -20,7 +20,7 @@
CharacterSet="2">
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;exit 0"/>
CommandLine="xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin64\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib64\* 1&gt;nul&#xA;exit 0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
@ -91,7 +91,7 @@
CharacterSet="2">
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;exit 0"/>
CommandLine="xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin64\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib64\* 1&gt;nul&#xA;exit 0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
@ -166,7 +166,7 @@
CharacterSet="2">
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.pdb ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;exit 0"/>
CommandLine="xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.lib ..\lib64\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.pdb ..\lib64\* 1&gt;nul&#xA;exit 0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
@ -225,7 +225,7 @@
CharacterSet="2">
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy /y ..\openssl\VS_120\win64\lib\release\*64MT.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;exit 0"/>
CommandLine="xcopy /y ..\openssl\VS_120\win64\lib\release\*64MT.lib ..\lib64\* 1&gt;nul&#xA;exit 0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
@ -285,7 +285,7 @@
CharacterSet="2">
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;exit 0"/>
CommandLine="xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin64\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib64\* 1&gt;nul&#xA;exit 0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
@ -344,7 +344,7 @@
CharacterSet="2">
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib${vc.project.platform.bindir.suffix}\* 1&gt;nul&#xA;exit 0"/>
CommandLine="xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin64\* 1&gt;nul&#xA;xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib64\* 1&gt;nul&#xA;exit 0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool

View File

@ -30,7 +30,6 @@
#include <vector>
#include <openssl/objects.h>
#include <openssl/ec.h>
#include <openssl/pem.h>
namespace Poco {
@ -102,16 +101,8 @@ public:
/// key is not exported.
private:
typedef EVP_PKEY* (*PEM_read_bio_Key_fn)(BIO*, EVP_PKEY**, pem_password_cb*, void*);
typedef EVP_PKEY* (*PEM_read_Key_fn)(FILE*, EVP_PKEY**, pem_password_cb*, void*);
static int passCB(char* buf, int size, int, void* pass);
bool loadKey(PEM_read_Key_fn func, const std::string& keyFile, const std::string& pass = "");
bool loadKey(PEM_read_bio_Key_fn func, std::istream* pKeyStream, const std::string& pass = "");
void freeEC();
static ByteVec convertToByteVec(const BIGNUM* bn);
EC_KEY* _pEC;
};
@ -131,6 +122,28 @@ inline const EC_KEY* ECKeyImpl::getECKey() const
}
inline std::string ECKeyImpl::groupName() const
{
return OBJ_nid2sn(groupId());
}
inline void ECKeyImpl::save(const std::string& publicKeyFile,
const std::string& privateKeyFile,
const std::string& privateKeyPassphrase)
{
EVPPKey(_pEC).save(publicKeyFile, privateKeyFile, privateKeyPassphrase);
}
inline void ECKeyImpl::save(std::ostream* pPublicKeyStream,
std::ostream* pPrivateKeyStream,
const std::string& privateKeyPassphrase)
{
EVPPKey(_pEC).save(pPublicKeyStream, pPrivateKeyStream, privateKeyPassphrase);
}
} } // namespace Poco::Crypto

View File

@ -21,9 +21,12 @@
#include "Poco/Crypto/Crypto.h"
#include "Poco/Crypto/CryptoException.h"
#include "Poco/StreamCopier.h"
#include <openssl/ec.h>
#include <openssl/rsa.h>
#include <openssl/evp.h>
#include <openssl/pem.h>
#include <sstream>
namespace Poco {
@ -57,12 +60,23 @@ public:
template<typename K>
explicit EVPPKey(K* pKey): _pEVPPKey(EVP_PKEY_new())
/// Constructs EVPPKey from a "native" key pointer.
/// Constructs EVPPKey from a "native" OpenSSL (RSA or EC_KEY),
/// or a Poco wrapper (RSAKey, ECKey) key pointer.
{
if (!_pEVPPKey) throw OpenSSLException();
setKey(pKey);
}
EVPPKey(const std::string& publicKeyFile, const std::string& privateKeyFile, const std::string& privateKeyPassphrase = "");
/// Creates the EVPPKey, by reading public and private key from the given files and
/// using the given passphrase for the private key. Can only by used for signing if
/// a private key is available.
EVPPKey(std::istream* pPublicKeyStream, std::istream* pPrivateKeyStream, const std::string& privateKeyPassphrase = "");
/// Creates the EVPPKey. Can only by used for signing if pPrivKey
/// is not null. If a private key file is specified, you don't need to
/// specify a public key file. OpenSSL will auto-create it from the private key.
EVPPKey(const EVPPKey& other);
/// Copy constructor.
@ -80,6 +94,18 @@ public:
~EVPPKey();
/// Destroys the EVPPKey.
void save(const std::string& publicKeyFile, const std::string& privateKeyFile = "", const std::string& privateKeyPassphrase = "");
/// Exports the public and/or private keys to the given files.
///
/// If an empty filename is specified, the corresponding key
/// is not exported.
void save(std::ostream* pPublicKeyStream, std::ostream* pPrivateKeyStream = 0, const std::string& privateKeyPassphrase = "");
/// Exports the public and/or private key to the given streams.
///
/// If a null pointer is passed for a stream, the corresponding
/// key is not exported.
int type() const;
/// Retuns the EVPPKey type NID.
@ -103,8 +129,118 @@ private:
void setKey(RSAKey* pKey);
void setKey(EC_KEY* pKey);
void setKey(RSA* pKey);
static int passCB(char* buf, int size, int, void* pass);
typedef EVP_PKEY* (*PEM_read_FILE_Key_fn)(FILE*, EVP_PKEY**, pem_password_cb*, void*);
typedef EVP_PKEY* (*PEM_read_BIO_Key_fn)(BIO*, EVP_PKEY**, pem_password_cb*, void*);
typedef void* (*EVP_PKEY_get_Key_fn)(EVP_PKEY* pkey);
// The following load*() functions are used by both native and EVP_PKEY type key
// loading from BIO/FILE.
// When used for EVP key loading, getFunc is null (ie. native key is not extracted
// from the loaded EVP_PKEY).
template <typename K, typename F>
static bool loadKey(K** ppKey,
PEM_read_FILE_Key_fn readFunc,
F getFunc,
const std::string& keyFile,
const std::string& pass = "")
{
poco_assert_dbg (((typeid(K) == typeid(RSA) || typeid(K) == typeid(EC_KEY)) && getFunc) ||
((typeid(K) == typeid(EVP_PKEY)) && !getFunc));
poco_check_ptr (ppKey);
poco_assert_dbg (!*ppKey);
if (!keyFile.empty())
{
if (!getFunc) *ppKey = (K*)EVP_PKEY_new();
EVP_PKEY* pKey = getFunc ? EVP_PKEY_new() : (EVP_PKEY*)*ppKey;
if (pKey)
{
FILE* pFile = fopen(keyFile.c_str(), "r");
if (pFile)
{
readFunc(pFile, &pKey, passCB, pass.empty() ? (void*)0 : (void*)pass.c_str());
fclose(pFile);
if (getFunc)
{
*ppKey = (K*)getFunc(pKey);
EVP_PKEY_free(pKey);
}
else *ppKey = (K*)pKey;
if (!*ppKey) goto error;
return true;
}
else
{
EVP_PKEY_free(pKey);
throw IOException("ECKeyImpl, cannot open file", keyFile);
}
}
else goto error;
}
return false;
error:
throw OpenSSLException("EVPKey::loadKey(string)");
}
template <typename K, typename F>
static bool loadKey(K** ppKey,
PEM_read_BIO_Key_fn readFunc,
F getFunc,
std::istream* pIstr,
const std::string& pass = "")
{
poco_assert_dbg (((typeid(K) == typeid(RSA) || typeid(K) == typeid(EC_KEY)) && getFunc) ||
((typeid(K) == typeid(EVP_PKEY)) && !getFunc));
poco_check_ptr(ppKey);
poco_assert_dbg(!*ppKey);
if (pIstr)
{
std::ostringstream ostr;
Poco::StreamCopier::copyStream(*pIstr, ostr);
std::string key = ostr.str();
BIO *pBIO = BIO_new_mem_buf(const_cast<char*>(key.data()), static_cast<int>(key.size()));
if (pBIO)
{
if (!getFunc) *ppKey = (K*)EVP_PKEY_new();
EVP_PKEY* pKey = getFunc ? EVP_PKEY_new() : (EVP_PKEY*)*ppKey;
if (pKey)
{
if (readFunc(pBIO, &pKey, passCB, pass.empty() ? (void*)0 : (void*)pass.c_str()))
{
BIO_free(pBIO);
if (getFunc)
{
*ppKey = (K*)getFunc(pKey);
EVP_PKEY_free(pKey);
}
else *ppKey = (K*)pKey;
if (!*ppKey) goto error;
return true;
}
goto error;
}
else
{
BIO_free(pBIO);
goto error;
}
}
else goto error;
}
return false;
error:
throw OpenSSLException("EVPKey::loadKey(stream)");
}
EVP_PKEY* _pEVPPKey;
friend class ECKeyImpl;
friend class RSAKeyImpl;
};
//

View File

@ -77,11 +77,11 @@ ECKeyImpl::ECKeyImpl(const std::string& publicKeyFile,
const std::string& privateKeyFile,
const std::string& privateKeyPassphrase): KeyPairImpl("ec", KT_EC_IMPL), _pEC(0)
{
if (loadKey(PEM_read_PrivateKey, privateKeyFile, privateKeyPassphrase))
if (EVPPKey::loadKey(&_pEC, PEM_read_PrivateKey, EVP_PKEY_get1_EC_KEY, privateKeyFile, privateKeyPassphrase))
return; // private key is enough
// no private key, this must be public key only, otherwise throw
if (!loadKey(PEM_read_PUBKEY, publicKeyFile))
if (!EVPPKey::loadKey(&_pEC, PEM_read_PUBKEY, EVP_PKEY_get1_EC_KEY, publicKeyFile))
{
throw OpenSSLException("ECKeyImpl(const string&, const string&, const string&");
}
@ -92,11 +92,11 @@ ECKeyImpl::ECKeyImpl(std::istream* pPublicKeyStream,
std::istream* pPrivateKeyStream,
const std::string& privateKeyPassphrase): KeyPairImpl("ec", KT_EC_IMPL), _pEC(0)
{
if (loadKey(PEM_read_bio_PrivateKey, pPrivateKeyStream, privateKeyPassphrase))
if (EVPPKey::loadKey(&_pEC, PEM_read_bio_PrivateKey, EVP_PKEY_get1_EC_KEY, pPrivateKeyStream, privateKeyPassphrase))
return; // private key is enough
// no private key, this must be public key only, otherwise throw
if (!loadKey(PEM_read_bio_PUBKEY, pPublicKeyStream))
if (!EVPPKey::loadKey(&_pEC, PEM_read_bio_PUBKEY, EVP_PKEY_get1_EC_KEY, pPublicKeyStream))
{
throw OpenSSLException("ECKeyImpl(istream*, istream*, const string&");
}
@ -119,84 +119,6 @@ void ECKeyImpl::freeEC()
}
int ECKeyImpl::passCB(char* buf, int size, int, void* pass)
{
int len = (int) strlen((char*)pass);
if (len > size) len = size;
memcpy(buf, pass, len);
return len;
}
bool ECKeyImpl::loadKey(PEM_read_Key_fn func, const std::string& keyFile, const std::string& pass)
{
if (!keyFile.empty())
{
EVP_PKEY* pKey = EVP_PKEY_new();
if (pKey)
{
FILE* pFile = fopen(keyFile.c_str(), "r");
if (pFile)
{
func(pFile, &pKey, passCB, pass.empty() ? (void*)0 : (void*)pass.c_str());
_pEC = EVP_PKEY_get1_EC_KEY(pKey);
EVP_PKEY_free(pKey);
if (!_pEC) goto error;
return true;
}
else
{
EVP_PKEY_free(pKey);
throw IOException("ECKeyImpl, cannot open file", keyFile);
}
}
else goto error;
}
return false;
error:
throw OpenSSLException("ECKeyImpl(const string&, const string&, const string&)");
}
bool ECKeyImpl::loadKey(PEM_read_bio_Key_fn func, std::istream* pIstr, const std::string& pass)
{
if (pIstr)
{
std::ostringstream ostr;
Poco::StreamCopier::copyStream(*pIstr, ostr);
std::string key = ostr.str();
BIO *pBIO = BIO_new_mem_buf(const_cast<char*>(key.data()), static_cast<int>(key.size()));
if (pBIO)
{
EVP_PKEY* pKey = EVP_PKEY_new();
if (pKey)
{
if (func(pBIO, &pKey, passCB, pass.empty() ? (void*)0 : (void*)pass.c_str()))
{
_pEC = EVP_PKEY_get1_EC_KEY(pKey);
EVP_PKEY_free(pKey);
BIO_free(pBIO);
if (!_pEC) goto error;
return true;
}
goto error;
}
else
{
BIO_free(pBIO);
goto error;
}
}
else goto error;
}
return false;
error:
throw OpenSSLException("ECKeyImpl::ECKeyImpl(const string&, const string&, const string&)");
}
int ECKeyImpl::size() const
{
int sz = -1;
@ -211,14 +133,14 @@ int ECKeyImpl::size() const
}
std::string ECKeyImpl::groupName() const
int ECKeyImpl::groupId() const
{
if (_pEC)
{
const EC_GROUP* ecGroup = EC_KEY_get0_group(_pEC);
if (ecGroup)
{
return OBJ_nid2sn(EC_GROUP_get_curve_name(ecGroup));
return EC_GROUP_get_curve_name(ecGroup);
}
else
{
@ -229,129 +151,4 @@ std::string ECKeyImpl::groupName() const
}
void ECKeyImpl::save(const std::string& publicKeyFile,
const std::string& privateKeyFile,
const std::string& privateKeyPassphrase)
{
if (!publicKeyFile.empty())
{
BIO* bio = BIO_new(BIO_s_file());
if (!bio) throw Poco::IOException("Cannot create BIO for writing public key file", publicKeyFile);
try
{
if (BIO_write_filename(bio, const_cast<char*>(publicKeyFile.c_str())))
{
EVPPKey pKey(_pEC);
if (!PEM_write_bio_PUBKEY(bio, pKey))
{
throw Poco::WriteFileException("Failed to write public key to file", publicKeyFile);
}
}
else throw Poco::CreateFileException("Cannot create public key file");
}
catch (...)
{
BIO_free(bio);
throw;
}
BIO_free(bio);
}
if (!privateKeyFile.empty())
{
BIO* bio = BIO_new(BIO_s_file());
if (!bio) throw Poco::IOException("Cannot create BIO for writing private key file", privateKeyFile);
try
{
if (BIO_write_filename(bio, const_cast<char*>(privateKeyFile.c_str())))
{
EVPPKey pKey(_pEC);
int rc = 0;
if (privateKeyPassphrase.empty())
{
rc = PEM_write_bio_PrivateKey(bio, pKey, 0, 0, 0, 0, 0);
}
else
{
rc = PEM_write_bio_PrivateKey(bio, pKey, EVP_des_ede3_cbc(),
reinterpret_cast<unsigned char*>(const_cast<char*>(privateKeyPassphrase.c_str())),
static_cast<int>(privateKeyPassphrase.length()), 0, 0);
}
if (!rc)
throw Poco::FileException("Failed to write private key to file", privateKeyFile);
}
else throw Poco::CreateFileException("Cannot create private key file", privateKeyFile);
}
catch (...)
{
BIO_free(bio);
throw;
}
BIO_free(bio);
}
}
void ECKeyImpl::save(std::ostream* pPublicKeyStream,
std::ostream* pPrivateKeyStream,
const std::string& privateKeyPassphrase)
{
if (pPublicKeyStream)
{
BIO* bio = BIO_new(BIO_s_mem());
if (!bio) throw Poco::IOException("Cannot create BIO for writing public key");
EVPPKey pKey(_pEC);
if (!PEM_write_bio_PUBKEY(bio, pKey))
{
BIO_free(bio);
throw Poco::WriteFileException("Failed to write public key to stream");
}
char* pData;
long size = BIO_get_mem_data(bio, &pData);
pPublicKeyStream->write(pData, static_cast<std::streamsize>(size));
BIO_free(bio);
}
if (pPrivateKeyStream)
{
BIO* bio = BIO_new(BIO_s_mem());
if (!bio) throw Poco::IOException("Cannot create BIO for writing public key");
EVPPKey pKey(_pEC);
int rc = 0;
if (privateKeyPassphrase.empty())
rc = PEM_write_bio_PrivateKey(bio, pKey, 0, 0, 0, 0, 0);
else
rc = PEM_write_bio_PrivateKey(bio, pKey, EVP_des_ede3_cbc(),
reinterpret_cast<unsigned char*>(const_cast<char*>(privateKeyPassphrase.c_str())),
static_cast<int>(privateKeyPassphrase.length()), 0, 0);
if (!rc)
{
BIO_free(bio);
throw Poco::FileException("Failed to write private key to stream");
}
char* pData;
long size = BIO_get_mem_data(bio, &pData);
pPrivateKeyStream->write(pData, static_cast<std::streamsize>(size));
BIO_free(bio);
}
}
ECKeyImpl::ByteVec ECKeyImpl::convertToByteVec(const BIGNUM* bn)
{
int numBytes = BN_num_bytes(bn);
ByteVec byteVector(numBytes);
ByteVec::value_type* buffer = new ByteVec::value_type[numBytes];
BN_bn2bin(bn, buffer);
for (int i = 0; i < numBytes; ++i)
byteVector[i] = buffer[i];
delete [] buffer;
return byteVector;
}
} } // namespace Poco::Crypto

View File

@ -41,6 +41,36 @@ EVPPKey::EVPPKey(EVP_PKEY* pEVPPKey): _pEVPPKey(0)
}
EVPPKey::EVPPKey(const std::string& publicKeyFile,
const std::string& privateKeyFile,
const std::string& privateKeyPassphrase): _pEVPPKey(0)
{
if (loadKey(&_pEVPPKey, PEM_read_PrivateKey, (EVP_PKEY_get_Key_fn)0, privateKeyFile, privateKeyPassphrase))
return; // private key is enough
// no private key, this must be public key only, otherwise throw
if (!loadKey(&_pEVPPKey, PEM_read_PUBKEY, (EVP_PKEY_get_Key_fn)0, publicKeyFile))
{
throw OpenSSLException("ECKeyImpl(const string&, const string&, const string&");
}
}
EVPPKey::EVPPKey(std::istream* pPublicKeyStream,
std::istream* pPrivateKeyStream,
const std::string& privateKeyPassphrase): _pEVPPKey(0)
{
if (loadKey(&_pEVPPKey, PEM_read_bio_PrivateKey, (EVP_PKEY_get_Key_fn)0, pPrivateKeyStream, privateKeyPassphrase))
return; // private key is enough
// no private key, this must be public key only, otherwise throw
if (!loadKey(&_pEVPPKey, PEM_read_bio_PUBKEY, (EVP_PKEY_get_Key_fn)0, pPublicKeyStream))
{
throw OpenSSLException("ECKeyImpl(istream*, istream*, const string&");
}
}
EVPPKey::EVPPKey(const EVPPKey& other)
{
duplicate(other._pEVPPKey);
@ -77,6 +107,106 @@ EVPPKey::~EVPPKey()
}
void EVPPKey::save(const std::string& publicKeyFile, const std::string& privateKeyFile, const std::string& privateKeyPassphrase)
{
if (!publicKeyFile.empty())
{
BIO* bio = BIO_new(BIO_s_file());
if (!bio) throw Poco::IOException("Cannot create BIO for writing public key file", publicKeyFile);
try
{
if (BIO_write_filename(bio, const_cast<char*>(publicKeyFile.c_str())))
{
if (!PEM_write_bio_PUBKEY(bio, _pEVPPKey))
{
throw Poco::WriteFileException("Failed to write public key to file", publicKeyFile);
}
}
else throw Poco::CreateFileException("Cannot create public key file");
}
catch (...)
{
BIO_free(bio);
throw;
}
BIO_free(bio);
}
if (!privateKeyFile.empty())
{
BIO* bio = BIO_new(BIO_s_file());
if (!bio) throw Poco::IOException("Cannot create BIO for writing private key file", privateKeyFile);
try
{
if (BIO_write_filename(bio, const_cast<char*>(privateKeyFile.c_str())))
{
int rc = 0;
if (privateKeyPassphrase.empty())
{
rc = PEM_write_bio_PrivateKey(bio, _pEVPPKey, 0, 0, 0, 0, 0);
}
else
{
rc = PEM_write_bio_PrivateKey(bio, _pEVPPKey, EVP_des_ede3_cbc(),
reinterpret_cast<unsigned char*>(const_cast<char*>(privateKeyPassphrase.c_str())),
static_cast<int>(privateKeyPassphrase.length()), 0, 0);
}
if (!rc)
throw Poco::FileException("Failed to write private key to file", privateKeyFile);
}
else throw Poco::CreateFileException("Cannot create private key file", privateKeyFile);
}
catch (...)
{
BIO_free(bio);
throw;
}
BIO_free(bio);
}
}
void EVPPKey::save(std::ostream* pPublicKeyStream, std::ostream* pPrivateKeyStream, const std::string& privateKeyPassphrase)
{
if (pPublicKeyStream)
{
BIO* bio = BIO_new(BIO_s_mem());
if (!bio) throw Poco::IOException("Cannot create BIO for writing public key");
if (!PEM_write_bio_PUBKEY(bio, _pEVPPKey))
{
BIO_free(bio);
throw Poco::WriteFileException("Failed to write public key to stream");
}
char* pData;
long size = BIO_get_mem_data(bio, &pData);
pPublicKeyStream->write(pData, static_cast<std::streamsize>(size));
BIO_free(bio);
}
if (pPrivateKeyStream)
{
BIO* bio = BIO_new(BIO_s_mem());
if (!bio) throw Poco::IOException("Cannot create BIO for writing public key");
int rc = 0;
if (privateKeyPassphrase.empty())
rc = PEM_write_bio_PrivateKey(bio, _pEVPPKey, 0, 0, 0, 0, 0);
else
rc = PEM_write_bio_PrivateKey(bio, _pEVPPKey, EVP_des_ede3_cbc(),
reinterpret_cast<unsigned char*>(const_cast<char*>(privateKeyPassphrase.c_str())),
static_cast<int>(privateKeyPassphrase.length()), 0, 0);
if (!rc)
{
BIO_free(bio);
throw Poco::FileException("Failed to write private key to stream");
}
char* pData;
long size = BIO_get_mem_data(bio, &pData);
pPrivateKeyStream->write(pData, static_cast<std::streamsize>(size));
BIO_free(bio);
}
}
void EVPPKey::duplicate(EVP_PKEY* pEVPPKey)
{
if (!pEVPPKey) throw NullPointerException("EVPPKey::duplicate(): "
@ -129,7 +259,7 @@ void EVPPKey::newECKey(const char* ecCurveName)
EC_KEY_free(pEC);
return;
err:
throw OpenSSLException();
throw OpenSSLException("EVPPKey:newECKey()");
}
@ -148,4 +278,14 @@ void EVPPKey::setKey(RSAKey* pKey)
setKey(pKey->impl()->getRSA());
}
int EVPPKey::passCB(char* buf, int size, int, void* pass)
{
int len = (int) strlen((char*)pass);
if (len > size) len = size;
memcpy(buf, pass, len);
return len;
}
} } // namespace Poco::Crypto

View File

@ -96,7 +96,7 @@ RSAKeyImpl::RSAKeyImpl(const std::string& publicKeyFile,
_pRSA(0)
{
poco_assert_dbg(_pRSA == 0);
_pRSA = RSA_new();
if (!publicKeyFile.empty())
{
@ -162,7 +162,7 @@ RSAKeyImpl::RSAKeyImpl(std::istream* pPublicKeyStream,
_pRSA(0)
{
poco_assert_dbg(_pRSA == 0);
_pRSA = RSA_new();
if (pPublicKeyStream)
{

View File

@ -14,7 +14,8 @@ SYSLIBS += -lssl -lcrypto -lz -ldl
endif
objects = CryptoTestSuite Driver \
CryptoTest DigestEngineTest RSATest
CryptoTest DigestEngineTest ECTest \
EVPTest RSATest PKCS12ContainerTest
target = testrunner
target_version = 1

View File

@ -472,6 +472,8 @@
RelativePath=".\src\DigestEngineTest.h"/>
<File
RelativePath=".\src\ECTest.h"/>
<File
RelativePath=".\src\EVPTest.h"/>
<File
RelativePath=".\src\PKCS12ContainerTest.h"/>
<File
@ -485,6 +487,8 @@
RelativePath=".\src\DigestEngineTest.cpp"/>
<File
RelativePath=".\src\ECTest.cpp"/>
<File
RelativePath=".\src\EVPTest.cpp"/>
<File
RelativePath=".\src\PKCS12ContainerTest.cpp"/>
<File

View File

@ -453,6 +453,8 @@
RelativePath=".\src\DigestEngineTest.h"/>
<File
RelativePath=".\src\ECTest.h"/>
<File
RelativePath=".\src\EVPTest.h"/>
<File
RelativePath=".\src\PKCS12ContainerTest.h"/>
<File
@ -466,6 +468,8 @@
RelativePath=".\src\DigestEngineTest.cpp"/>
<File
RelativePath=".\src\ECTest.cpp"/>
<File
RelativePath=".\src\EVPTest.cpp"/>
<File
RelativePath=".\src\PKCS12ContainerTest.cpp"/>
<File

View File

@ -4,6 +4,7 @@
<ClInclude Include="src\CryptoTest.h"/>
<ClInclude Include="src\DigestEngineTest.h"/>
<ClInclude Include="src\ECTest.h"/>
<ClInclude Include="src\EVPTest.h"/>
<ClInclude Include="src\PKCS12ContainerTest.h"/>
<ClInclude Include="src\RSATest.h"/>
<ClInclude Include="src\CryptoTestSuite.h"/>
@ -35,6 +36,7 @@
<ClCompile Include="src\CryptoTest.cpp"/>
<ClCompile Include="src\DigestEngineTest.cpp"/>
<ClCompile Include="src\ECTest.cpp"/>
<ClCompile Include="src\EVPTest.cpp"/>
<ClCompile Include="src\PKCS12ContainerTest.cpp"/>
<ClCompile Include="src\RSATest.cpp"/>
<ClCompile Include="src\CryptoTestSuite.cpp"/>

View File

@ -2,28 +2,28 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Crypto">
<UniqueIdentifier>{a8e88daa-75bc-4378-a5a6-fff13aea35e7}</UniqueIdentifier>
<UniqueIdentifier>{46556eeb-7811-46f0-91e0-45bc5f160d6f}</UniqueIdentifier>
</Filter>
<Filter Include="Crypto\Header Files">
<UniqueIdentifier>{3fad8301-d338-4d71-8109-8a88b43d91c4}</UniqueIdentifier>
<UniqueIdentifier>{26afc65c-1c22-495f-89f5-3c0bf0ceae60}</UniqueIdentifier>
</Filter>
<Filter Include="Crypto\Source Files">
<UniqueIdentifier>{70ab924b-ec37-4e2b-8bb2-e72c24d7902e}</UniqueIdentifier>
<UniqueIdentifier>{358ed9dd-edc3-4fb7-b758-9a451d27d240}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite">
<UniqueIdentifier>{1770bc94-9782-40f9-aeee-4d27580dd758}</UniqueIdentifier>
<UniqueIdentifier>{bb7e6d74-cd43-4005-8d4d-daf7f2631ea2}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Header Files">
<UniqueIdentifier>{d97fde99-0cca-4627-95c5-87072b3b09c0}</UniqueIdentifier>
<UniqueIdentifier>{20170e7c-d1da-4c37-9df3-eb30bbb9768b}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Source Files">
<UniqueIdentifier>{ccb4433d-463f-4ec0-ad48-57791e5b1b25}</UniqueIdentifier>
<UniqueIdentifier>{7c3b9bd2-7c52-4dcd-9e22-505a15292af9}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver">
<UniqueIdentifier>{d1562360-1a88-4217-9707-1b8c5bd0e69e}</UniqueIdentifier>
<UniqueIdentifier>{18ef32b1-0df5-43fb-8c02-d81009cd05e8}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver\Source Files">
<UniqueIdentifier>{2f77f332-d830-4ba0-a7a0-b8d693e5e7f3}</UniqueIdentifier>
<UniqueIdentifier>{a3a70a84-8aca-4162-adfc-54e95307f7aa}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
@ -36,6 +36,9 @@
<ClInclude Include="src\ECTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\EVPTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\PKCS12ContainerTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
@ -56,6 +59,9 @@
<ClCompile Include="src\ECTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\EVPTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\PKCS12ContainerTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>

View File

@ -315,6 +315,7 @@
<ClInclude Include="src\CryptoTest.h"/>
<ClInclude Include="src\DigestEngineTest.h"/>
<ClInclude Include="src\ECTest.h"/>
<ClInclude Include="src\EVPTest.h"/>
<ClInclude Include="src\PKCS12ContainerTest.h"/>
<ClInclude Include="src\RSATest.h"/>
<ClInclude Include="src\CryptoTestSuite.h"/>
@ -323,6 +324,7 @@
<ClCompile Include="src\CryptoTest.cpp"/>
<ClCompile Include="src\DigestEngineTest.cpp"/>
<ClCompile Include="src\ECTest.cpp"/>
<ClCompile Include="src\EVPTest.cpp"/>
<ClCompile Include="src\PKCS12ContainerTest.cpp"/>
<ClCompile Include="src\RSATest.cpp"/>
<ClCompile Include="src\CryptoTestSuite.cpp"/>

View File

@ -2,28 +2,28 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Crypto">
<UniqueIdentifier>{ac0796d1-5991-4754-be00-9f72915f86a0}</UniqueIdentifier>
<UniqueIdentifier>{03ee92f9-49ca-439c-b4ec-7a853e6e7d5d}</UniqueIdentifier>
</Filter>
<Filter Include="Crypto\Header Files">
<UniqueIdentifier>{10e50644-e2ed-40dc-997e-8fb2f14f7085}</UniqueIdentifier>
<UniqueIdentifier>{e9ba8ee4-ac82-4bc4-87f7-1e1b34760a80}</UniqueIdentifier>
</Filter>
<Filter Include="Crypto\Source Files">
<UniqueIdentifier>{105e62ac-55a9-45d0-8a7b-25bc18f43d5f}</UniqueIdentifier>
<UniqueIdentifier>{7b7e3115-64ee-4fce-aae3-8bff87a05fda}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite">
<UniqueIdentifier>{29eb5cf1-84d1-4e99-be7b-9b12a31f8f2b}</UniqueIdentifier>
<UniqueIdentifier>{aa119ac6-1492-4529-8133-0045dcc191b3}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Header Files">
<UniqueIdentifier>{77c6fd76-8ff0-4e99-b95a-9e96a3d0cadb}</UniqueIdentifier>
<UniqueIdentifier>{41fbfb2e-6f5a-4527-aef1-a005493b3720}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Source Files">
<UniqueIdentifier>{dea17c81-1a87-4eea-84da-93a5d920b037}</UniqueIdentifier>
<UniqueIdentifier>{8be7bf58-482a-4074-b27f-74c07dcc83ce}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver">
<UniqueIdentifier>{2204a122-c707-41a0-b94d-9dc7233f23c3}</UniqueIdentifier>
<UniqueIdentifier>{c6c4ed2d-2630-473e-a75b-2719845a1ce2}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver\Source Files">
<UniqueIdentifier>{1ab98cef-1c64-4957-a9fc-180081597c51}</UniqueIdentifier>
<UniqueIdentifier>{3454a18f-c9bb-4c8b-a45d-b2e5d861b13f}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
@ -36,6 +36,9 @@
<ClInclude Include="src\ECTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\EVPTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\PKCS12ContainerTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
@ -56,6 +59,9 @@
<ClCompile Include="src\ECTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\EVPTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\PKCS12ContainerTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>

View File

@ -315,6 +315,7 @@
<ClInclude Include="src\CryptoTest.h"/>
<ClInclude Include="src\DigestEngineTest.h"/>
<ClInclude Include="src\ECTest.h"/>
<ClInclude Include="src\EVPTest.h"/>
<ClInclude Include="src\PKCS12ContainerTest.h"/>
<ClInclude Include="src\RSATest.h"/>
<ClInclude Include="src\CryptoTestSuite.h"/>
@ -323,6 +324,7 @@
<ClCompile Include="src\CryptoTest.cpp"/>
<ClCompile Include="src\DigestEngineTest.cpp"/>
<ClCompile Include="src\ECTest.cpp"/>
<ClCompile Include="src\EVPTest.cpp"/>
<ClCompile Include="src\PKCS12ContainerTest.cpp"/>
<ClCompile Include="src\RSATest.cpp"/>
<ClCompile Include="src\CryptoTestSuite.cpp"/>

View File

@ -2,28 +2,28 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Crypto">
<UniqueIdentifier>{f4961fc2-2dae-4ace-9dee-01edbf2addd6}</UniqueIdentifier>
<UniqueIdentifier>{d4c4c525-b504-4ded-88d4-cd228fa6c77d}</UniqueIdentifier>
</Filter>
<Filter Include="Crypto\Header Files">
<UniqueIdentifier>{88ab3a10-1321-4160-b89d-bd12ca653787}</UniqueIdentifier>
<UniqueIdentifier>{b09ae726-a9b9-4be4-9106-349588b990a8}</UniqueIdentifier>
</Filter>
<Filter Include="Crypto\Source Files">
<UniqueIdentifier>{2f5c7f75-7c22-45da-9689-30e2262e4052}</UniqueIdentifier>
<UniqueIdentifier>{c39b1b72-381d-4554-8fc1-332ac87d58ea}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite">
<UniqueIdentifier>{917d632f-b260-4f18-9fce-f323ea62d292}</UniqueIdentifier>
<UniqueIdentifier>{890e47b8-c77c-495b-8279-a958078ff0da}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Header Files">
<UniqueIdentifier>{a79ad540-a384-4f9e-8d46-4e619b739ef5}</UniqueIdentifier>
<UniqueIdentifier>{d9a7355e-7d73-4b67-aa2a-31e114719844}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Source Files">
<UniqueIdentifier>{45c172b4-f265-4b47-9e44-99471b2db933}</UniqueIdentifier>
<UniqueIdentifier>{11397398-057e-4d91-9432-91cee0515329}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver">
<UniqueIdentifier>{5113fe6d-5cc3-462e-a1eb-70ad5a8ce4bd}</UniqueIdentifier>
<UniqueIdentifier>{de16a63a-f07d-41df-a41e-681ff7e55095}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver\Source Files">
<UniqueIdentifier>{84ac70a8-fe3b-4b19-a045-affd8f1f6071}</UniqueIdentifier>
<UniqueIdentifier>{d0188b1f-d2ac-4199-8a97-403d84d4f0f8}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
@ -36,6 +36,9 @@
<ClInclude Include="src\ECTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\EVPTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\PKCS12ContainerTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
@ -56,6 +59,9 @@
<ClCompile Include="src\ECTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\EVPTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\PKCS12ContainerTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>

View File

@ -308,6 +308,7 @@
<ClInclude Include="src\CryptoTestSuite.h"/>
<ClInclude Include="src\DigestEngineTest.h"/>
<ClInclude Include="src\ECTest.h"/>
<ClInclude Include="src\EVPTest.h"/>
<ClInclude Include="src\PKCS12ContainerTest.h"/>
<ClInclude Include="src\RSATest.h"/>
</ItemGroup>
@ -317,6 +318,7 @@
<ClCompile Include="src\DigestEngineTest.cpp"/>
<ClCompile Include="src\Driver.cpp"/>
<ClCompile Include="src\ECTest.cpp"/>
<ClCompile Include="src\EVPTest.cpp"/>
<ClCompile Include="src\PKCS12ContainerTest.cpp"/>
<ClCompile Include="src\RSATest.cpp"/>
</ItemGroup>

View File

@ -2,28 +2,28 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Crypto">
<UniqueIdentifier>{389f4398-1452-4e56-b8f1-94417e940bb6}</UniqueIdentifier>
<UniqueIdentifier>{14020ef2-309e-4277-8181-d9bea8354ccb}</UniqueIdentifier>
</Filter>
<Filter Include="Crypto\Header Files">
<UniqueIdentifier>{711b5aea-4f90-47eb-bf75-e2d601316767}</UniqueIdentifier>
<UniqueIdentifier>{bdb98106-9abc-4d31-8857-76dea760d695}</UniqueIdentifier>
</Filter>
<Filter Include="Crypto\Source Files">
<UniqueIdentifier>{8a9f2f5c-849e-4ca4-b880-83015d0571ba}</UniqueIdentifier>
<UniqueIdentifier>{6c32eab7-7175-4c55-8a9b-4af8a2bc89d6}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite">
<UniqueIdentifier>{8d74fd83-87e4-4975-aba8-9bed97d72b29}</UniqueIdentifier>
<UniqueIdentifier>{1b7cb881-e0e9-46e5-85df-087a5d3f15dd}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Header Files">
<UniqueIdentifier>{cc3253ae-672a-448d-8b2b-93cc10344750}</UniqueIdentifier>
<UniqueIdentifier>{a851c1c8-b345-4195-8452-0efd066e47e6}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Source Files">
<UniqueIdentifier>{e4b058fa-9f59-41a3-9062-27917ac48ba7}</UniqueIdentifier>
<UniqueIdentifier>{5100e0bc-edd3-4a25-a025-33e9e7fb2df8}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver">
<UniqueIdentifier>{1acb3930-fe10-457b-b461-b1e7f6ccfbdc}</UniqueIdentifier>
<UniqueIdentifier>{c15d4710-a7e3-4b04-b3e6-3253e36125f1}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver\Source Files">
<UniqueIdentifier>{80798073-1734-484b-952c-82109b3d1e8d}</UniqueIdentifier>
<UniqueIdentifier>{5dca9a06-4b57-4af3-8d33-7fcbeb6d9286}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
@ -36,6 +36,9 @@
<ClInclude Include="src\ECTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\EVPTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\PKCS12ContainerTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
@ -56,6 +59,9 @@
<ClCompile Include="src\ECTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\EVPTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\PKCS12ContainerTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>

View File

@ -308,6 +308,7 @@
<ClInclude Include="src\CryptoTestSuite.h"/>
<ClInclude Include="src\DigestEngineTest.h"/>
<ClInclude Include="src\ECTest.h"/>
<ClInclude Include="src\EVPTest.h"/>
<ClInclude Include="src\PKCS12ContainerTest.h"/>
<ClInclude Include="src\RSATest.h"/>
</ItemGroup>
@ -317,6 +318,7 @@
<ClCompile Include="src\DigestEngineTest.cpp"/>
<ClCompile Include="src\Driver.cpp"/>
<ClCompile Include="src\ECTest.cpp"/>
<ClCompile Include="src\EVPTest.cpp"/>
<ClCompile Include="src\PKCS12ContainerTest.cpp"/>
<ClCompile Include="src\RSATest.cpp"/>
</ItemGroup>

View File

@ -2,28 +2,28 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Crypto">
<UniqueIdentifier>{db551b75-b962-4f95-90ee-44b449c64500}</UniqueIdentifier>
<UniqueIdentifier>{7201278c-4cb6-4865-a53a-a88f307c0bff}</UniqueIdentifier>
</Filter>
<Filter Include="Crypto\Header Files">
<UniqueIdentifier>{708aa7ed-0e69-4359-a8f0-d1934cbb65e6}</UniqueIdentifier>
<UniqueIdentifier>{111af63a-4bba-45cc-9ed2-bbe995048dd8}</UniqueIdentifier>
</Filter>
<Filter Include="Crypto\Source Files">
<UniqueIdentifier>{612df6a1-1429-42e5-a577-947ba7e029cf}</UniqueIdentifier>
<UniqueIdentifier>{598e5080-6b9e-4afd-9d3b-62240c99add2}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite">
<UniqueIdentifier>{ab6326ac-c92a-4d10-adf6-a289f8f3c78b}</UniqueIdentifier>
<UniqueIdentifier>{38b81572-0ea6-4022-b367-76b90a0981ee}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Header Files">
<UniqueIdentifier>{669cd839-9776-4768-aae5-2bff3a711904}</UniqueIdentifier>
<UniqueIdentifier>{e20886ab-e51f-4166-9748-1a84f3f98361}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Source Files">
<UniqueIdentifier>{fd2b559f-ac80-4ece-a91a-bfe9c877ef9a}</UniqueIdentifier>
<UniqueIdentifier>{2fc4f887-b131-47b6-8608-c7baaf677877}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver">
<UniqueIdentifier>{0e00c5a8-faa2-4cb4-8be5-2742523eea23}</UniqueIdentifier>
<UniqueIdentifier>{a5abbda6-2698-4982-ad17-d8334191ffd7}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver\Source Files">
<UniqueIdentifier>{f9afb8c1-c324-49e2-af93-ef2638ea644f}</UniqueIdentifier>
<UniqueIdentifier>{c8408b45-76c4-4b51-99bb-f5af015cb6b9}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
@ -36,6 +36,9 @@
<ClInclude Include="src\ECTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\EVPTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\PKCS12ContainerTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
@ -56,6 +59,9 @@
<ClCompile Include="src\ECTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\EVPTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\PKCS12ContainerTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>

View File

@ -315,6 +315,7 @@
<ClInclude Include="src\CryptoTest.h"/>
<ClInclude Include="src\DigestEngineTest.h"/>
<ClInclude Include="src\ECTest.h"/>
<ClInclude Include="src\EVPTest.h"/>
<ClInclude Include="src\PKCS12ContainerTest.h"/>
<ClInclude Include="src\RSATest.h"/>
<ClInclude Include="src\CryptoTestSuite.h"/>
@ -323,6 +324,7 @@
<ClCompile Include="src\CryptoTest.cpp"/>
<ClCompile Include="src\DigestEngineTest.cpp"/>
<ClCompile Include="src\ECTest.cpp"/>
<ClCompile Include="src\EVPTest.cpp"/>
<ClCompile Include="src\PKCS12ContainerTest.cpp"/>
<ClCompile Include="src\RSATest.cpp"/>
<ClCompile Include="src\CryptoTestSuite.cpp"/>

View File

@ -2,28 +2,28 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Crypto">
<UniqueIdentifier>{02a9eacf-30be-4a5e-bdcc-1cc9ea4807a0}</UniqueIdentifier>
<UniqueIdentifier>{49497c1d-dffe-4522-8260-3df52b440628}</UniqueIdentifier>
</Filter>
<Filter Include="Crypto\Header Files">
<UniqueIdentifier>{5d231887-d9a9-4c62-8487-0403f4f68912}</UniqueIdentifier>
<UniqueIdentifier>{2689803a-543a-4cd9-aefa-5821a8a88852}</UniqueIdentifier>
</Filter>
<Filter Include="Crypto\Source Files">
<UniqueIdentifier>{922897e1-1867-40b5-9cfe-536dca802007}</UniqueIdentifier>
<UniqueIdentifier>{f239a6c3-597c-4543-adc5-16dcfad67b26}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite">
<UniqueIdentifier>{5e4846b1-373a-486b-ae59-b412e7a50a9d}</UniqueIdentifier>
<UniqueIdentifier>{bdf36fcd-886e-4c8f-b68e-c34d7d20d23a}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Header Files">
<UniqueIdentifier>{c2ddef7c-a64c-4dc2-b13c-64c7c7e24129}</UniqueIdentifier>
<UniqueIdentifier>{9c0cb17f-d87b-4728-8feb-7b9a0aee4919}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Source Files">
<UniqueIdentifier>{ee56f021-a5cb-4ca4-abda-3d6e3eb934f0}</UniqueIdentifier>
<UniqueIdentifier>{1ecc67e5-e675-48b8-b70a-8563a78f116f}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver">
<UniqueIdentifier>{60f2194e-ec34-46f2-aeee-8022fb3c0f43}</UniqueIdentifier>
<UniqueIdentifier>{2ec2113c-c5dc-4fe6-893f-22f519ce7bb7}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver\Source Files">
<UniqueIdentifier>{093e956a-98cf-4975-ac56-88936a245ee4}</UniqueIdentifier>
<UniqueIdentifier>{bb1b71b0-dbf8-4379-98e6-de0de529869d}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
@ -36,6 +36,9 @@
<ClInclude Include="src\ECTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\EVPTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\PKCS12ContainerTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
@ -56,6 +59,9 @@
<ClCompile Include="src\ECTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\EVPTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\PKCS12ContainerTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>

View File

@ -315,6 +315,7 @@
<ClInclude Include="src\CryptoTest.h"/>
<ClInclude Include="src\DigestEngineTest.h"/>
<ClInclude Include="src\ECTest.h"/>
<ClInclude Include="src\EVPTest.h"/>
<ClInclude Include="src\PKCS12ContainerTest.h"/>
<ClInclude Include="src\RSATest.h"/>
<ClInclude Include="src\CryptoTestSuite.h"/>
@ -323,6 +324,7 @@
<ClCompile Include="src\CryptoTest.cpp"/>
<ClCompile Include="src\DigestEngineTest.cpp"/>
<ClCompile Include="src\ECTest.cpp"/>
<ClCompile Include="src\EVPTest.cpp"/>
<ClCompile Include="src\PKCS12ContainerTest.cpp"/>
<ClCompile Include="src\RSATest.cpp"/>
<ClCompile Include="src\CryptoTestSuite.cpp"/>

View File

@ -2,28 +2,28 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Crypto">
<UniqueIdentifier>{3b577deb-1389-4111-b6ba-581f87ce61d1}</UniqueIdentifier>
<UniqueIdentifier>{24b608cd-8757-43b8-80c5-4230d7d6c918}</UniqueIdentifier>
</Filter>
<Filter Include="Crypto\Header Files">
<UniqueIdentifier>{dd4329af-8e38-42e3-a8dc-058e6e3b7460}</UniqueIdentifier>
<UniqueIdentifier>{686a133e-be58-400c-b745-937593e26a33}</UniqueIdentifier>
</Filter>
<Filter Include="Crypto\Source Files">
<UniqueIdentifier>{607b66e2-e1b4-425d-9172-3680a8930e22}</UniqueIdentifier>
<UniqueIdentifier>{c2a27d76-2132-42ea-ae74-c9cf4d38307a}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite">
<UniqueIdentifier>{d285ca5d-4d0f-4b56-a1da-89aecab4972c}</UniqueIdentifier>
<UniqueIdentifier>{ea2d8fcb-16cb-4c51-af81-f4ebb9a0ac1d}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Header Files">
<UniqueIdentifier>{fc178a63-9cd3-4315-97ec-fe42768910b3}</UniqueIdentifier>
<UniqueIdentifier>{d3d257de-a55e-4ac0-a3b4-9015f5fb5cd6}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Source Files">
<UniqueIdentifier>{72733724-3186-4711-b38e-2810a31b532f}</UniqueIdentifier>
<UniqueIdentifier>{11e6c108-a5be-4361-9737-a418b3db0443}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver">
<UniqueIdentifier>{661dd1a9-5ee1-4720-807a-2bd5e09f09b3}</UniqueIdentifier>
<UniqueIdentifier>{944b6b75-3951-48e6-81d5-6e596d074efc}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver\Source Files">
<UniqueIdentifier>{62b95cb9-a259-4912-8dcd-47cb26d1824b}</UniqueIdentifier>
<UniqueIdentifier>{09325e26-328b-4344-af22-d97cb694e7df}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
@ -36,6 +36,9 @@
<ClInclude Include="src\ECTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\EVPTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\PKCS12ContainerTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
@ -56,6 +59,9 @@
<ClCompile Include="src\ECTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\EVPTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\PKCS12ContainerTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>

View File

@ -308,6 +308,7 @@
<ClInclude Include="src\CryptoTestSuite.h"/>
<ClInclude Include="src\DigestEngineTest.h"/>
<ClInclude Include="src\ECTest.h"/>
<ClInclude Include="src\EVPTest.h"/>
<ClInclude Include="src\PKCS12ContainerTest.h"/>
<ClInclude Include="src\RSATest.h"/>
</ItemGroup>
@ -317,6 +318,7 @@
<ClCompile Include="src\DigestEngineTest.cpp"/>
<ClCompile Include="src\Driver.cpp"/>
<ClCompile Include="src\ECTest.cpp"/>
<ClCompile Include="src\EVPTest.cpp"/>
<ClCompile Include="src\PKCS12ContainerTest.cpp"/>
<ClCompile Include="src\RSATest.cpp"/>
</ItemGroup>

View File

@ -2,28 +2,28 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Crypto">
<UniqueIdentifier>{9d21838f-5808-4d0a-b217-8d503b9cf7cb}</UniqueIdentifier>
<UniqueIdentifier>{74dad025-af71-4fde-ac3d-27544bf916dd}</UniqueIdentifier>
</Filter>
<Filter Include="Crypto\Header Files">
<UniqueIdentifier>{2e3190be-dbab-48bb-996f-ecaa8c4a5e68}</UniqueIdentifier>
<UniqueIdentifier>{4fa02c41-8d73-485d-88f3-0f591cc510e5}</UniqueIdentifier>
</Filter>
<Filter Include="Crypto\Source Files">
<UniqueIdentifier>{eada8a19-85b3-4250-9d05-967901c7971e}</UniqueIdentifier>
<UniqueIdentifier>{3baafeff-c5ac-426f-b1c5-a57a32635f10}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite">
<UniqueIdentifier>{3012c8ab-17d6-489f-b35e-a2fe24a1f9c4}</UniqueIdentifier>
<UniqueIdentifier>{d3a878e2-667e-4ed0-bd49-053ef1bd635e}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Header Files">
<UniqueIdentifier>{816cdddc-8b3f-4d2a-8712-a41da800ab58}</UniqueIdentifier>
<UniqueIdentifier>{7ede8457-2ebf-4f4d-ba5a-0d9608fa90a9}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Source Files">
<UniqueIdentifier>{21302cb4-8494-40a7-b5d7-1e4a5edcd028}</UniqueIdentifier>
<UniqueIdentifier>{7f6aa41d-ef90-44f9-95bf-a2a7a204da00}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver">
<UniqueIdentifier>{91797da6-9ef0-4b34-b708-539b3fa4a27a}</UniqueIdentifier>
<UniqueIdentifier>{790b91d0-7366-4deb-9697-eaa19dd693cc}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver\Source Files">
<UniqueIdentifier>{9396643f-7d5d-4cf4-a91c-65eaaaeb679c}</UniqueIdentifier>
<UniqueIdentifier>{347085f9-aaaa-4614-9f90-fc836e1c8147}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
@ -36,6 +36,9 @@
<ClInclude Include="src\ECTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\EVPTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\PKCS12ContainerTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
@ -56,6 +59,9 @@
<ClCompile Include="src\ECTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\EVPTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\PKCS12ContainerTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>

View File

@ -308,6 +308,7 @@
<ClInclude Include="src\CryptoTestSuite.h"/>
<ClInclude Include="src\DigestEngineTest.h"/>
<ClInclude Include="src\ECTest.h"/>
<ClInclude Include="src\EVPTest.h"/>
<ClInclude Include="src\PKCS12ContainerTest.h"/>
<ClInclude Include="src\RSATest.h"/>
</ItemGroup>
@ -317,6 +318,7 @@
<ClCompile Include="src\DigestEngineTest.cpp"/>
<ClCompile Include="src\Driver.cpp"/>
<ClCompile Include="src\ECTest.cpp"/>
<ClCompile Include="src\EVPTest.cpp"/>
<ClCompile Include="src\PKCS12ContainerTest.cpp"/>
<ClCompile Include="src\RSATest.cpp"/>
</ItemGroup>

View File

@ -2,28 +2,28 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Crypto">
<UniqueIdentifier>{fd4a1cab-7f08-4756-8de7-54aadab1b0a0}</UniqueIdentifier>
<UniqueIdentifier>{8f818b09-9274-43e1-9545-3eddf788c312}</UniqueIdentifier>
</Filter>
<Filter Include="Crypto\Header Files">
<UniqueIdentifier>{5c094994-f3a2-4c47-b47d-fcd4aa629a19}</UniqueIdentifier>
<UniqueIdentifier>{1be73e5a-46d0-4418-bd2a-420acada9853}</UniqueIdentifier>
</Filter>
<Filter Include="Crypto\Source Files">
<UniqueIdentifier>{826f8316-a708-4e6e-aab5-a0769f8c96a3}</UniqueIdentifier>
<UniqueIdentifier>{9c9dffac-bd98-4a06-8b6f-3cf54ef84e2a}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite">
<UniqueIdentifier>{46c0964f-9339-457d-99ee-883e084ea07e}</UniqueIdentifier>
<UniqueIdentifier>{92ea2fd3-a566-4d9a-9f32-0bfac7e2226c}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Header Files">
<UniqueIdentifier>{7285d47c-78c6-474d-940b-c3d8b4811db5}</UniqueIdentifier>
<UniqueIdentifier>{c3219981-ee5a-4b6a-808d-dca462d005e9}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Source Files">
<UniqueIdentifier>{67802d70-8c8c-4d15-bf99-b23b2658a85f}</UniqueIdentifier>
<UniqueIdentifier>{79e9cb0a-3e75-414f-95b2-4d7b64dc10f7}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver">
<UniqueIdentifier>{c25c08d6-7ed0-4a80-9091-d86cc66545b1}</UniqueIdentifier>
<UniqueIdentifier>{26c593b1-9444-4437-9e0e-0171f1ba93a5}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver\Source Files">
<UniqueIdentifier>{7941db2a-c5fe-4cef-a9d3-624d69c61469}</UniqueIdentifier>
<UniqueIdentifier>{c7d8fcf7-7209-456a-a836-5a1d80892fc1}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
@ -36,6 +36,9 @@
<ClInclude Include="src\ECTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\EVPTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\PKCS12ContainerTest.h">
<Filter>Crypto\Header Files</Filter>
</ClInclude>
@ -56,6 +59,9 @@
<ClCompile Include="src\ECTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\EVPTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\PKCS12ContainerTest.cpp">
<Filter>Crypto\Source Files</Filter>
</ClCompile>

View File

@ -453,6 +453,8 @@
RelativePath=".\src\DigestEngineTest.h"/>
<File
RelativePath=".\src\ECTest.h"/>
<File
RelativePath=".\src\EVPTest.h"/>
<File
RelativePath=".\src\PKCS12ContainerTest.h"/>
<File
@ -466,6 +468,8 @@
RelativePath=".\src\DigestEngineTest.cpp"/>
<File
RelativePath=".\src\ECTest.cpp"/>
<File
RelativePath=".\src\EVPTest.cpp"/>
<File
RelativePath=".\src\PKCS12ContainerTest.cpp"/>
<File

View File

@ -17,6 +17,7 @@
#include "CryptoTest.h"
#include "RSATest.h"
#include "ECTest.h"
#include "EVPTest.h"
#include "DigestEngineTest.h"
#include "PKCS12ContainerTest.h"
@ -28,6 +29,7 @@ CppUnit::Test* CryptoTestSuite::suite()
pSuite->addTest(CryptoTest::suite());
pSuite->addTest(RSATest::suite());
pSuite->addTest(ECTest::suite());
pSuite->addTest(EVPTest::suite());
pSuite->addTest(DigestEngineTest::suite());
pSuite->addTest(PKCS12ContainerTest::suite());
return pSuite;

View File

@ -13,7 +13,6 @@
#include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
#include "Poco/Crypto/ECKey.h"
#include "Poco/Crypto/EVPPKey.h"
#include "Poco/Crypto/ECDSADigestEngine.h"
#include <openssl/pem.h>
#include <iostream>
@ -34,98 +33,6 @@ ECTest::~ECTest()
}
void ECTest::testEVPPKey()
{
try
{
EVPPKey* pKey = new EVPPKey("secp521r1");
assert (pKey != 0);
assert (!pKey->isSupported(0));
assert (!pKey->isSupported(-1));
assert (pKey->isSupported(pKey->type()));
assert (pKey->type() == EVP_PKEY_EC);
BIO* bioPriv1 = BIO_new(BIO_s_mem());
BIO* bioPub1 = BIO_new(BIO_s_mem());
assert (0 != PEM_write_bio_PrivateKey(bioPriv1, *pKey, NULL, NULL, 0, 0, NULL));
assert (0 != PEM_write_bio_PUBKEY(bioPub1, *pKey));
char* pPrivData1;
long sizePriv1 = BIO_get_mem_data(bioPriv1, &pPrivData1);
char* pPubData1;
long sizePub1 = BIO_get_mem_data(bioPub1, &pPubData1);
// construct EVPPKey from EVP_PKEY*
EVPPKey evpPKey(pKey->operator EVP_PKEY*());
assert (evpPKey.type() == EVP_PKEY_EC);
// EVPPKey makes duplicate, so freeing the original must be ok
delete pKey;
BIO* bioPriv2 = BIO_new(BIO_s_mem());
BIO* bioPub2 = BIO_new(BIO_s_mem());
assert (0 != PEM_write_bio_PrivateKey(bioPriv2, evpPKey, NULL, NULL, 0, 0, NULL));
assert (0 != PEM_write_bio_PUBKEY(bioPub2, evpPKey));
char* pPrivData2;
long sizePriv2 = BIO_get_mem_data(bioPriv2, &pPrivData2);
char* pPubData2;
long sizePub2 = BIO_get_mem_data(bioPub2, &pPubData2);
assert (sizePriv1 && (sizePriv1 == sizePriv2));
assert (0 == memcmp(pPrivData1, pPrivData2, sizePriv1));
assert (sizePub1 && (sizePub1 == sizePub2));
assert (0 == memcmp(pPubData1, pPubData2, sizePub1));
BIO_free(bioPub2);
BIO_free(bioPriv2);
// copy
EVPPKey evpPKey2(evpPKey);
assert (evpPKey2.type() == EVP_PKEY_EC);
bioPriv2 = BIO_new(BIO_s_mem());
bioPub2 = BIO_new(BIO_s_mem());
assert (0 != PEM_write_bio_PrivateKey(bioPriv2, evpPKey2, NULL, NULL, 0, 0, NULL));
assert (0 != PEM_write_bio_PUBKEY(bioPub2, evpPKey2));
sizePriv2 = BIO_get_mem_data(bioPriv2, &pPrivData2);
sizePub2 = BIO_get_mem_data(bioPub2, &pPubData2);
assert (sizePriv1 && (sizePriv1 == sizePriv2));
assert (0 == memcmp(pPrivData1, pPrivData2, sizePriv1));
assert (sizePub1 && (sizePub1 == sizePub2));
assert (0 == memcmp(pPubData1, pPubData2, sizePub1));
#ifdef POCO_ENABLE_CPP11
BIO_free(bioPub2);
BIO_free(bioPriv2);
// move
EVPPKey evpPKey3(std::move(evpPKey2));
assert (evpPKey3.type() == EVP_PKEY_EC);
bioPriv2 = BIO_new(BIO_s_mem());
bioPub2 = BIO_new(BIO_s_mem());
assert (0 != PEM_write_bio_PrivateKey(bioPriv2, evpPKey3, NULL, NULL, 0, 0, NULL));
assert (0 != PEM_write_bio_PUBKEY(bioPub2, evpPKey3));
sizePriv2 = BIO_get_mem_data(bioPriv2, &pPrivData2);
sizePub2 = BIO_get_mem_data(bioPub2, &pPubData2);
assert (sizePriv1 && (sizePriv1 == sizePriv2));
assert (0 == memcmp(pPrivData1, pPrivData2, sizePriv1));
assert (sizePub1 && (sizePub1 == sizePub2));
assert (0 == memcmp(pPubData1, pPubData2, sizePub1));
#endif POCO_ENABLE_CPP11
BIO_free(bioPub2);
BIO_free(bioPriv2);
BIO_free(bioPub1);
BIO_free(bioPriv1);
}
catch (Poco::Exception& ex)
{
std::cerr << ex.displayText() << std::endl;
throw;
}
}
void ECTest::testECNewKeys()
{
try
@ -246,63 +153,6 @@ void ECTest::testECDSASignManipulated()
}
void ECTest::testECCipher()
{/*
Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(ECKey(ECKey::KL_1024, ECKey::EXP_SMALL));
for (std::size_t n = 1; n <= 1200; n++)
{
std::string val(n, 'x');
std::string enc = pCipher->encryptString(val);
std::string dec = pCipher->decryptString(enc);
assert (dec == val);
}
*/}
void ECTest::testECCipherLarge()
{/*
std::vector<std::size_t> sizes;
sizes.push_back (2047);
sizes.push_back (2048);
sizes.push_back (2049);
sizes.push_back (4095);
sizes.push_back (4096);
sizes.push_back (4097);
sizes.push_back (8191);
sizes.push_back (8192);
sizes.push_back (8193);
sizes.push_back (16383);
sizes.push_back (16384);
sizes.push_back (16385);
Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(ECKey(ECKey::KL_1024, ECKey::EXP_SMALL));
for (std::vector<std::size_t>::const_iterator it = sizes.begin(); it != sizes.end(); ++it)
{
std::string val(*it, 'x');
std::string enc = pCipher->encryptString(val);
std::string dec = pCipher->decryptString(enc);
assert (dec == val);
}
*/}
void ECTest::testECCertificate()
{/*
std::istringstream str(anyPem);
X509Certificate cert(str);
ECKey publicKey(cert);
std::istringstream str2(anyPem);
ECKey privateKey(0, &str2, "test");
Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(publicKey);
Cipher::Ptr pCipher2 = CipherFactory::defaultFactory().createCipher(privateKey);
std::string val("lets do some encryption");
std::string enc = pCipher->encryptString(val);
std::string dec = pCipher2->decryptString(enc);
assert (dec == val);
*/}
void ECTest::setUp()
{
}
@ -317,14 +167,10 @@ CppUnit::Test* ECTest::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ECTest");
CppUnit_addTest(pSuite, ECTest, testEVPPKey);
CppUnit_addTest(pSuite, ECTest, testECNewKeys);
CppUnit_addTest(pSuite, ECTest, testECNewKeysNoPassphrase);
CppUnit_addTest(pSuite, ECTest, testECDSASignSha256);
CppUnit_addTest(pSuite, ECTest, testECDSASignManipulated);
CppUnit_addTest(pSuite, ECTest, testECCipher);
CppUnit_addTest(pSuite, ECTest, testECCipherLarge);
CppUnit_addTest(pSuite, ECTest, testECCertificate);
return pSuite;
}

View File

@ -25,14 +25,10 @@ public:
ECTest(const std::string& name);
~ECTest();
void testEVPPKey();
void testECNewKeys();
void testECNewKeysNoPassphrase();
void testECDSASignSha256();
void testECDSASignManipulated();
void testECCipher();
void testECCipherLarge();
void testECCertificate();
void setUp();
void tearDown();

View File

@ -0,0 +1,452 @@
//
// EVPTest.cpp
//
// Copyright (c) 2008, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "EVPTest.h"
#include "Poco/Crypto/RSAKey.h"
#include "Poco/Crypto/ECKey.h"
#include "Poco/Crypto/EVPPKey.h"
#include "Poco/TemporaryFile.h"
#include "Poco/StreamCopier.h"
#include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
#include <sstream>
#include <fstream>
using namespace Poco::Crypto;
using Poco::TemporaryFile;
using Poco::StreamCopier;
EVPTest::EVPTest(const std::string& name): CppUnit::TestCase(name)
{
}
EVPTest::~EVPTest()
{
}
void EVPTest::testRSAEVPPKey()
{
try
{
RSAKey* key = new RSAKey(RSAKey::KL_1024, RSAKey::EXP_SMALL);
assert(key->type() == Poco::Crypto::KeyPair::KT_RSA);
// construct EVPPKey from RSAKey*
EVPPKey* pKey = new EVPPKey(key);
// EVPPKey increments reference count, so freeing the original must be ok
delete key;
assert (!pKey->isSupported(0));
assert (!pKey->isSupported(-1));
assert (pKey->isSupported(pKey->type()));
assert (pKey->type() == EVP_PKEY_RSA);
// construct RSAKey from const EVPPKey&
key = new RSAKey(*pKey);
delete pKey;
assert(key->type() == Poco::Crypto::KeyPair::KT_RSA);
// construct EVPPKey from RSAKey*
pKey = new EVPPKey(key);
assert (pKey->type() == EVP_PKEY_RSA);
BIO* bioPriv1 = BIO_new(BIO_s_mem());
BIO* bioPub1 = BIO_new(BIO_s_mem());
assert (0 != PEM_write_bio_PrivateKey(bioPriv1, *pKey, NULL, NULL, 0, 0, NULL));
assert (0 != PEM_write_bio_PUBKEY(bioPub1, *pKey));
char* pPrivData1;
long sizePriv1 = BIO_get_mem_data(bioPriv1, &pPrivData1);
char* pPubData1;
long sizePub1 = BIO_get_mem_data(bioPub1, &pPubData1);
// construct EVPPKey from EVP_PKEY*
EVPPKey evpPKey(pKey->operator EVP_PKEY*());
// EVPPKey makes duplicate, so freeing the original must be ok
delete pKey;
assert (evpPKey.type() == EVP_PKEY_RSA);
BIO* bioPriv2 = BIO_new(BIO_s_mem());
BIO* bioPub2 = BIO_new(BIO_s_mem());
assert (0 != PEM_write_bio_PrivateKey(bioPriv2, evpPKey, NULL, NULL, 0, 0, NULL));
assert (0 != PEM_write_bio_PUBKEY(bioPub2, evpPKey));
char* pPrivData2;
long sizePriv2 = BIO_get_mem_data(bioPriv2, &pPrivData2);
char* pPubData2;
long sizePub2 = BIO_get_mem_data(bioPub2, &pPubData2);
assert (sizePriv1 && (sizePriv1 == sizePriv2));
assert (0 == memcmp(pPrivData1, pPrivData2, sizePriv1));
assert (sizePub1 && (sizePub1 == sizePub2));
assert (0 == memcmp(pPubData1, pPubData2, sizePub1));
BIO_free(bioPub2);
BIO_free(bioPriv2);
// copy
EVPPKey evpPKey2(evpPKey);
assert (evpPKey2.type() == EVP_PKEY_RSA);
bioPriv2 = BIO_new(BIO_s_mem());
bioPub2 = BIO_new(BIO_s_mem());
assert (0 != PEM_write_bio_PrivateKey(bioPriv2, evpPKey2, NULL, NULL, 0, 0, NULL));
assert (0 != PEM_write_bio_PUBKEY(bioPub2, evpPKey2));
sizePriv2 = BIO_get_mem_data(bioPriv2, &pPrivData2);
sizePub2 = BIO_get_mem_data(bioPub2, &pPubData2);
assert (sizePriv1 && (sizePriv1 == sizePriv2));
assert (0 == memcmp(pPrivData1, pPrivData2, sizePriv1));
assert (sizePub1 && (sizePub1 == sizePub2));
assert (0 == memcmp(pPubData1, pPubData2, sizePub1));
#ifdef POCO_ENABLE_CPP11
BIO_free(bioPub2);
BIO_free(bioPriv2);
// move
EVPPKey evpPKey3(std::move(evpPKey2));
assert (evpPKey3.type() == EVP_PKEY_RSA);
bioPriv2 = BIO_new(BIO_s_mem());
bioPub2 = BIO_new(BIO_s_mem());
assert (0 != PEM_write_bio_PrivateKey(bioPriv2, evpPKey3, NULL, NULL, 0, 0, NULL));
assert (0 != PEM_write_bio_PUBKEY(bioPub2, evpPKey3));
sizePriv2 = BIO_get_mem_data(bioPriv2, &pPrivData2);
sizePub2 = BIO_get_mem_data(bioPub2, &pPubData2);
assert (sizePriv1 && (sizePriv1 == sizePriv2));
assert (0 == memcmp(pPrivData1, pPrivData2, sizePriv1));
assert (sizePub1 && (sizePub1 == sizePub2));
assert (0 == memcmp(pPubData1, pPubData2, sizePub1));
#endif POCO_ENABLE_CPP11
BIO_free(bioPub2);
BIO_free(bioPriv2);
BIO_free(bioPub1);
BIO_free(bioPriv1);
}
catch (Poco::Exception& ex)
{
std::cerr << ex.displayText() << std::endl;
throw;
}
}
void EVPTest::testRSAEVPSaveLoadStream()
{
RSAKey rsaKey(RSAKey::KL_1024, RSAKey::EXP_SMALL);
EVPPKey key(&rsaKey);
std::ostringstream strPub;
std::ostringstream strPriv;
key.save(&strPub, &strPriv, "testpwd");
std::string pubKey = strPub.str();
std::string privKey = strPriv.str();
// now do the round trip
std::istringstream iPub(pubKey);
std::istringstream iPriv(privKey);
EVPPKey key2(&iPub, &iPriv, "testpwd");
std::ostringstream strPub2;
std::ostringstream strPriv2;
key2.save(&strPub2, &strPriv2, "testpwd");
assert (strPub2.str() == pubKey);
std::istringstream iPriv2(strPriv2.str());
EVPPKey key3(0, &iPriv2, "testpwd");
std::ostringstream strPub3;
key3.save(&strPub3);
assert (strPub3.str() == pubKey);
}
void EVPTest::testRSAEVPSaveLoadStreamNoPass()
{
RSAKey rsaKey(RSAKey::KL_1024, RSAKey::EXP_SMALL);
EVPPKey key(&rsaKey);
std::ostringstream strPub;
std::ostringstream strPriv;
key.save(&strPub, &strPriv);
std::string pubKey = strPub.str();
std::string privKey = strPriv.str();
// now do the round trip
std::istringstream iPub(pubKey);
std::istringstream iPriv(privKey);
EVPPKey key2(&iPub, &iPriv);
std::istringstream iPriv2(privKey);
EVPPKey key3(0, &iPriv2);
std::ostringstream strPub3;
key3.save(&strPub3);
std::string pubFromPrivate = strPub3.str();
assert (pubFromPrivate == pubKey);
}
void EVPTest::testECEVPPKey()
{
try
{
EVPPKey* pKey = new EVPPKey("secp521r1");
assert (pKey != 0);
assert (!pKey->isSupported(0));
assert (!pKey->isSupported(-1));
assert (pKey->isSupported(pKey->type()));
assert (pKey->type() == EVP_PKEY_EC);
BIO* bioPriv1 = BIO_new(BIO_s_mem());
BIO* bioPub1 = BIO_new(BIO_s_mem());
assert (0 != PEM_write_bio_PrivateKey(bioPriv1, *pKey, NULL, NULL, 0, 0, NULL));
assert (0 != PEM_write_bio_PUBKEY(bioPub1, *pKey));
char* pPrivData1;
long sizePriv1 = BIO_get_mem_data(bioPriv1, &pPrivData1);
char* pPubData1;
long sizePub1 = BIO_get_mem_data(bioPub1, &pPubData1);
// construct EVPPKey from EVP_PKEY*
EVPPKey evpPKey(pKey->operator EVP_PKEY*());
assert (evpPKey.type() == EVP_PKEY_EC);
// EVPPKey makes duplicate, so freeing the original must be ok
delete pKey;
BIO* bioPriv2 = BIO_new(BIO_s_mem());
BIO* bioPub2 = BIO_new(BIO_s_mem());
assert (0 != PEM_write_bio_PrivateKey(bioPriv2, evpPKey, NULL, NULL, 0, 0, NULL));
assert (0 != PEM_write_bio_PUBKEY(bioPub2, evpPKey));
char* pPrivData2;
long sizePriv2 = BIO_get_mem_data(bioPriv2, &pPrivData2);
char* pPubData2;
long sizePub2 = BIO_get_mem_data(bioPub2, &pPubData2);
assert (sizePriv1 && (sizePriv1 == sizePriv2));
assert (0 == memcmp(pPrivData1, pPrivData2, sizePriv1));
assert (sizePub1 && (sizePub1 == sizePub2));
assert (0 == memcmp(pPubData1, pPubData2, sizePub1));
BIO_free(bioPub2);
BIO_free(bioPriv2);
// copy
EVPPKey evpPKey2(evpPKey);
assert (evpPKey2.type() == EVP_PKEY_EC);
bioPriv2 = BIO_new(BIO_s_mem());
bioPub2 = BIO_new(BIO_s_mem());
assert (0 != PEM_write_bio_PrivateKey(bioPriv2, evpPKey2, NULL, NULL, 0, 0, NULL));
assert (0 != PEM_write_bio_PUBKEY(bioPub2, evpPKey2));
sizePriv2 = BIO_get_mem_data(bioPriv2, &pPrivData2);
sizePub2 = BIO_get_mem_data(bioPub2, &pPubData2);
assert (sizePriv1 && (sizePriv1 == sizePriv2));
assert (0 == memcmp(pPrivData1, pPrivData2, sizePriv1));
assert (sizePub1 && (sizePub1 == sizePub2));
assert (0 == memcmp(pPubData1, pPubData2, sizePub1));
#ifdef POCO_ENABLE_CPP11
BIO_free(bioPub2);
BIO_free(bioPriv2);
// move
EVPPKey evpPKey3(std::move(evpPKey2));
assert (evpPKey3.type() == EVP_PKEY_EC);
bioPriv2 = BIO_new(BIO_s_mem());
bioPub2 = BIO_new(BIO_s_mem());
assert (0 != PEM_write_bio_PrivateKey(bioPriv2, evpPKey3, NULL, NULL, 0, 0, NULL));
assert (0 != PEM_write_bio_PUBKEY(bioPub2, evpPKey3));
sizePriv2 = BIO_get_mem_data(bioPriv2, &pPrivData2);
sizePub2 = BIO_get_mem_data(bioPub2, &pPubData2);
assert (sizePriv1 && (sizePriv1 == sizePriv2));
assert (0 == memcmp(pPrivData1, pPrivData2, sizePriv1));
assert (sizePub1 && (sizePub1 == sizePub2));
assert (0 == memcmp(pPubData1, pPubData2, sizePub1));
#endif POCO_ENABLE_CPP11
BIO_free(bioPub2);
BIO_free(bioPriv2);
BIO_free(bioPub1);
BIO_free(bioPriv1);
}
catch (Poco::Exception& ex)
{
std::cerr << ex.displayText() << std::endl;
throw;
}
}
void EVPTest::testECEVPSaveLoadStream()
{
try
{
EVPPKey key("secp521r1");
std::ostringstream strPub;
std::ostringstream strPriv;
key.save(&strPub, &strPriv, "testpwd");
std::string pubKey = strPub.str();
std::string privKey = strPriv.str();
// now do the round trip
std::istringstream iPub(pubKey);
std::istringstream iPriv(privKey);
EVPPKey key2(&iPub, &iPriv, "testpwd");
std::ostringstream strPub2;
std::ostringstream strPriv2;
key2.save(&strPub2, &strPriv2, "testpwd");
assert (strPub2.str() == pubKey);
std::istringstream iPriv2(strPriv2.str());
EVPPKey key3(0, &iPriv2, "testpwd");
std::ostringstream strPub3;
key3.save(&strPub3);
std::string pubFromPrivate = strPub3.str();
assert (pubFromPrivate == pubKey);
}
catch (Poco::Exception& ex)
{
std::cerr << ex.displayText() << std::endl;
throw;
}
}
void EVPTest::testECEVPSaveLoadStreamNoPass()
{
try
{
EVPPKey key("secp521r1");
std::ostringstream strPub;
std::ostringstream strPriv;
key.save(&strPub, &strPriv);
std::string pubKey = strPub.str();
std::string privKey = strPriv.str();
// now do the round trip
std::istringstream iPub(pubKey);
std::istringstream iPriv(privKey);
EVPPKey key2(&iPub, &iPriv);
std::ostringstream strPub2;
std::ostringstream strPriv2;
key2.save(&strPub2, &strPriv2);
assert (strPub2.str() == pubKey);
assert (strPriv2.str() == privKey);
std::istringstream iPriv2(privKey);
EVPPKey key3(0, &iPriv2);
std::ostringstream strPub3;
key3.save(&strPub3);
std::string pubFromPrivate = strPub3.str();
assert (pubFromPrivate == pubKey);
}
catch (Poco::Exception& ex)
{
std::cerr << ex.displayText() << std::endl;
throw;
}
}
void EVPTest::testECEVPSaveLoadFile()
{
try
{
EVPPKey key("secp521r1");
TemporaryFile filePub;
TemporaryFile filePriv;
key.save(filePub.path(), filePriv.path(), "testpwd");
std::ifstream ifPub(filePub.path().c_str());
std::ifstream ifPriv(filePriv.path().c_str());
std::string pubKey;
std::string privKey;
StreamCopier::copyToString(ifPub, pubKey);
StreamCopier::copyToString(ifPriv, privKey);
EVPPKey key2(filePub.path(), filePriv.path(), "testpwd");
std::ostringstream strPub2;
std::ostringstream strPriv2;
key2.save(&strPub2, &strPriv2, "testpwd");
assert (strPub2.str() == pubKey);
EVPPKey key3("", filePriv.path(), "testpwd");
std::ostringstream strPub3;
key3.save(&strPub3);
std::string pubFromPrivate = strPub3.str();
assert (pubFromPrivate == pubKey);
}
catch (Poco::Exception& ex)
{
std::cerr << ex.displayText() << std::endl;
throw;
}
}
void EVPTest::testECEVPSaveLoadFileNoPass()
{
try
{
EVPPKey key("secp521r1");
TemporaryFile filePub;
TemporaryFile filePriv;
key.save(filePub.path(), filePriv.path());
std::ifstream ifPub(filePub.path().c_str());
std::ifstream ifPriv(filePriv.path().c_str());
std::string pubKey;
std::string privKey;
StreamCopier::copyToString(ifPub, pubKey);
StreamCopier::copyToString(ifPriv, privKey);
EVPPKey key2(filePub.path(), filePriv.path());
std::ostringstream strPub2;
std::ostringstream strPriv2;
key2.save(&strPub2, &strPriv2);
assert (strPub2.str() == pubKey);
EVPPKey key3("", filePriv.path());
std::ostringstream strPub3;
key3.save(&strPub3);
std::string pubFromPrivate = strPub3.str();
assert (pubFromPrivate == pubKey);
}
catch (Poco::Exception& ex)
{
std::cerr << ex.displayText() << std::endl;
throw;
}
}
void EVPTest::setUp()
{
}
void EVPTest::tearDown()
{
}
CppUnit::Test* EVPTest::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("EVPTest");
CppUnit_addTest(pSuite, EVPTest, testRSAEVPPKey);
CppUnit_addTest(pSuite, EVPTest, testRSAEVPSaveLoadStream);
CppUnit_addTest(pSuite, EVPTest, testRSAEVPSaveLoadStreamNoPass);
CppUnit_addTest(pSuite, EVPTest, testECEVPPKey);
CppUnit_addTest(pSuite, EVPTest, testECEVPSaveLoadStream);
CppUnit_addTest(pSuite, EVPTest, testECEVPSaveLoadStreamNoPass);
CppUnit_addTest(pSuite, EVPTest, testECEVPSaveLoadFile);
CppUnit_addTest(pSuite, EVPTest, testECEVPSaveLoadFileNoPass);
return pSuite;
}

View File

@ -0,0 +1,46 @@
//
// EVPTest.h
//
// Definition of the EVPTest class.
//
// Copyright (c) 2008, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef EVPTest_INCLUDED
#define EVPTest_INCLUDED
#include "Poco/Crypto/Crypto.h"
#include "CppUnit/TestCase.h"
class EVPTest: public CppUnit::TestCase
{
public:
EVPTest(const std::string& name);
~EVPTest();
void testRSAEVPPKey();
void testRSAEVPSaveLoadStream();
void testRSAEVPSaveLoadStreamNoPass();
void testECEVPPKey();
void testECEVPSaveLoadStream();
void testECEVPSaveLoadStreamNoPass();
void testECEVPSaveLoadFile();
void testECEVPSaveLoadFileNoPass();
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
};
#endif // EVPTest_INCLUDED

View File

@ -83,112 +83,6 @@ RSATest::~RSATest()
}
void RSATest::testEVPPKey()
{
try
{
RSAKey* key = new RSAKey(RSAKey::KL_1024, RSAKey::EXP_SMALL);
assert(key->type() == Poco::Crypto::KeyPair::KT_RSA);
// construct EVPPKey from RSAKey*
EVPPKey* pKey = new EVPPKey(key);
// EVPPKey increments reference count, so freeing the original must be ok
delete key;
assert (!pKey->isSupported(0));
assert (!pKey->isSupported(-1));
assert (pKey->isSupported(pKey->type()));
assert (pKey->type() == EVP_PKEY_RSA);
// construct RSAKey from const EVPPKey&
key = new RSAKey(*pKey);
delete pKey;
assert(key->type() == Poco::Crypto::KeyPair::KT_RSA);
// construct EVPPKey from RSAKey*
pKey = new EVPPKey(key);
assert (pKey->type() == EVP_PKEY_RSA);
BIO* bioPriv1 = BIO_new(BIO_s_mem());
BIO* bioPub1 = BIO_new(BIO_s_mem());
assert (0 != PEM_write_bio_PrivateKey(bioPriv1, *pKey, NULL, NULL, 0, 0, NULL));
assert (0 != PEM_write_bio_PUBKEY(bioPub1, *pKey));
char* pPrivData1;
long sizePriv1 = BIO_get_mem_data(bioPriv1, &pPrivData1);
char* pPubData1;
long sizePub1 = BIO_get_mem_data(bioPub1, &pPubData1);
// construct EVPPKey from EVP_PKEY*
EVPPKey evpPKey(pKey->operator EVP_PKEY*());
// EVPPKey makes duplicate, so freeing the original must be ok
delete pKey;
assert (evpPKey.type() == EVP_PKEY_RSA);
BIO* bioPriv2 = BIO_new(BIO_s_mem());
BIO* bioPub2 = BIO_new(BIO_s_mem());
assert (0 != PEM_write_bio_PrivateKey(bioPriv2, evpPKey, NULL, NULL, 0, 0, NULL));
assert (0 != PEM_write_bio_PUBKEY(bioPub2, evpPKey));
char* pPrivData2;
long sizePriv2 = BIO_get_mem_data(bioPriv2, &pPrivData2);
char* pPubData2;
long sizePub2 = BIO_get_mem_data(bioPub2, &pPubData2);
assert (sizePriv1 && (sizePriv1 == sizePriv2));
assert (0 == memcmp(pPrivData1, pPrivData2, sizePriv1));
assert (sizePub1 && (sizePub1 == sizePub2));
assert (0 == memcmp(pPubData1, pPubData2, sizePub1));
BIO_free(bioPub2);
BIO_free(bioPriv2);
// copy
EVPPKey evpPKey2(evpPKey);
assert (evpPKey2.type() == EVP_PKEY_RSA);
bioPriv2 = BIO_new(BIO_s_mem());
bioPub2 = BIO_new(BIO_s_mem());
assert (0 != PEM_write_bio_PrivateKey(bioPriv2, evpPKey2, NULL, NULL, 0, 0, NULL));
assert (0 != PEM_write_bio_PUBKEY(bioPub2, evpPKey2));
sizePriv2 = BIO_get_mem_data(bioPriv2, &pPrivData2);
sizePub2 = BIO_get_mem_data(bioPub2, &pPubData2);
assert (sizePriv1 && (sizePriv1 == sizePriv2));
assert (0 == memcmp(pPrivData1, pPrivData2, sizePriv1));
assert (sizePub1 && (sizePub1 == sizePub2));
assert (0 == memcmp(pPubData1, pPubData2, sizePub1));
#ifdef POCO_ENABLE_CPP11
BIO_free(bioPub2);
BIO_free(bioPriv2);
// move
EVPPKey evpPKey3(std::move(evpPKey2));
assert (evpPKey3.type() == EVP_PKEY_RSA);
bioPriv2 = BIO_new(BIO_s_mem());
bioPub2 = BIO_new(BIO_s_mem());
assert (0 != PEM_write_bio_PrivateKey(bioPriv2, evpPKey3, NULL, NULL, 0, 0, NULL));
assert (0 != PEM_write_bio_PUBKEY(bioPub2, evpPKey3));
sizePriv2 = BIO_get_mem_data(bioPriv2, &pPrivData2);
sizePub2 = BIO_get_mem_data(bioPub2, &pPubData2);
assert (sizePriv1 && (sizePriv1 == sizePriv2));
assert (0 == memcmp(pPrivData1, pPrivData2, sizePriv1));
assert (sizePub1 && (sizePub1 == sizePub2));
assert (0 == memcmp(pPubData1, pPubData2, sizePub1));
#endif POCO_ENABLE_CPP11
BIO_free(bioPub2);
BIO_free(bioPriv2);
BIO_free(bioPub1);
BIO_free(bioPriv1);
}
catch (Poco::Exception& ex)
{
std::cerr << ex.displayText() << std::endl;
throw;
}
}
void RSATest::testNewKeys()
{
RSAKey key(RSAKey::KL_1024, RSAKey::EXP_SMALL);
@ -370,7 +264,6 @@ CppUnit::Test* RSATest::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("RSATest");
CppUnit_addTest(pSuite, RSATest, testEVPPKey);
CppUnit_addTest(pSuite, RSATest, testNewKeys);
CppUnit_addTest(pSuite, RSATest, testNewKeysNoPassphrase);
CppUnit_addTest(pSuite, RSATest, testSign);

View File

@ -24,7 +24,6 @@ public:
RSATest(const std::string& name);
~RSATest();
void testEVPPKey();
void testNewKeys();
void testNewKeysNoPassphrase();
void testSign();

View File

@ -964,9 +964,16 @@ protected:
templatePath.pushDirectory(tool);
templatePath.pushDirectory(platform);
templatePath.pushDirectory(projectType);
if (platform == "Win32") pProjectConfig->setString("vc.project.platform.bits", "32");
else if (platform == "x64") pProjectConfig->setString("vc.project.platform.bits", "64");
else if (platform == "WinCE") pProjectConfig->setString("vc.project.platform.bits", "32");
if ((platform == "Win32") || (platform == "WinCE"))
{
pProjectConfig->setString("vc.project.platform.bits", "32");
pProjectConfig->setString("vc.project.platform.bindir.suffix", "");
}
else if (platform == "x64")
{
pProjectConfig->setString("vc.project.platform.bits", "64");
pProjectConfig->setString("vc.project.platform.bindir.suffix", "64");
}
else throw Poco::NotFoundException(Poco::format("Unknown platform: %s", platform));
generateProject(*pProjectConfig, projectPath, templatePath, platform, tool);
}