mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 11:31:53 +01:00
Crypto: complete merge to 1.4.2
This commit is contained in:
60
Crypto/Crypto_vs100.sln
Normal file
60
Crypto/Crypto_vs100.sln
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
|
# Visual Studio 2010
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Crypto", "Crypto_vs100.vcxproj", "{EEEE7259-32E9-4D56-B023-C733940AB2A0}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs100.vcxproj", "{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0} = {EEEE7259-32E9-4D56-B023-C733940AB2A0}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
debug_shared|Win32 = debug_shared|Win32
|
||||||
|
release_shared|Win32 = release_shared|Win32
|
||||||
|
debug_static_mt|Win32 = debug_static_mt|Win32
|
||||||
|
release_static_mt|Win32 = release_static_mt|Win32
|
||||||
|
debug_static_md|Win32 = debug_static_md|Win32
|
||||||
|
release_static_md|Win32 = release_static_md|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
302
Crypto/Crypto_vs100.vcxproj
Normal file
302
Crypto/Crypto_vs100.vcxproj
Normal file
@@ -0,0 +1,302 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="debug_shared|Win32">
|
||||||
|
<Configuration>debug_shared</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_md|Win32">
|
||||||
|
<Configuration>debug_static_md</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_mt|Win32">
|
||||||
|
<Configuration>debug_static_mt</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_shared|Win32">
|
||||||
|
<Configuration>release_shared</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_md|Win32">
|
||||||
|
<Configuration>release_static_md</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_mt|Win32">
|
||||||
|
<Configuration>release_static_mt</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectName>Crypto</ProjectName>
|
||||||
|
<ProjectGuid>{EEEE7259-32E9-4D56-B023-C733940AB2A0}</ProjectGuid>
|
||||||
|
<RootNamespace>Crypto</RootNamespace>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||||
|
<ImportGroup Label="ExtensionSettings"/>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros"/>
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">..\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">..\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">..\lib\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">..\lib\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">..\lib\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">..\lib\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">PocoCryptod</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">PocoCryptomdd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">PocoCryptomtd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">PocoCrypto</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">PocoCryptomd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">PocoCryptomt</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;Crypto_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>ws2_32.lib;iphlpapi.lib;libeay32mdd.lib;ssleay32mdd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>..\bin\PocoCryptod.dll</OutputFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>..\bin\PocoCryptod.pdb</ProgramDatabaseFile>
|
||||||
|
<AdditionalLibraryDirectories>..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<ImportLibrary>..\lib\PocoCryptod.lib</ImportLibrary>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;Crypto_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>ws2_32.lib;iphlpapi.lib;libeay32md.lib;ssleay32md.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>..\bin\PocoCrypto.dll</OutputFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<ImportLibrary>..\lib\PocoCrypto.lib</ImportLibrary>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<ProgramDataBaseFileName>..\lib\PocoCryptomtd.pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\lib\PocoCryptomtd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\lib\PocoCryptomt.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<ProgramDataBaseFileName>..\lib\PocoCryptomdd.pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\lib\PocoCryptomdd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<ProgramDataBaseFileName>..\lib\PocoCryptomd.pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalDependencies>ws2_32.lib;iphlpapi.lib;libeay32md.lib;ssleay32md.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>..\lib\PocoCryptomd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\Cipher.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CipherFactory.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CipherImpl.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CipherKey.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CipherKeyImpl.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CryptoStream.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CryptoTransform.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\RSACipherImpl.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\RSADigestEngine.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\RSAKey.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\RSAKeyImpl.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\X509Certificate.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\Crypto.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\OpenSSLInitializer.h"/>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\Cipher.cpp"/>
|
||||||
|
<ClCompile Include="src\CipherFactory.cpp"/>
|
||||||
|
<ClCompile Include="src\CipherImpl.cpp"/>
|
||||||
|
<ClCompile Include="src\CipherKey.cpp"/>
|
||||||
|
<ClCompile Include="src\CipherKeyImpl.cpp"/>
|
||||||
|
<ClCompile Include="src\CryptoStream.cpp"/>
|
||||||
|
<ClCompile Include="src\CryptoTransform.cpp"/>
|
||||||
|
<ClCompile Include="src\RSACipherImpl.cpp"/>
|
||||||
|
<ClCompile Include="src\RSADigestEngine.cpp"/>
|
||||||
|
<ClCompile Include="src\RSAKey.cpp"/>
|
||||||
|
<ClCompile Include="src\RSAKeyImpl.cpp"/>
|
||||||
|
<ClCompile Include="src\X509Certificate.cpp"/>
|
||||||
|
<ClCompile Include="src\OpenSSLInitializer.cpp"/>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||||
|
<ImportGroup Label="ExtensionTargets"/>
|
||||||
|
</Project>
|
||||||
126
Crypto/Crypto_vs100.vcxproj.filters
Normal file
126
Crypto/Crypto_vs100.vcxproj.filters
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Cipher">
|
||||||
|
<UniqueIdentifier>{494614b9-ff62-40c6-91bb-bee55822a32e}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Cipher\Header Files">
|
||||||
|
<UniqueIdentifier>{30fa87c2-b839-4e52-b062-de65113e61e6}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Cipher\Source Files">
|
||||||
|
<UniqueIdentifier>{9c8f63cf-3ed3-4862-aa28-ca44827a72fd}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="RSA">
|
||||||
|
<UniqueIdentifier>{6e2c751b-f898-414c-91df-2e2e104e9d1c}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="RSA\Header Files">
|
||||||
|
<UniqueIdentifier>{e10faa98-897c-4f37-b917-ca21a0a19d70}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="RSA\Source Files">
|
||||||
|
<UniqueIdentifier>{18391081-1244-4748-9bb5-8c5051c06e3a}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Certificate">
|
||||||
|
<UniqueIdentifier>{2489f73e-efa2-417c-8529-a381b58a8c4b}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Certificate\Header Files">
|
||||||
|
<UniqueIdentifier>{73afffe0-13d5-4f60-b6ba-f87ff4579693}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Certificate\Source Files">
|
||||||
|
<UniqueIdentifier>{be3fb73d-748e-48a5-8fe4-e08a86aa031a}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="CryptoCore">
|
||||||
|
<UniqueIdentifier>{9e89bb4f-2da8-4ba1-a29a-4a89016afa13}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="CryptoCore\Header Files">
|
||||||
|
<UniqueIdentifier>{14d5d623-0dd2-4e61-be3a-6eebb5138c6e}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="CryptoCore\Source Files">
|
||||||
|
<UniqueIdentifier>{953bd7b6-fa63-457d-a46f-f766e0a23659}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\Cipher.h">
|
||||||
|
<Filter>Cipher\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CipherFactory.h">
|
||||||
|
<Filter>Cipher\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CipherImpl.h">
|
||||||
|
<Filter>Cipher\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CipherKey.h">
|
||||||
|
<Filter>Cipher\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CipherKeyImpl.h">
|
||||||
|
<Filter>Cipher\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CryptoStream.h">
|
||||||
|
<Filter>Cipher\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CryptoTransform.h">
|
||||||
|
<Filter>Cipher\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\RSACipherImpl.h">
|
||||||
|
<Filter>RSA\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\RSADigestEngine.h">
|
||||||
|
<Filter>RSA\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\RSAKey.h">
|
||||||
|
<Filter>RSA\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\RSAKeyImpl.h">
|
||||||
|
<Filter>RSA\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\X509Certificate.h">
|
||||||
|
<Filter>Certificate\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\Crypto.h">
|
||||||
|
<Filter>CryptoCore\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\OpenSSLInitializer.h">
|
||||||
|
<Filter>CryptoCore\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\Cipher.cpp">
|
||||||
|
<Filter>Cipher\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\CipherFactory.cpp">
|
||||||
|
<Filter>Cipher\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\CipherImpl.cpp">
|
||||||
|
<Filter>Cipher\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\CipherKey.cpp">
|
||||||
|
<Filter>Cipher\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\CipherKeyImpl.cpp">
|
||||||
|
<Filter>Cipher\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\CryptoStream.cpp">
|
||||||
|
<Filter>Cipher\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\CryptoTransform.cpp">
|
||||||
|
<Filter>Cipher\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\RSACipherImpl.cpp">
|
||||||
|
<Filter>RSA\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\RSADigestEngine.cpp">
|
||||||
|
<Filter>RSA\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\RSAKey.cpp">
|
||||||
|
<Filter>RSA\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\RSAKeyImpl.cpp">
|
||||||
|
<Filter>RSA\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\X509Certificate.cpp">
|
||||||
|
<Filter>Certificate\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\OpenSSLInitializer.cpp">
|
||||||
|
<Filter>CryptoCore\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
3
Crypto/Crypto_vs100.vcxproj.user
Normal file
3
Crypto/Crypto_vs100.vcxproj.user
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
</Project>
|
||||||
60
Crypto/Crypto_x64_vs100.sln
Normal file
60
Crypto/Crypto_x64_vs100.sln
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
|
# Visual Studio 2010
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Crypto", "Crypto_x64_vs100.vcxproj", "{EEEE7259-32E9-4D56-B023-C733940AB2A0}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_x64_vs100.vcxproj", "{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0} = {EEEE7259-32E9-4D56-B023-C733940AB2A0}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
debug_shared|x64 = debug_shared|x64
|
||||||
|
release_shared|x64 = release_shared|x64
|
||||||
|
debug_static_mt|x64 = debug_static_mt|x64
|
||||||
|
release_static_mt|x64 = release_static_mt|x64
|
||||||
|
debug_static_md|x64 = debug_static_md|x64
|
||||||
|
release_static_md|x64 = release_static_md|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_shared|x64.Build.0 = release_shared|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|x64.Build.0 = release_shared|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
300
Crypto/Crypto_x64_vs100.vcxproj
Normal file
300
Crypto/Crypto_x64_vs100.vcxproj
Normal file
@@ -0,0 +1,300 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="debug_shared|x64">
|
||||||
|
<Configuration>debug_shared</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_md|x64">
|
||||||
|
<Configuration>debug_static_md</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_mt|x64">
|
||||||
|
<Configuration>debug_static_mt</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_shared|x64">
|
||||||
|
<Configuration>release_shared</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_md|x64">
|
||||||
|
<Configuration>release_static_md</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_mt|x64">
|
||||||
|
<Configuration>release_static_mt</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectName>Crypto</ProjectName>
|
||||||
|
<ProjectGuid>{EEEE7259-32E9-4D56-B023-C733940AB2A0}</ProjectGuid>
|
||||||
|
<RootNamespace>Crypto</RootNamespace>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||||
|
<ImportGroup Label="ExtensionSettings"/>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros"/>
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">..\bin64\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">obj64\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">..\bin64\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">obj64\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">..\lib64\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">obj64\$(Configuration)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">..\lib64\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">obj64\$(Configuration)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">..\lib64\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">obj64\$(Configuration)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">..\lib64\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">obj64\$(Configuration)\</IntDir>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">PocoCrypto64d</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">PocoCryptomdd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">PocoCryptomtd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">PocoCrypto64</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">PocoCryptomd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">PocoCryptomt</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;Crypto_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>ws2_32.lib;iphlpapi.lib;libeay32mdd.lib;ssleay32mdd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>..\bin64\PocoCrypto64d.dll</OutputFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>..\bin64\PocoCrypto64d.pdb</ProgramDatabaseFile>
|
||||||
|
<AdditionalLibraryDirectories>..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<ImportLibrary>..\lib64\PocoCryptod.lib</ImportLibrary>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;Crypto_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>ws2_32.lib;iphlpapi.lib;libeay32md.lib;ssleay32md.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>..\bin64\PocoCrypto64.dll</OutputFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<ImportLibrary>..\lib64\PocoCrypto.lib</ImportLibrary>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<ProgramDataBaseFileName>..\lib64\PocoCryptomtd.pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\lib64\PocoCryptomtd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\lib64\PocoCryptomt.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<ProgramDataBaseFileName>..\lib64\PocoCryptomdd.pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\lib64\PocoCryptomdd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>..\lib64\PocoCryptomd.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\Cipher.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CipherFactory.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CipherImpl.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CipherKey.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CipherKeyImpl.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CryptoStream.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CryptoTransform.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\RSACipherImpl.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\RSADigestEngine.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\RSAKey.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\RSAKeyImpl.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\X509Certificate.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\Crypto.h"/>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\OpenSSLInitializer.h"/>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\Cipher.cpp"/>
|
||||||
|
<ClCompile Include="src\CipherFactory.cpp"/>
|
||||||
|
<ClCompile Include="src\CipherImpl.cpp"/>
|
||||||
|
<ClCompile Include="src\CipherKey.cpp"/>
|
||||||
|
<ClCompile Include="src\CipherKeyImpl.cpp"/>
|
||||||
|
<ClCompile Include="src\CryptoStream.cpp"/>
|
||||||
|
<ClCompile Include="src\CryptoTransform.cpp"/>
|
||||||
|
<ClCompile Include="src\RSACipherImpl.cpp"/>
|
||||||
|
<ClCompile Include="src\RSADigestEngine.cpp"/>
|
||||||
|
<ClCompile Include="src\RSAKey.cpp"/>
|
||||||
|
<ClCompile Include="src\RSAKeyImpl.cpp"/>
|
||||||
|
<ClCompile Include="src\X509Certificate.cpp"/>
|
||||||
|
<ClCompile Include="src\OpenSSLInitializer.cpp"/>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||||
|
<ImportGroup Label="ExtensionTargets"/>
|
||||||
|
</Project>
|
||||||
126
Crypto/Crypto_x64_vs100.vcxproj.filters
Normal file
126
Crypto/Crypto_x64_vs100.vcxproj.filters
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Cipher">
|
||||||
|
<UniqueIdentifier>{fb87242a-c5c9-427d-8c5b-ff7e973a09d2}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Cipher\Header Files">
|
||||||
|
<UniqueIdentifier>{29625e7a-4c64-4f46-a160-696f5df0bf0f}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Cipher\Source Files">
|
||||||
|
<UniqueIdentifier>{863b337e-7970-47a3-8c3a-ac7ca18fff1a}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="RSA">
|
||||||
|
<UniqueIdentifier>{9bfb5ff5-db5b-4920-b1fa-4f670bb6ed15}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="RSA\Header Files">
|
||||||
|
<UniqueIdentifier>{987d81ee-3336-4a5c-9bda-1e58081dea22}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="RSA\Source Files">
|
||||||
|
<UniqueIdentifier>{7fd9a8fd-a722-4926-a7ed-3b4bc1bd51d3}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Certificate">
|
||||||
|
<UniqueIdentifier>{8ac4a3ba-cfae-43d5-997d-c2a61fdfd88b}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Certificate\Header Files">
|
||||||
|
<UniqueIdentifier>{78a5514f-52e9-437f-98ac-c03037383c4a}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Certificate\Source Files">
|
||||||
|
<UniqueIdentifier>{e986f474-79c0-4f8e-aace-1fa5b5c8b609}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="CryptoCore">
|
||||||
|
<UniqueIdentifier>{0a48cb3b-08ac-4a8c-9197-1d02406f7e58}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="CryptoCore\Header Files">
|
||||||
|
<UniqueIdentifier>{3ac5d95d-62d7-46c2-8acb-7e3b2b5e24f0}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="CryptoCore\Source Files">
|
||||||
|
<UniqueIdentifier>{52c2a894-ba8f-4207-83c1-7c10309b15fc}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\Cipher.h">
|
||||||
|
<Filter>Cipher\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CipherFactory.h">
|
||||||
|
<Filter>Cipher\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CipherImpl.h">
|
||||||
|
<Filter>Cipher\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CipherKey.h">
|
||||||
|
<Filter>Cipher\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CipherKeyImpl.h">
|
||||||
|
<Filter>Cipher\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CryptoStream.h">
|
||||||
|
<Filter>Cipher\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CryptoTransform.h">
|
||||||
|
<Filter>Cipher\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\RSACipherImpl.h">
|
||||||
|
<Filter>RSA\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\RSADigestEngine.h">
|
||||||
|
<Filter>RSA\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\RSAKey.h">
|
||||||
|
<Filter>RSA\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\RSAKeyImpl.h">
|
||||||
|
<Filter>RSA\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\X509Certificate.h">
|
||||||
|
<Filter>Certificate\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\Crypto.h">
|
||||||
|
<Filter>CryptoCore\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Crypto\OpenSSLInitializer.h">
|
||||||
|
<Filter>CryptoCore\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\Cipher.cpp">
|
||||||
|
<Filter>Cipher\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\CipherFactory.cpp">
|
||||||
|
<Filter>Cipher\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\CipherImpl.cpp">
|
||||||
|
<Filter>Cipher\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\CipherKey.cpp">
|
||||||
|
<Filter>Cipher\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\CipherKeyImpl.cpp">
|
||||||
|
<Filter>Cipher\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\CryptoStream.cpp">
|
||||||
|
<Filter>Cipher\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\CryptoTransform.cpp">
|
||||||
|
<Filter>Cipher\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\RSACipherImpl.cpp">
|
||||||
|
<Filter>RSA\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\RSADigestEngine.cpp">
|
||||||
|
<Filter>RSA\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\RSAKey.cpp">
|
||||||
|
<Filter>RSA\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\RSAKeyImpl.cpp">
|
||||||
|
<Filter>RSA\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\X509Certificate.cpp">
|
||||||
|
<Filter>Certificate\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\OpenSSLInitializer.cpp">
|
||||||
|
<Filter>CryptoCore\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
3
Crypto/Crypto_x64_vs100.vcxproj.user
Normal file
3
Crypto/Crypto_x64_vs100.vcxproj.user
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
</Project>
|
||||||
@@ -112,9 +112,12 @@ public:
|
|||||||
enum Encoding
|
enum Encoding
|
||||||
/// Transport encoding to use for encryptString() and decryptString().
|
/// Transport encoding to use for encryptString() and decryptString().
|
||||||
{
|
{
|
||||||
ENC_NONE, /// Plain binary output
|
ENC_NONE = 0x00, /// Plain binary output
|
||||||
ENC_BASE64, /// Base64-encoded output
|
ENC_BASE64 = 0x01, /// Base64-encoded output
|
||||||
ENC_BINHEX /// BinHex-encoded output
|
ENC_BINHEX = 0x02, /// BinHex-encoded output
|
||||||
|
ENC_BASE64_NO_LF = 0x81, /// Base64-encoded output, no linefeeds
|
||||||
|
ENC_BINHEX_NO_LF = 0x82, /// BinHex-encoded output, no linefeeds
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual ~Cipher();
|
virtual ~Cipher();
|
||||||
|
|||||||
@@ -86,8 +86,6 @@ public:
|
|||||||
/// Returns the default CipherFactory.
|
/// Returns the default CipherFactory.
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static int _instanceCount;
|
|
||||||
|
|
||||||
CipherFactory(const CipherFactory&);
|
CipherFactory(const CipherFactory&);
|
||||||
CipherFactory& operator = (const CipherFactory&);
|
CipherFactory& operator = (const CipherFactory&);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// CipherImpl.h
|
// CipherImpl.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/Main/Crypto/include/Poco/Crypto/CipherImpl.h#3 $
|
// $Id: //poco/1.4/Crypto/include/Poco/Crypto/CipherImpl.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Crypto
|
// Library: Crypto
|
||||||
// Package: Cipher
|
// Package: Cipher
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
#include "Poco/Crypto/Crypto.h"
|
#include "Poco/Crypto/Crypto.h"
|
||||||
#include "Poco/Crypto/Cipher.h"
|
#include "Poco/Crypto/Cipher.h"
|
||||||
#include "Poco/Crypto/CipherKey.h"
|
#include "Poco/Crypto/CipherKey.h"
|
||||||
|
#include "Poco/Crypto/OpenSSLInitializer.h"
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -72,6 +72,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
CipherKey _key;
|
CipherKey _key;
|
||||||
|
OpenSSLInitializer _openSSLInitializer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// CipherKey.h
|
// CipherKey.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/Main/Crypto/include/Poco/Crypto/CipherKey.h#2 $
|
// $Id: //poco/1.4/Crypto/include/Poco/Crypto/CipherKey.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Crypto
|
// Library: Crypto
|
||||||
// Package: Cipher
|
// Package: Cipher
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// CipherKeyImpl.h
|
// CipherKeyImpl.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/Main/Crypto/include/Poco/Crypto/CipherKeyImpl.h#2 $
|
// $Id: //poco/1.4/Crypto/include/Poco/Crypto/CipherKeyImpl.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Crypto
|
// Library: Crypto
|
||||||
// Package: Cipher
|
// Package: Cipher
|
||||||
@@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "Poco/Crypto/Crypto.h"
|
#include "Poco/Crypto/Crypto.h"
|
||||||
|
#include "Poco/Crypto/OpenSSLInitializer.h"
|
||||||
#include "Poco/RefCountedObject.h"
|
#include "Poco/RefCountedObject.h"
|
||||||
#include "Poco/AutoPtr.h"
|
#include "Poco/AutoPtr.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@@ -140,6 +141,7 @@ private:
|
|||||||
std::string _name;
|
std::string _name;
|
||||||
ByteVec _key;
|
ByteVec _key;
|
||||||
ByteVec _iv;
|
ByteVec _iv;
|
||||||
|
OpenSSLInitializer _openSSLInitializer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,12 @@
|
|||||||
#define Crypto_Crypto_INCLUDED
|
#define Crypto_Crypto_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
// OS X 10.7 deprecates some OpenSSL functions
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include "Poco/Foundation.h"
|
#include "Poco/Foundation.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -93,21 +99,37 @@ enum RSAPaddingMode
|
|||||||
//
|
//
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
#if !defined(POCO_NO_AUTOMATIC_LIBS) && !defined(Crypto_EXPORTS)
|
#if !defined(POCO_NO_AUTOMATIC_LIBS) && !defined(Crypto_EXPORTS)
|
||||||
#if defined(POCO_DLL)
|
#pragma comment(lib, "PocoCrypto" POCO_LIB_SUFFIX)
|
||||||
#if defined(_DEBUG)
|
|
||||||
#pragma comment(lib, "PocoCryptod.lib")
|
|
||||||
#else
|
|
||||||
#pragma comment(lib, "PocoCrypto.lib")
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#if defined(_DEBUG)
|
|
||||||
#pragma comment(lib, "PocoCryptomtd.lib")
|
|
||||||
#else
|
|
||||||
#pragma comment(lib, "PocoCryptomt.lib")
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace Crypto {
|
||||||
|
|
||||||
|
|
||||||
|
void Crypto_API initializeCrypto();
|
||||||
|
/// Initialize the Crypto library, as well as the underlying OpenSSL
|
||||||
|
/// libraries, by calling OpenSSLInitializer::initialize().
|
||||||
|
///
|
||||||
|
/// Should be called before using any class from the Crypto library.
|
||||||
|
/// The Crypto library will be initialized automatically, through
|
||||||
|
/// OpenSSLInitializer instances held by various Crypto classes
|
||||||
|
/// (Cipher, CipherKey, RSAKey, X509Certificate).
|
||||||
|
/// However, it is recommended to call initializeCrypto()
|
||||||
|
/// in any case at application startup.
|
||||||
|
///
|
||||||
|
/// Can be called multiple times; however, for every call to
|
||||||
|
/// initializeCrypto(), a matching call to uninitializeCrypto()
|
||||||
|
/// must be performed.
|
||||||
|
|
||||||
|
|
||||||
|
void Crypto_API uninitializeCrypto();
|
||||||
|
/// Uninitializes the Crypto library by calling
|
||||||
|
/// OpenSSLInitializer::uninitialize().
|
||||||
|
|
||||||
|
|
||||||
|
} } // namespace Poco::Crypto
|
||||||
|
|
||||||
|
|
||||||
#endif // Crypto_Crypto_INCLUDED
|
#endif // Crypto_Crypto_INCLUDED
|
||||||
|
|||||||
@@ -150,6 +150,64 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class Crypto_API DecryptingInputStream: public CryptoIOS, public std::istream
|
||||||
|
/// This stream decrypts all data passing through it using the given
|
||||||
|
/// Cipher.
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DecryptingInputStream(std::istream& istr, Cipher& cipher, std::streamsize bufferSize = 8192);
|
||||||
|
/// Create a new DecryptingInputStream object using the given cipher.
|
||||||
|
|
||||||
|
~DecryptingInputStream();
|
||||||
|
/// Destroys the DecryptingInputStream.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class Crypto_API DecryptingOutputStream: public CryptoIOS, public std::ostream
|
||||||
|
/// This stream decrypts all data passing through it using the given
|
||||||
|
/// Cipher.
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DecryptingOutputStream(std::ostream& ostr, Cipher& cipher, std::streamsize bufferSize = 8192);
|
||||||
|
/// Create a new DecryptingOutputStream object using the given cipher.
|
||||||
|
|
||||||
|
~DecryptingOutputStream();
|
||||||
|
/// Destroys the DecryptingOutputStream.
|
||||||
|
|
||||||
|
void close();
|
||||||
|
/// Flushes all buffers and finishes the decryption.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class Crypto_API EncryptingInputStream: public CryptoIOS, public std::istream
|
||||||
|
/// This stream encrypts all data passing through it using the given
|
||||||
|
/// Cipher.
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
EncryptingInputStream(std::istream& istr, Cipher& cipher, std::streamsize bufferSize = 8192);
|
||||||
|
/// Create a new EncryptingInputStream object using the given cipher.
|
||||||
|
|
||||||
|
~EncryptingInputStream();
|
||||||
|
/// Destroys the EncryptingInputStream.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class Crypto_API EncryptingOutputStream: public CryptoIOS, public std::ostream
|
||||||
|
/// This stream encrypts all data passing through it using the given
|
||||||
|
/// Cipher.
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
EncryptingOutputStream(std::ostream& ostr, Cipher& cipher, std::streamsize bufferSize = 8192);
|
||||||
|
/// Create a new EncryptingOutputStream object using the given cipher.
|
||||||
|
|
||||||
|
~EncryptingOutputStream();
|
||||||
|
/// Destroys the EncryptingOutputStream.
|
||||||
|
|
||||||
|
void close();
|
||||||
|
/// Flushes all buffers and finishes the encryption.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
} } // namespace Poco::Crypto
|
} } // namespace Poco::Crypto
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -74,13 +74,13 @@ public:
|
|||||||
/// Transforms a chunk of data. The inputLength is arbitrary and does not
|
/// Transforms a chunk of data. The inputLength is arbitrary and does not
|
||||||
/// need to be a multiple of the block size. The output buffer has a maximum
|
/// need to be a multiple of the block size. The output buffer has a maximum
|
||||||
/// capacity of the given outputLength that must be at least
|
/// capacity of the given outputLength that must be at least
|
||||||
/// inputLength + bufferSize() - 1
|
/// inputLength + blockSize() - 1
|
||||||
/// Returns the number of bytes written to the output buffer.
|
/// Returns the number of bytes written to the output buffer.
|
||||||
|
|
||||||
virtual std::streamsize finalize(unsigned char* output, std::streamsize length) = 0;
|
virtual std::streamsize finalize(unsigned char* output, std::streamsize length) = 0;
|
||||||
/// Finalizes the transformation. The output buffer must contain enough
|
/// Finalizes the transformation. The output buffer must contain enough
|
||||||
/// space for at least one block, ie.
|
/// space for at least two blocks, ie.
|
||||||
/// length >= bufferSize()
|
/// length >= 2*blockSize()
|
||||||
/// must be true. Returns the number of bytes written to the output
|
/// must be true. Returns the number of bytes written to the output
|
||||||
/// buffer.
|
/// buffer.
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// OpenSSLInitializer.h
|
// OpenSSLInitializer.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/Main/Crypto/include/Poco/Crypto/OpenSSLInitializer.h#1 $
|
// $Id: //poco/1.4/Crypto/include/Poco/Crypto/OpenSSLInitializer.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Crypto
|
// Library: Crypto
|
||||||
// Package: CryptoCore
|
// Package: CryptoCore
|
||||||
@@ -42,6 +42,10 @@
|
|||||||
|
|
||||||
#include "Poco/Crypto/Crypto.h"
|
#include "Poco/Crypto/Crypto.h"
|
||||||
#include "Poco/Mutex.h"
|
#include "Poco/Mutex.h"
|
||||||
|
#include <openssl/opensslconf.h>
|
||||||
|
#ifdef OPENSSL_FIPS
|
||||||
|
#include <openssl/fips.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
@@ -76,6 +80,12 @@ public:
|
|||||||
static void uninitialize();
|
static void uninitialize();
|
||||||
/// Shuts down the OpenSSL machinery.
|
/// Shuts down the OpenSSL machinery.
|
||||||
|
|
||||||
|
static bool isFIPSEnabled();
|
||||||
|
// Returns true if FIPS mode is enabled, false otherwise.
|
||||||
|
|
||||||
|
static void enableFIPSMode(bool enabled);
|
||||||
|
// Enable or disable FIPS mode. If FIPS is not available, this method doesn't do anything.
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@@ -91,10 +101,32 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
static Poco::FastMutex* _mutexes;
|
static Poco::FastMutex* _mutexes;
|
||||||
|
static Poco::FastMutex _mutex;
|
||||||
static int _rc;
|
static int _rc;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// inlines
|
||||||
|
//
|
||||||
|
inline bool OpenSSLInitializer::isFIPSEnabled()
|
||||||
|
{
|
||||||
|
#ifdef OPENSSL_FIPS
|
||||||
|
return FIPS_mode() ? true : false;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void OpenSSLInitializer::enableFIPSMode(bool enabled)
|
||||||
|
{
|
||||||
|
#ifdef OPENSSL_FIPS
|
||||||
|
FIPS_mode_set(enabled);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} } // namespace Poco::Crypto
|
} } // namespace Poco::Crypto
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// RSACipherImpl.h
|
// RSACipherImpl.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/Main/Crypto/include/Poco/Crypto/RSACipherImpl.h#2 $
|
// $Id: //poco/1.4/Crypto/include/Poco/Crypto/RSACipherImpl.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Crypto
|
// Library: Crypto
|
||||||
// Package: RSA
|
// Package: RSA
|
||||||
@@ -43,6 +43,7 @@
|
|||||||
#include "Poco/Crypto/Crypto.h"
|
#include "Poco/Crypto/Crypto.h"
|
||||||
#include "Poco/Crypto/Cipher.h"
|
#include "Poco/Crypto/Cipher.h"
|
||||||
#include "Poco/Crypto/RSAKey.h"
|
#include "Poco/Crypto/RSAKey.h"
|
||||||
|
#include "Poco/Crypto/OpenSSLInitializer.h"
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -79,6 +80,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
RSAKey _key;
|
RSAKey _key;
|
||||||
RSAPaddingMode _paddingMode;
|
RSAPaddingMode _paddingMode;
|
||||||
|
OpenSSLInitializer _openSSLInitializer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// RSADigestEngine.h
|
// RSADigestEngine.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/Main/Crypto/include/Poco/Crypto/RSADigestEngine.h#2 $
|
// $Id: //poco/1.4/Crypto/include/Poco/Crypto/RSADigestEngine.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Crypto
|
// Library: Crypto
|
||||||
// Package: RSA
|
// Package: RSA
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// RSAKey.h
|
// RSAKey.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/Main/Crypto/include/Poco/Crypto/RSAKey.h#4 $
|
// $Id: //poco/1.4/Crypto/include/Poco/Crypto/RSAKey.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Crypto
|
// Library: Crypto
|
||||||
// Package: RSA
|
// Package: RSA
|
||||||
@@ -98,6 +98,15 @@ public:
|
|||||||
int size() const;
|
int size() const;
|
||||||
/// Returns the RSA modulus size.
|
/// Returns the RSA modulus size.
|
||||||
|
|
||||||
|
RSAKeyImpl::ByteVec modulus() const;
|
||||||
|
/// Returns the RSA modulus.
|
||||||
|
|
||||||
|
RSAKeyImpl::ByteVec encryptionExponent() const;
|
||||||
|
/// Returns the RSA encryption exponent.
|
||||||
|
|
||||||
|
RSAKeyImpl::ByteVec decryptionExponent() const;
|
||||||
|
/// Returns the RSA decryption exponent.
|
||||||
|
|
||||||
void save(const std::string& publicKeyFile, const std::string& privateKeyFile = "", const std::string& privateKeyPassphrase = "");
|
void save(const std::string& publicKeyFile, const std::string& privateKeyFile = "", const std::string& privateKeyPassphrase = "");
|
||||||
/// Exports the public and private keys to the given files.
|
/// Exports the public and private keys to the given files.
|
||||||
///
|
///
|
||||||
@@ -110,7 +119,7 @@ public:
|
|||||||
/// If a null pointer is passed for a stream, the corresponding
|
/// If a null pointer is passed for a stream, the corresponding
|
||||||
/// key is not exported.
|
/// key is not exported.
|
||||||
|
|
||||||
RSAKeyImpl::Ptr impl();
|
RSAKeyImpl::Ptr impl() const;
|
||||||
/// Returns the impl object.
|
/// Returns the impl object.
|
||||||
|
|
||||||
const std::string& name() const;
|
const std::string& name() const;
|
||||||
@@ -124,7 +133,7 @@ private:
|
|||||||
//
|
//
|
||||||
// inlines
|
// inlines
|
||||||
//
|
//
|
||||||
inline RSAKeyImpl::Ptr RSAKey::impl()
|
inline RSAKeyImpl::Ptr RSAKey::impl() const
|
||||||
{
|
{
|
||||||
return _pImpl;
|
return _pImpl;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// RSAKeyImpl.h
|
// RSAKeyImpl.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/Main/Crypto/include/Poco/Crypto/RSAKeyImpl.h#3 $
|
// $Id: //poco/1.4/Crypto/include/Poco/Crypto/RSAKeyImpl.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Crypto
|
// Library: Crypto
|
||||||
// Package: RSA
|
// Package: RSA
|
||||||
@@ -41,13 +41,17 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "Poco/Crypto/Crypto.h"
|
#include "Poco/Crypto/Crypto.h"
|
||||||
|
#include "Poco/Crypto/OpenSSLInitializer.h"
|
||||||
#include "Poco/RefCountedObject.h"
|
#include "Poco/RefCountedObject.h"
|
||||||
#include "Poco/AutoPtr.h"
|
#include "Poco/AutoPtr.h"
|
||||||
#include <istream>
|
#include <istream>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
|
struct bignum_st;
|
||||||
struct rsa_st;
|
struct rsa_st;
|
||||||
|
typedef struct bignum_st BIGNUM;
|
||||||
typedef struct rsa_st RSA;
|
typedef struct rsa_st RSA;
|
||||||
|
|
||||||
|
|
||||||
@@ -63,6 +67,7 @@ class RSAKeyImpl: public Poco::RefCountedObject
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef Poco::AutoPtr<RSAKeyImpl> Ptr;
|
typedef Poco::AutoPtr<RSAKeyImpl> Ptr;
|
||||||
|
typedef std::vector<unsigned char> ByteVec;
|
||||||
|
|
||||||
explicit RSAKeyImpl(const X509Certificate& cert);
|
explicit RSAKeyImpl(const X509Certificate& cert);
|
||||||
/// Extracts the RSA public key from the given certificate.
|
/// Extracts the RSA public key from the given certificate.
|
||||||
@@ -93,6 +98,15 @@ public:
|
|||||||
int size() const;
|
int size() const;
|
||||||
/// Returns the RSA modulus size.
|
/// Returns the RSA modulus size.
|
||||||
|
|
||||||
|
ByteVec modulus() const;
|
||||||
|
/// Returns the RSA modulus.
|
||||||
|
|
||||||
|
ByteVec encryptionExponent() const;
|
||||||
|
/// Returns the RSA encryption exponent.
|
||||||
|
|
||||||
|
ByteVec decryptionExponent() const;
|
||||||
|
/// Returns the RSA decryption exponent.
|
||||||
|
|
||||||
void save(const std::string& publicKeyFile, const std::string& privateKeyFile = "", const std::string& privateKeyPassphrase = "");
|
void save(const std::string& publicKeyFile, const std::string& privateKeyFile = "", const std::string& privateKeyPassphrase = "");
|
||||||
/// Exports the public and private keys to the given files.
|
/// Exports the public and private keys to the given files.
|
||||||
///
|
///
|
||||||
@@ -106,11 +120,13 @@ public:
|
|||||||
/// key is not exported.
|
/// key is not exported.
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void init(const std::string& publicKeyFile, const std::string& privateKeyFile, const std::string& privateKeyPassphrase);
|
|
||||||
void freeRSA();
|
void freeRSA();
|
||||||
|
|
||||||
|
static ByteVec convertToByteVec(const BIGNUM* bn);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RSA* _pRSA;
|
RSA* _pRSA;
|
||||||
|
OpenSSLInitializer _openSSLInitializer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// X509Certificate.h
|
// X509Certificate.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/Main/Crypto/include/Poco/Crypto/X509Certificate.h#1 $
|
// $Id: //poco/1.4/Crypto/include/Poco/Crypto/X509Certificate.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Crypto
|
// Library: Crypto
|
||||||
// Package: Certificate
|
// Package: Certificate
|
||||||
@@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "Poco/Crypto/Crypto.h"
|
#include "Poco/Crypto/Crypto.h"
|
||||||
|
#include "Poco/Crypto/OpenSSLInitializer.h"
|
||||||
#include "Poco/DateTime.h"
|
#include "Poco/DateTime.h"
|
||||||
#include "Poco/SharedPtr.h"
|
#include "Poco/SharedPtr.h"
|
||||||
#include <set>
|
#include <set>
|
||||||
@@ -81,6 +82,12 @@ public:
|
|||||||
/// OpenSSL certificate. Ownership is taken of
|
/// OpenSSL certificate. Ownership is taken of
|
||||||
/// the certificate.
|
/// the certificate.
|
||||||
|
|
||||||
|
X509Certificate(X509* pCert, bool shared);
|
||||||
|
/// Creates the X509Certificate from an existing
|
||||||
|
/// OpenSSL certificate. Ownership is taken of
|
||||||
|
/// the certificate. If shared is true, the
|
||||||
|
/// certificate's reference count is incremented.
|
||||||
|
|
||||||
X509Certificate(const X509Certificate& cert);
|
X509Certificate(const X509Certificate& cert);
|
||||||
/// Creates the certificate by copying another one.
|
/// Creates the certificate by copying another one.
|
||||||
|
|
||||||
@@ -167,6 +174,7 @@ private:
|
|||||||
std::string _issuerName;
|
std::string _issuerName;
|
||||||
std::string _subjectName;
|
std::string _subjectName;
|
||||||
X509* _pCert;
|
X509* _pCert;
|
||||||
|
OpenSSLInitializer _openSSLInitializer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
299
Crypto/samples/genrsakey/genrsakey_vs100.vcxproj
Normal file
299
Crypto/samples/genrsakey/genrsakey_vs100.vcxproj
Normal file
@@ -0,0 +1,299 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="debug_shared|Win32">
|
||||||
|
<Configuration>debug_shared</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_md|Win32">
|
||||||
|
<Configuration>debug_static_md</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_mt|Win32">
|
||||||
|
<Configuration>debug_static_mt</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_shared|Win32">
|
||||||
|
<Configuration>release_shared</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_md|Win32">
|
||||||
|
<Configuration>release_static_md</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_mt|Win32">
|
||||||
|
<Configuration>release_static_mt</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectName>genrsakey</ProjectName>
|
||||||
|
<ProjectGuid>{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}</ProjectGuid>
|
||||||
|
<RootNamespace>genrsakey</RootNamespace>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||||
|
<ImportGroup Label="ExtensionSettings"/>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros"/>
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">bin\static_mt\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">bin\static_mt\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">bin\static_md\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">bin\static_md\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">false</LinkIncremental>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">genrsakeyd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">genrsakeyd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">genrsakeyd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">genrsakey</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">genrsakey</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">genrsakey</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>libeay32mdd.lib;ssleay32mdd.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin\genrsakeyd.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>bin\genrsakeyd.pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>libeay32md.lib;ssleay32md.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin\genrsakey.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>iphlpapi.lib;winmm.lib;libeay32mtd.lib;ssleay32mtd.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin\static_mt\genrsakeyd.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>bin\static_mt\genrsakeyd.pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>iphlpapi.lib;winmm.lib;libeay32mt.lib;ssleay32mt.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin\static_mt\genrsakey.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>iphlpapi.lib;winmm.lib;libeay32mdd.lib;ssleay32mdd.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin\static_md\genrsakeyd.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>bin\static_md\genrsakeyd.pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>iphlpapi.lib;winmm.lib;libeay32md.lib;ssleay32md.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin\static_md\genrsakey.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\genrsakey.cpp"/>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||||
|
<ImportGroup Label="ExtensionTargets"/>
|
||||||
|
</Project>
|
||||||
16
Crypto/samples/genrsakey/genrsakey_vs100.vcxproj.filters
Normal file
16
Crypto/samples/genrsakey/genrsakey_vs100.vcxproj.filters
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{2f5e2e4e-b67c-4294-a0e8-ab365c385188}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{ddceacf3-18d3-4f0e-9c38-52ef1facbdb2}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\genrsakey.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
3
Crypto/samples/genrsakey/genrsakey_vs100.vcxproj.user
Normal file
3
Crypto/samples/genrsakey/genrsakey_vs100.vcxproj.user
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
</Project>
|
||||||
299
Crypto/samples/genrsakey/genrsakey_x64_vs100.vcxproj
Normal file
299
Crypto/samples/genrsakey/genrsakey_x64_vs100.vcxproj
Normal file
@@ -0,0 +1,299 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="debug_shared|x64">
|
||||||
|
<Configuration>debug_shared</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_md|x64">
|
||||||
|
<Configuration>debug_static_md</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_mt|x64">
|
||||||
|
<Configuration>debug_static_mt</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_shared|x64">
|
||||||
|
<Configuration>release_shared</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_md|x64">
|
||||||
|
<Configuration>release_static_md</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_mt|x64">
|
||||||
|
<Configuration>release_static_mt</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectName>genrsakey</ProjectName>
|
||||||
|
<ProjectGuid>{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}</ProjectGuid>
|
||||||
|
<RootNamespace>genrsakey</RootNamespace>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||||
|
<ImportGroup Label="ExtensionSettings"/>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros"/>
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">bin64\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">obj64\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">bin64\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">obj64\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">bin64\static_mt\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">obj64\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">bin64\static_mt\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">obj64\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">bin64\static_md\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">obj64\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">bin64\static_md\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">obj64\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">false</LinkIncremental>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">genrsakeyd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">genrsakeyd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">genrsakeyd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">genrsakey</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">genrsakey</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">genrsakey</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>libeay32mdd.lib;ssleay32mdd.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin64\genrsakeyd.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>bin64\genrsakeyd.pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>libeay32md.lib;ssleay32md.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin64\genrsakey.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>iphlpapi.lib;winmm.lib;libeay32mtd.lib;ssleay32mtd.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin64\static_mt\genrsakeyd.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>bin64\static_mt\genrsakeyd.pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>iphlpapi.lib;winmm.lib;libeay32mt.lib;ssleay32mt.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin64\static_mt\genrsakey.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>iphlpapi.lib;winmm.lib;libeay32mdd.lib;ssleay32mdd.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin64\static_md\genrsakeyd.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>bin64\static_md\genrsakeyd.pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>.\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>iphlpapi.lib;winmm.lib;libeay32md.lib;ssleay32md.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin64\static_md\genrsakey.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\genrsakey.cpp"/>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||||
|
<ImportGroup Label="ExtensionTargets"/>
|
||||||
|
</Project>
|
||||||
16
Crypto/samples/genrsakey/genrsakey_x64_vs100.vcxproj.filters
Normal file
16
Crypto/samples/genrsakey/genrsakey_x64_vs100.vcxproj.filters
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{d5e71565-88ad-4723-be38-89454c846186}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{956a2b06-5184-458d-8776-0a95bd329772}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\genrsakey.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
</Project>
|
||||||
@@ -72,6 +72,12 @@ public:
|
|||||||
_name(),
|
_name(),
|
||||||
_pwd()
|
_pwd()
|
||||||
{
|
{
|
||||||
|
Poco::Crypto::initializeCrypto();
|
||||||
|
}
|
||||||
|
|
||||||
|
~RSAApp()
|
||||||
|
{
|
||||||
|
Poco::Crypto::uninitializeCrypto();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
37
Crypto/samples/samples_vs100.sln
Normal file
37
Crypto/samples/samples_vs100.sln
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
|
# Visual Studio 2010
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genrsakey", "genrsakey\genrsakey_vs100.vcxproj", "{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
debug_shared|Win32 = debug_shared|Win32
|
||||||
|
release_shared|Win32 = release_shared|Win32
|
||||||
|
debug_static_mt|Win32 = debug_static_mt|Win32
|
||||||
|
release_static_mt|Win32 = release_static_mt|Win32
|
||||||
|
debug_static_md|Win32 = debug_static_md|Win32
|
||||||
|
release_static_md|Win32 = release_static_md|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
37
Crypto/samples/samples_x64_vs100.sln
Normal file
37
Crypto/samples/samples_x64_vs100.sln
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
|
# Visual Studio 2010
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genrsakey", "genrsakey\genrsakey_x64_vs100.vcxproj", "{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
debug_shared|x64 = debug_shared|x64
|
||||||
|
release_shared|x64 = release_shared|x64
|
||||||
|
debug_static_mt|x64 = debug_static_mt|x64
|
||||||
|
release_static_mt|x64 = release_static_mt|x64
|
||||||
|
debug_static_md|x64 = debug_static_md|x64
|
||||||
|
release_static_md|x64 = release_static_md|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|x64.Build.0 = release_shared|x64
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||||
|
{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -93,16 +93,26 @@ void Cipher::encrypt(std::istream& source, std::ostream& sink, Encoding encoding
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ENC_BASE64:
|
case ENC_BASE64:
|
||||||
|
case ENC_BASE64_NO_LF:
|
||||||
{
|
{
|
||||||
Poco::Base64Encoder encoder(sink);
|
Poco::Base64Encoder encoder(sink);
|
||||||
|
if (encoding == ENC_BASE64_NO_LF)
|
||||||
|
{
|
||||||
|
encoder.rdbuf()->setLineLength(0);
|
||||||
|
}
|
||||||
StreamCopier::copyStream(encryptor, encoder);
|
StreamCopier::copyStream(encryptor, encoder);
|
||||||
encoder.close();
|
encoder.close();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ENC_BINHEX:
|
case ENC_BINHEX:
|
||||||
|
case ENC_BINHEX_NO_LF:
|
||||||
{
|
{
|
||||||
Poco::HexBinaryEncoder encoder(sink);
|
Poco::HexBinaryEncoder encoder(sink);
|
||||||
|
if (encoding == ENC_BINHEX_NO_LF)
|
||||||
|
{
|
||||||
|
encoder.rdbuf()->setLineLength(0);
|
||||||
|
}
|
||||||
StreamCopier::copyStream(encryptor, encoder);
|
StreamCopier::copyStream(encryptor, encoder);
|
||||||
encoder.close();
|
encoder.close();
|
||||||
}
|
}
|
||||||
@@ -126,6 +136,7 @@ void Cipher::decrypt(std::istream& source, std::ostream& sink, Encoding encoding
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ENC_BASE64:
|
case ENC_BASE64:
|
||||||
|
case ENC_BASE64_NO_LF:
|
||||||
{
|
{
|
||||||
Poco::Base64Decoder decoder(source);
|
Poco::Base64Decoder decoder(source);
|
||||||
StreamCopier::copyStream(decoder, decryptor);
|
StreamCopier::copyStream(decoder, decryptor);
|
||||||
@@ -134,6 +145,7 @@ void Cipher::decrypt(std::istream& source, std::ostream& sink, Encoding encoding
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ENC_BINHEX:
|
case ENC_BINHEX:
|
||||||
|
case ENC_BINHEX_NO_LF:
|
||||||
{
|
{
|
||||||
Poco::HexBinaryDecoder decoder(source);
|
Poco::HexBinaryDecoder decoder(source);
|
||||||
StreamCopier::copyStream(decoder, decryptor);
|
StreamCopier::copyStream(decoder, decryptor);
|
||||||
|
|||||||
@@ -50,34 +50,24 @@ namespace Poco {
|
|||||||
namespace Crypto {
|
namespace Crypto {
|
||||||
|
|
||||||
|
|
||||||
int CipherFactory::_instanceCount = 0;
|
|
||||||
|
|
||||||
|
|
||||||
CipherFactory::CipherFactory()
|
CipherFactory::CipherFactory()
|
||||||
{
|
{
|
||||||
if (_instanceCount == 0)
|
|
||||||
{
|
|
||||||
OpenSSL_add_all_algorithms();
|
|
||||||
ERR_load_crypto_strings();
|
|
||||||
}
|
|
||||||
++_instanceCount;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CipherFactory::~CipherFactory()
|
CipherFactory::~CipherFactory()
|
||||||
{
|
{
|
||||||
--_instanceCount;
|
|
||||||
if (_instanceCount == 0)
|
|
||||||
{
|
|
||||||
ERR_free_strings();
|
|
||||||
EVP_cleanup();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
static Poco::SingletonHolder<CipherFactory> holder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CipherFactory& CipherFactory::defaultFactory()
|
CipherFactory& CipherFactory::defaultFactory()
|
||||||
{
|
{
|
||||||
static Poco::SingletonHolder<CipherFactory> holder;
|
|
||||||
return *holder.get();
|
return *holder.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// CipherKey.cpp
|
// CipherKey.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/Main/Crypto/src/CipherKey.cpp#2 $
|
// $Id: //poco/1.4/Crypto/src/CipherKey.cpp#1 $
|
||||||
//
|
//
|
||||||
// Library: Crypto
|
// Library: Crypto
|
||||||
// Package: Cipher
|
// Package: Cipher
|
||||||
@@ -41,18 +41,13 @@ namespace Poco {
|
|||||||
namespace Crypto {
|
namespace Crypto {
|
||||||
|
|
||||||
|
|
||||||
CipherKey::CipherKey(const std::string& name,
|
CipherKey::CipherKey(const std::string& name, const std::string& passphrase, const std::string& salt, int iterationCount):
|
||||||
const std::string& passphrase,
|
|
||||||
const std::string& salt,
|
|
||||||
int iterationCount):
|
|
||||||
_pImpl(new CipherKeyImpl(name, passphrase, salt, iterationCount))
|
_pImpl(new CipherKeyImpl(name, passphrase, salt, iterationCount))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CipherKey::CipherKey(const std::string& name,
|
CipherKey::CipherKey(const std::string& name, const ByteVec& key, const ByteVec& iv):
|
||||||
const ByteVec& key,
|
|
||||||
const ByteVec& iv):
|
|
||||||
_pImpl(new CipherKeyImpl(name, key, iv))
|
_pImpl(new CipherKeyImpl(name, key, iv))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// CipherKeyImpl.cpp
|
// CipherKeyImpl.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/Main/Crypto/src/CipherKeyImpl.cpp#3 $
|
// $Id: //poco/1.4/Crypto/src/CipherKeyImpl.cpp#1 $
|
||||||
//
|
//
|
||||||
// Library: Crypto
|
// Library: Crypto
|
||||||
// Package: Cipher
|
// Package: Cipher
|
||||||
|
|||||||
@@ -54,35 +54,29 @@ namespace Crypto {
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
CryptoStreamBuf::CryptoStreamBuf(
|
CryptoStreamBuf::CryptoStreamBuf(std::istream& istr, CryptoTransform* pTransform, std::streamsize bufferSize):
|
||||||
std::istream& istr,
|
|
||||||
CryptoTransform* pTransform,
|
|
||||||
std::streamsize bufferSize) :
|
|
||||||
Poco::BufferedStreamBuf(bufferSize, std::ios::in),
|
Poco::BufferedStreamBuf(bufferSize, std::ios::in),
|
||||||
_pTransform(pTransform),
|
_pTransform(pTransform),
|
||||||
_pIstr(&istr),
|
_pIstr(&istr),
|
||||||
_pOstr(0),
|
_pOstr(0),
|
||||||
_eof(false),
|
_eof(false),
|
||||||
_buffer(bufferSize)
|
_buffer(static_cast<std::size_t>(bufferSize))
|
||||||
{
|
{
|
||||||
poco_check_ptr (pTransform);
|
poco_check_ptr (pTransform);
|
||||||
poco_assert(bufferSize >= 2 * pTransform->blockSize());
|
poco_assert (bufferSize > 2 * pTransform->blockSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CryptoStreamBuf::CryptoStreamBuf(
|
CryptoStreamBuf::CryptoStreamBuf(std::ostream& ostr, CryptoTransform* pTransform, std::streamsize bufferSize):
|
||||||
std::ostream& ostr,
|
|
||||||
CryptoTransform* pTransform,
|
|
||||||
std::streamsize bufferSize) :
|
|
||||||
Poco::BufferedStreamBuf(bufferSize, std::ios::out),
|
Poco::BufferedStreamBuf(bufferSize, std::ios::out),
|
||||||
_pTransform(pTransform),
|
_pTransform(pTransform),
|
||||||
_pIstr(0),
|
_pIstr(0),
|
||||||
_pOstr(&ostr),
|
_pOstr(&ostr),
|
||||||
_eof(false),
|
_eof(false),
|
||||||
_buffer(bufferSize)
|
_buffer(static_cast<std::size_t>(bufferSize))
|
||||||
{
|
{
|
||||||
poco_check_ptr (pTransform);
|
poco_check_ptr (pTransform);
|
||||||
poco_assert(bufferSize >= 2 * pTransform->blockSize());
|
poco_assert (bufferSize > 2 * pTransform->blockSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -116,7 +110,7 @@ void CryptoStreamBuf::close()
|
|||||||
_pOstr = 0;
|
_pOstr = 0;
|
||||||
|
|
||||||
// Finalize transformation.
|
// Finalize transformation.
|
||||||
int n = _pTransform->finalize(_buffer.begin(), static_cast<std::streamsize>(_buffer.size()));
|
std::streamsize n = _pTransform->finalize(_buffer.begin(), static_cast<std::streamsize>(_buffer.size()));
|
||||||
|
|
||||||
if (n > 0)
|
if (n > 0)
|
||||||
{
|
{
|
||||||
@@ -137,12 +131,12 @@ int CryptoStreamBuf::readFromDevice(char* buffer, std::streamsize length)
|
|||||||
|
|
||||||
while (!_eof)
|
while (!_eof)
|
||||||
{
|
{
|
||||||
int m = static_cast<int>(length) - count - static_cast<int>(_pTransform->blockSize() - 1);
|
int m = (static_cast<int>(length) - count)/2 - static_cast<int>(_pTransform->blockSize());
|
||||||
|
|
||||||
// Make sure we can read at least one more block. Explicitely check
|
// Make sure we can read at least one more block. Explicitely check
|
||||||
// for m < 0 since blockSize() returns an unsigned int and the
|
// for m < 0 since blockSize() returns an unsigned int and the
|
||||||
// comparison might give fals results for m < 0.
|
// comparison might give false results for m < 0.
|
||||||
if (m < 0 || m < _pTransform->blockSize())
|
if (m <= 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
int n = 0;
|
int n = 0;
|
||||||
@@ -158,18 +152,18 @@ int CryptoStreamBuf::readFromDevice(char* buffer, std::streamsize length)
|
|||||||
_eof = true;
|
_eof = true;
|
||||||
|
|
||||||
// No more data, finalize transformation
|
// No more data, finalize transformation
|
||||||
count += _pTransform->finalize(
|
count += static_cast<int>(_pTransform->finalize(
|
||||||
reinterpret_cast<unsigned char*>(buffer + count),
|
reinterpret_cast<unsigned char*>(buffer + count),
|
||||||
length - count);
|
static_cast<int>(length) - count));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Transform next chunk of data
|
// Transform next chunk of data
|
||||||
count += _pTransform->transform(
|
count += static_cast<int>(_pTransform->transform(
|
||||||
_buffer.begin(),
|
_buffer.begin(),
|
||||||
n,
|
n,
|
||||||
reinterpret_cast<unsigned char*>(buffer + count),
|
reinterpret_cast<unsigned char*>(buffer + count),
|
||||||
length - count);
|
static_cast<int>(length) - count));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,18 +176,18 @@ int CryptoStreamBuf::writeToDevice(const char* buffer, std::streamsize length)
|
|||||||
if (!_pOstr)
|
if (!_pOstr)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
std::size_t maxChunkSize = _buffer.size() - (_pTransform->blockSize() - 1);
|
std::size_t maxChunkSize = _buffer.size()/2;
|
||||||
std::size_t count = 0;
|
std::size_t count = 0;
|
||||||
|
|
||||||
while (count < length)
|
while (count < length)
|
||||||
{
|
{
|
||||||
// Truncate chunk size so that the maximum output fits into _buffer.
|
// Truncate chunk size so that the maximum output fits into _buffer.
|
||||||
std::size_t n = length - count;
|
std::size_t n = static_cast<std::size_t>(length) - count;
|
||||||
if (n > maxChunkSize)
|
if (n > maxChunkSize)
|
||||||
n = maxChunkSize;
|
n = maxChunkSize;
|
||||||
|
|
||||||
// Transform next chunk of data
|
// Transform next chunk of data
|
||||||
int k = _pTransform->transform(
|
std::streamsize k = _pTransform->transform(
|
||||||
reinterpret_cast<const unsigned char*>(buffer + count),
|
reinterpret_cast<const unsigned char*>(buffer + count),
|
||||||
static_cast<std::streamsize>(n),
|
static_cast<std::streamsize>(n),
|
||||||
_buffer.begin(),
|
_buffer.begin(),
|
||||||
@@ -221,20 +215,14 @@ int CryptoStreamBuf::writeToDevice(const char* buffer, std::streamsize length)
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
CryptoIOS::CryptoIOS(
|
CryptoIOS::CryptoIOS(std::istream& istr, CryptoTransform* pTransform, std::streamsize bufferSize):
|
||||||
std::istream& istr,
|
|
||||||
CryptoTransform* pTransform,
|
|
||||||
std::streamsize bufferSize) :
|
|
||||||
_buf(istr, pTransform, bufferSize)
|
_buf(istr, pTransform, bufferSize)
|
||||||
{
|
{
|
||||||
poco_ios_init(&_buf);
|
poco_ios_init(&_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CryptoIOS::CryptoIOS(
|
CryptoIOS::CryptoIOS(std::ostream& ostr, CryptoTransform* pTransform, std::streamsize bufferSize):
|
||||||
std::ostream& ostr,
|
|
||||||
CryptoTransform* pTransform,
|
|
||||||
std::streamsize bufferSize) :
|
|
||||||
_buf(ostr, pTransform, bufferSize)
|
_buf(ostr, pTransform, bufferSize)
|
||||||
{
|
{
|
||||||
poco_ios_init(&_buf);
|
poco_ios_init(&_buf);
|
||||||
@@ -257,20 +245,14 @@ CryptoStreamBuf* CryptoIOS::rdbuf()
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
CryptoInputStream::CryptoInputStream(
|
CryptoInputStream::CryptoInputStream(std::istream& istr, CryptoTransform* pTransform, std::streamsize bufferSize):
|
||||||
std::istream& istr,
|
|
||||||
CryptoTransform* pTransform,
|
|
||||||
std::streamsize bufferSize) :
|
|
||||||
CryptoIOS(istr, pTransform, bufferSize),
|
CryptoIOS(istr, pTransform, bufferSize),
|
||||||
std::istream(&_buf)
|
std::istream(&_buf)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CryptoInputStream::CryptoInputStream(
|
CryptoInputStream::CryptoInputStream(std::istream& istr, Cipher& cipher, std::streamsize bufferSize):
|
||||||
std::istream& istr,
|
|
||||||
Cipher& cipher,
|
|
||||||
std::streamsize bufferSize) :
|
|
||||||
CryptoIOS(istr, cipher.createEncryptor(), bufferSize),
|
CryptoIOS(istr, cipher.createEncryptor(), bufferSize),
|
||||||
std::istream(&_buf)
|
std::istream(&_buf)
|
||||||
{
|
{
|
||||||
@@ -287,20 +269,14 @@ CryptoInputStream::~CryptoInputStream()
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
CryptoOutputStream::CryptoOutputStream(
|
CryptoOutputStream::CryptoOutputStream(std::ostream& ostr, CryptoTransform* pTransform, std::streamsize bufferSize):
|
||||||
std::ostream& ostr,
|
|
||||||
CryptoTransform* pTransform,
|
|
||||||
std::streamsize bufferSize) :
|
|
||||||
CryptoIOS(ostr, pTransform, bufferSize),
|
CryptoIOS(ostr, pTransform, bufferSize),
|
||||||
std::ostream(&_buf)
|
std::ostream(&_buf)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CryptoOutputStream::CryptoOutputStream(
|
CryptoOutputStream::CryptoOutputStream(std::ostream& ostr, Cipher& cipher, std::streamsize bufferSize):
|
||||||
std::ostream& ostr,
|
|
||||||
Cipher& cipher,
|
|
||||||
std::streamsize bufferSize):
|
|
||||||
CryptoIOS(ostr, cipher.createDecryptor(), bufferSize),
|
CryptoIOS(ostr, cipher.createDecryptor(), bufferSize),
|
||||||
std::ostream(&_buf)
|
std::ostream(&_buf)
|
||||||
{
|
{
|
||||||
@@ -318,4 +294,84 @@ void CryptoOutputStream::close()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// EncryptingInputStream
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
EncryptingInputStream::EncryptingInputStream(std::istream& istr, Cipher& cipher, std::streamsize bufferSize):
|
||||||
|
CryptoIOS(istr, cipher.createEncryptor(), bufferSize),
|
||||||
|
std::istream(&_buf)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
EncryptingInputStream::~EncryptingInputStream()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// EncryptingOuputStream
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
EncryptingOutputStream::EncryptingOutputStream(std::ostream& ostr, Cipher& cipher, std::streamsize bufferSize):
|
||||||
|
CryptoIOS(ostr, cipher.createEncryptor(), bufferSize),
|
||||||
|
std::ostream(&_buf)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
EncryptingOutputStream::~EncryptingOutputStream()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void EncryptingOutputStream::close()
|
||||||
|
{
|
||||||
|
_buf.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// DecryptingInputStream
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
DecryptingInputStream::DecryptingInputStream(std::istream& istr, Cipher& cipher, std::streamsize bufferSize):
|
||||||
|
CryptoIOS(istr, cipher.createDecryptor(), bufferSize),
|
||||||
|
std::istream(&_buf)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DecryptingInputStream::~DecryptingInputStream()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// DecryptingOuputStream
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
DecryptingOutputStream::DecryptingOutputStream(std::ostream& ostr, Cipher& cipher, std::streamsize bufferSize):
|
||||||
|
CryptoIOS(ostr, cipher.createDecryptor(), bufferSize),
|
||||||
|
std::ostream(&_buf)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DecryptingOutputStream::~DecryptingOutputStream()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DecryptingOutputStream::close()
|
||||||
|
{
|
||||||
|
_buf.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} } // namespace Poco::Crypto
|
} } // namespace Poco::Crypto
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// OpenSSLInitializer.cpp
|
// OpenSSLInitializer.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/Main/Crypto/src/OpenSSLInitializer.cpp#1 $
|
// $Id: //poco/1.4/Crypto/src/OpenSSLInitializer.cpp#1 $
|
||||||
//
|
//
|
||||||
// Library: Crypto
|
// Library: Crypto
|
||||||
// Package: CryotpCore
|
// Package: CryotpCore
|
||||||
@@ -41,24 +41,24 @@
|
|||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include <openssl/crypto.h>
|
#include <openssl/crypto.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
|
#if SSLEAY_VERSION_NUMBER >= 0x0907000L
|
||||||
|
#include <openssl/conf.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
using Poco::RandomInputStream;
|
using Poco::RandomInputStream;
|
||||||
using Poco::Thread;
|
using Poco::Thread;
|
||||||
using Poco::FastMutex;
|
|
||||||
|
|
||||||
|
|
||||||
namespace Poco {
|
namespace Poco {
|
||||||
namespace Crypto {
|
namespace Crypto {
|
||||||
|
|
||||||
|
|
||||||
FastMutex* OpenSSLInitializer::_mutexes(0);
|
Poco::FastMutex* OpenSSLInitializer::_mutexes(0);
|
||||||
|
Poco::FastMutex OpenSSLInitializer::_mutex;
|
||||||
int OpenSSLInitializer::_rc(0);
|
int OpenSSLInitializer::_rc(0);
|
||||||
|
|
||||||
|
|
||||||
static OpenSSLInitializer initializer;
|
|
||||||
|
|
||||||
|
|
||||||
OpenSSLInitializer::OpenSSLInitializer()
|
OpenSSLInitializer::OpenSSLInitializer()
|
||||||
{
|
{
|
||||||
initialize();
|
initialize();
|
||||||
@@ -73,10 +73,16 @@ OpenSSLInitializer::~OpenSSLInitializer()
|
|||||||
|
|
||||||
void OpenSSLInitializer::initialize()
|
void OpenSSLInitializer::initialize()
|
||||||
{
|
{
|
||||||
|
Poco::FastMutex::ScopedLock lock(_mutex);
|
||||||
|
|
||||||
if (++_rc == 1)
|
if (++_rc == 1)
|
||||||
{
|
{
|
||||||
poco_assert (1 == SSL_library_init()); // always returns 1
|
#if OPENSSL_VERSION_NUMBER >= 0x0907000L
|
||||||
|
OPENSSL_config(NULL);
|
||||||
|
#endif
|
||||||
|
SSL_library_init();
|
||||||
SSL_load_error_strings();
|
SSL_load_error_strings();
|
||||||
|
OpenSSL_add_all_algorithms();
|
||||||
|
|
||||||
char seed[SEEDSIZE];
|
char seed[SEEDSIZE];
|
||||||
RandomInputStream rnd;
|
RandomInputStream rnd;
|
||||||
@@ -84,7 +90,7 @@ void OpenSSLInitializer::initialize()
|
|||||||
RAND_seed(seed, SEEDSIZE);
|
RAND_seed(seed, SEEDSIZE);
|
||||||
|
|
||||||
int nMutexes = CRYPTO_num_locks();
|
int nMutexes = CRYPTO_num_locks();
|
||||||
_mutexes = new FastMutex[nMutexes];
|
_mutexes = new Poco::FastMutex[nMutexes];
|
||||||
CRYPTO_set_locking_callback(&OpenSSLInitializer::lock);
|
CRYPTO_set_locking_callback(&OpenSSLInitializer::lock);
|
||||||
#ifndef POCO_OS_FAMILY_WINDOWS // SF# 1828231: random unhandled exceptions when linking with ssl
|
#ifndef POCO_OS_FAMILY_WINDOWS // SF# 1828231: random unhandled exceptions when linking with ssl
|
||||||
CRYPTO_set_id_callback(&OpenSSLInitializer::id);
|
CRYPTO_set_id_callback(&OpenSSLInitializer::id);
|
||||||
@@ -98,6 +104,8 @@ void OpenSSLInitializer::initialize()
|
|||||||
|
|
||||||
void OpenSSLInitializer::uninitialize()
|
void OpenSSLInitializer::uninitialize()
|
||||||
{
|
{
|
||||||
|
Poco::FastMutex::ScopedLock lock(_mutex);
|
||||||
|
|
||||||
if (--_rc == 0)
|
if (--_rc == 0)
|
||||||
{
|
{
|
||||||
EVP_cleanup();
|
EVP_cleanup();
|
||||||
@@ -119,8 +127,10 @@ void OpenSSLInitializer::lock(int mode, int n, const char* file, int line)
|
|||||||
|
|
||||||
unsigned long OpenSSLInitializer::id()
|
unsigned long OpenSSLInitializer::id()
|
||||||
{
|
{
|
||||||
Thread* pThread = Thread::current();
|
// Note: we use an old-style C cast here because
|
||||||
return pThread ? pThread->id() : 0;
|
// neither static_cast<> nor reinterpret_cast<>
|
||||||
|
// work uniformly across all platforms.
|
||||||
|
return (unsigned long) Poco::Thread::currentTid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -147,4 +157,16 @@ void OpenSSLInitializer::dynlockDestroy(struct CRYPTO_dynlock_value* lock, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void initializeCrypto()
|
||||||
|
{
|
||||||
|
OpenSSLInitializer::initialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void uninitializeCrypto()
|
||||||
|
{
|
||||||
|
OpenSSLInitializer::uninitialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} } // namespace Poco::Crypto
|
} } // namespace Poco::Crypto
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// RSACipherImpl.cpp
|
// RSACipherImpl.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/Main/Crypto/src/RSACipherImpl.cpp#2 $
|
// $Id: //poco/1.4/Crypto/src/RSACipherImpl.cpp#1 $
|
||||||
//
|
//
|
||||||
// Library: Crypto
|
// Library: Crypto
|
||||||
// Package: RSA
|
// Package: RSA
|
||||||
@@ -86,15 +86,11 @@ namespace
|
|||||||
class RSAEncryptImpl: public CryptoTransform
|
class RSAEncryptImpl: public CryptoTransform
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum
|
|
||||||
{
|
|
||||||
OVERFLOW = 11
|
|
||||||
};
|
|
||||||
|
|
||||||
RSAEncryptImpl(const RSA* pRSA, RSAPaddingMode paddingMode);
|
RSAEncryptImpl(const RSA* pRSA, RSAPaddingMode paddingMode);
|
||||||
~RSAEncryptImpl();
|
~RSAEncryptImpl();
|
||||||
|
|
||||||
std::size_t blockSize() const;
|
std::size_t blockSize() const;
|
||||||
|
std::size_t maxDataSize() const;
|
||||||
|
|
||||||
std::streamsize transform(
|
std::streamsize transform(
|
||||||
const unsigned char* input,
|
const unsigned char* input,
|
||||||
@@ -124,7 +120,7 @@ namespace
|
|||||||
|
|
||||||
RSAEncryptImpl::~RSAEncryptImpl()
|
RSAEncryptImpl::~RSAEncryptImpl()
|
||||||
{
|
{
|
||||||
delete _pBuf;
|
delete [] _pBuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -134,6 +130,25 @@ namespace
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::size_t RSAEncryptImpl::maxDataSize() const
|
||||||
|
{
|
||||||
|
std::size_t size = blockSize();
|
||||||
|
switch (_paddingMode)
|
||||||
|
{
|
||||||
|
case RSA_PADDING_PKCS1:
|
||||||
|
case RSA_PADDING_SSLV23:
|
||||||
|
size -= 11;
|
||||||
|
break;
|
||||||
|
case RSA_PADDING_PKCS1_OAEP:
|
||||||
|
size -= 41;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
std::streamsize RSAEncryptImpl::transform(
|
std::streamsize RSAEncryptImpl::transform(
|
||||||
const unsigned char* input,
|
const unsigned char* input,
|
||||||
std::streamsize inputLength,
|
std::streamsize inputLength,
|
||||||
@@ -141,24 +156,25 @@ namespace
|
|||||||
std::streamsize outputLength)
|
std::streamsize outputLength)
|
||||||
{
|
{
|
||||||
// always fill up the buffer before writing!
|
// always fill up the buffer before writing!
|
||||||
|
std::streamsize maxSize = static_cast<std::streamsize>(maxDataSize());
|
||||||
std::streamsize rsaSize = static_cast<std::streamsize>(blockSize());
|
std::streamsize rsaSize = static_cast<std::streamsize>(blockSize());
|
||||||
poco_assert_dbg(_pos <= rsaSize);
|
poco_assert_dbg(_pos <= maxSize);
|
||||||
poco_assert (outputLength >= rsaSize);
|
poco_assert (outputLength >= rsaSize);
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
while (inputLength > 0)
|
while (inputLength > 0)
|
||||||
{
|
{
|
||||||
// check how many data bytes we are missing to get the buffer full
|
// check how many data bytes we are missing to get the buffer full
|
||||||
poco_assert_dbg (rsaSize >= _pos);
|
poco_assert_dbg (maxSize >= _pos);
|
||||||
std::streamsize missing = rsaSize - _pos;
|
std::streamsize missing = maxSize - _pos;
|
||||||
if (missing == 0)
|
if (missing == 0)
|
||||||
{
|
{
|
||||||
poco_assert (outputLength >= rsaSize);
|
poco_assert (outputLength >= rsaSize);
|
||||||
int tmp = RSA_public_encrypt(rsaSize, _pBuf, output, const_cast<RSA*>(_pRSA), RSA_NO_PADDING);
|
int n = RSA_public_encrypt(static_cast<int>(maxSize), _pBuf, output, const_cast<RSA*>(_pRSA), mapPaddingMode(_paddingMode));
|
||||||
if (tmp == -1)
|
if (n == -1)
|
||||||
throwError();
|
throwError();
|
||||||
rc += tmp;
|
rc += n;
|
||||||
output += tmp;
|
output += n;
|
||||||
outputLength -= tmp;
|
outputLength -= n;
|
||||||
_pos = 0;
|
_pos = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -167,13 +183,12 @@ namespace
|
|||||||
if (missing > inputLength)
|
if (missing > inputLength)
|
||||||
missing = inputLength;
|
missing = inputLength;
|
||||||
|
|
||||||
std::memcpy(_pBuf+_pos, input, missing);
|
std::memcpy(_pBuf + _pos, input, static_cast<std::size_t>(missing));
|
||||||
input += missing;
|
input += missing;
|
||||||
_pos += missing;
|
_pos += missing;
|
||||||
inputLength -= missing;
|
inputLength -= missing;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,14 +196,13 @@ namespace
|
|||||||
std::streamsize RSAEncryptImpl::finalize(unsigned char* output, std::streamsize length)
|
std::streamsize RSAEncryptImpl::finalize(unsigned char* output, std::streamsize length)
|
||||||
{
|
{
|
||||||
poco_assert (length >= blockSize());
|
poco_assert (length >= blockSize());
|
||||||
|
poco_assert (_pos <= maxDataSize());
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
if (_pos > 0)
|
if (_pos > 0)
|
||||||
{
|
{
|
||||||
rc = RSA_public_encrypt(_pos, _pBuf, output, const_cast<RSA*>(_pRSA), mapPaddingMode(_paddingMode));
|
rc = RSA_public_encrypt(static_cast<int>(_pos), _pBuf, output, const_cast<RSA*>(_pRSA), mapPaddingMode(_paddingMode));
|
||||||
if (rc == -1)
|
if (rc == -1) throwError();
|
||||||
throwError();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,11 +210,6 @@ namespace
|
|||||||
class RSADecryptImpl: public CryptoTransform
|
class RSADecryptImpl: public CryptoTransform
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum
|
|
||||||
{
|
|
||||||
OVERFLOW = 11
|
|
||||||
};
|
|
||||||
|
|
||||||
RSADecryptImpl(const RSA* pRSA, RSAPaddingMode paddingMode);
|
RSADecryptImpl(const RSA* pRSA, RSAPaddingMode paddingMode);
|
||||||
~RSADecryptImpl();
|
~RSADecryptImpl();
|
||||||
|
|
||||||
@@ -236,7 +245,7 @@ namespace
|
|||||||
|
|
||||||
RSADecryptImpl::~RSADecryptImpl()
|
RSADecryptImpl::~RSADecryptImpl()
|
||||||
{
|
{
|
||||||
delete _pBuf;
|
delete [] _pBuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -265,7 +274,7 @@ namespace
|
|||||||
std::streamsize missing = rsaSize - _pos;
|
std::streamsize missing = rsaSize - _pos;
|
||||||
if (missing == 0)
|
if (missing == 0)
|
||||||
{
|
{
|
||||||
int tmp = RSA_private_decrypt(rsaSize, _pBuf, output, const_cast<RSA*>(_pRSA), RSA_NO_PADDING);
|
int tmp = RSA_private_decrypt(static_cast<int>(rsaSize), _pBuf, output, const_cast<RSA*>(_pRSA), mapPaddingMode(_paddingMode));
|
||||||
if (tmp == -1)
|
if (tmp == -1)
|
||||||
throwError();
|
throwError();
|
||||||
rc += tmp;
|
rc += tmp;
|
||||||
@@ -279,13 +288,12 @@ namespace
|
|||||||
if (missing > inputLength)
|
if (missing > inputLength)
|
||||||
missing = inputLength;
|
missing = inputLength;
|
||||||
|
|
||||||
std::memcpy(_pBuf+_pos, input, missing);
|
std::memcpy(_pBuf + _pos, input, static_cast<std::size_t>(missing));
|
||||||
input += missing;
|
input += missing;
|
||||||
_pos += missing;
|
_pos += missing;
|
||||||
inputLength -= missing;
|
inputLength -= missing;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -296,11 +304,10 @@ namespace
|
|||||||
int rc = 0;
|
int rc = 0;
|
||||||
if (_pos > 0)
|
if (_pos > 0)
|
||||||
{
|
{
|
||||||
rc = RSA_private_decrypt(_pos, _pBuf, output, const_cast<RSA*>(_pRSA), mapPaddingMode(_paddingMode));
|
rc = RSA_private_decrypt(static_cast<int>(_pos), _pBuf, output, const_cast<RSA*>(_pRSA), mapPaddingMode(_paddingMode));
|
||||||
if (rc == -1)
|
if (rc == -1)
|
||||||
throwError();
|
throwError();
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// RSADigestEngine.cpp
|
// RSADigestEngine.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/Main/Crypto/src/RSADigestEngine.cpp#3 $
|
// $Id: //poco/1.4/Crypto/src/RSADigestEngine.cpp#1 $
|
||||||
//
|
//
|
||||||
// Library: Crypto
|
// Library: Crypto
|
||||||
// Package: RSA
|
// Package: RSA
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// RSAKey.cpp
|
// RSAKey.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/Main/Crypto/src/RSAKey.cpp#4 $
|
// $Id: //poco/1.4/Crypto/src/RSAKey.cpp#1 $
|
||||||
//
|
//
|
||||||
// Library: Crypto
|
// Library: Crypto
|
||||||
// Package: RSA
|
// Package: RSA
|
||||||
@@ -53,7 +53,7 @@ RSAKey::RSAKey(KeyLength keyLength, Exponent exp):
|
|||||||
{
|
{
|
||||||
int keyLen = keyLength;
|
int keyLen = keyLength;
|
||||||
unsigned long expVal = RSA_3;
|
unsigned long expVal = RSA_3;
|
||||||
if (expVal == EXP_LARGE)
|
if (exp == EXP_LARGE)
|
||||||
expVal = RSA_F4;
|
expVal = RSA_F4;
|
||||||
_pImpl = new RSAKeyImpl(keyLen, expVal);
|
_pImpl = new RSAKeyImpl(keyLen, expVal);
|
||||||
}
|
}
|
||||||
@@ -82,6 +82,24 @@ int RSAKey::size() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
RSAKeyImpl::ByteVec RSAKey::modulus() const
|
||||||
|
{
|
||||||
|
return _pImpl->modulus();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
RSAKeyImpl::ByteVec RSAKey::encryptionExponent() const
|
||||||
|
{
|
||||||
|
return _pImpl->encryptionExponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
RSAKeyImpl::ByteVec RSAKey::decryptionExponent() const
|
||||||
|
{
|
||||||
|
return _pImpl->decryptionExponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void RSAKey::save(const std::string& publicKeyFile, const std::string& privateKeyFile, const std::string& privateKeyPassphrase)
|
void RSAKey::save(const std::string& publicKeyFile, const std::string& privateKeyFile, const std::string& privateKeyPassphrase)
|
||||||
{
|
{
|
||||||
_pImpl->save(publicKeyFile, privateKeyFile, privateKeyPassphrase);
|
_pImpl->save(publicKeyFile, privateKeyFile, privateKeyPassphrase);
|
||||||
@@ -94,10 +112,15 @@ void RSAKey::save(std::ostream* pPublicKeyStream, std::ostream* pPrivateKeyStrea
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
static const std::string RSA("rsa");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const std::string& RSAKey::name() const
|
const std::string& RSAKey::name() const
|
||||||
{
|
{
|
||||||
static const std::string n("rsa");
|
return RSA;
|
||||||
return n;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// RSAKeyImpl.cpp
|
// RSAKeyImpl.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/Main/Crypto/src/RSAKeyImpl.cpp#3 $
|
// $Id: //poco/1.4/Crypto/src/RSAKeyImpl.cpp#1 $
|
||||||
//
|
//
|
||||||
// Library: Crypto
|
// Library: Crypto
|
||||||
// Package: RSA
|
// Package: RSA
|
||||||
@@ -38,9 +38,13 @@
|
|||||||
#include "Poco/Crypto/X509Certificate.h"
|
#include "Poco/Crypto/X509Certificate.h"
|
||||||
#include "Poco/FileStream.h"
|
#include "Poco/FileStream.h"
|
||||||
#include "Poco/StreamCopier.h"
|
#include "Poco/StreamCopier.h"
|
||||||
#include "Poco/TemporaryFile.h"
|
#include <sstream>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/rsa.h>
|
#include <openssl/rsa.h>
|
||||||
|
#include <openssl/evp.h>
|
||||||
|
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
|
||||||
|
#include <openssl/bn.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
namespace Poco {
|
namespace Poco {
|
||||||
@@ -52,9 +56,7 @@ RSAKeyImpl::RSAKeyImpl(const X509Certificate& cert):
|
|||||||
{
|
{
|
||||||
const X509* pCert = cert.certificate();
|
const X509* pCert = cert.certificate();
|
||||||
EVP_PKEY* pKey = X509_get_pubkey(const_cast<X509*>(pCert));
|
EVP_PKEY* pKey = X509_get_pubkey(const_cast<X509*>(pCert));
|
||||||
|
_pRSA = EVP_PKEY_get1_RSA(pKey);
|
||||||
RSA* pRSA = pKey->pkey.rsa;
|
|
||||||
_pRSA = RSAPublicKey_dup(pRSA);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -90,54 +92,19 @@ RSAKeyImpl::RSAKeyImpl(
|
|||||||
const std::string& privateKeyFile,
|
const std::string& privateKeyFile,
|
||||||
const std::string& privateKeyPassphrase):
|
const std::string& privateKeyPassphrase):
|
||||||
_pRSA(0)
|
_pRSA(0)
|
||||||
{
|
|
||||||
init(publicKeyFile, privateKeyFile, privateKeyPassphrase);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
RSAKeyImpl::RSAKeyImpl(std::istream* pPublicKeyStream, std::istream* pPrivateKeyStream, const std::string& privateKeyPassphrase):
|
|
||||||
_pRSA(0)
|
|
||||||
{
|
|
||||||
// due to C lib not supporting streams, we create two temporary files
|
|
||||||
std::string publicKeyFile;
|
|
||||||
Poco::TemporaryFile pubFile;
|
|
||||||
if (pPublicKeyStream)
|
|
||||||
{
|
|
||||||
if (!pubFile.createFile())
|
|
||||||
throw Poco::CreateFileException("Cannot create temporary file for writing public key");
|
|
||||||
publicKeyFile = pubFile.path();
|
|
||||||
Poco::FileOutputStream fout(publicKeyFile);
|
|
||||||
Poco::StreamCopier::copyStream(*pPublicKeyStream, fout);
|
|
||||||
}
|
|
||||||
std::string privateKeyFile;
|
|
||||||
Poco::TemporaryFile privFile;
|
|
||||||
if (pPrivateKeyStream)
|
|
||||||
{
|
|
||||||
if (!privFile.createFile())
|
|
||||||
throw Poco::CreateFileException("Cannot create temporary file for writing private key");
|
|
||||||
privateKeyFile = privFile.path();
|
|
||||||
Poco::FileOutputStream fout(privateKeyFile);
|
|
||||||
Poco::StreamCopier::copyStream(*pPrivateKeyStream, fout);
|
|
||||||
|
|
||||||
}
|
|
||||||
init(publicKeyFile, privateKeyFile, privateKeyPassphrase);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void RSAKeyImpl::init(const std::string& publicKeyFile, const std::string& privateKeyFile, const std::string& privateKeyPassphrase)
|
|
||||||
{
|
{
|
||||||
poco_assert_dbg(_pRSA == 0);
|
poco_assert_dbg(_pRSA == 0);
|
||||||
|
|
||||||
_pRSA = RSA_new();
|
_pRSA = RSA_new();
|
||||||
if (!publicKeyFile.empty())
|
if (!publicKeyFile.empty())
|
||||||
{
|
{
|
||||||
BIO* out = BIO_new(BIO_s_file());
|
BIO* bio = BIO_new(BIO_s_file());
|
||||||
if (!out) throw Poco::IOException("Cannot create BIO for reading public key", publicKeyFile);
|
if (!bio) throw Poco::IOException("Cannot create BIO for reading public key", publicKeyFile);
|
||||||
int rc = BIO_read_filename(out, publicKeyFile.c_str());
|
int rc = BIO_read_filename(bio, publicKeyFile.c_str());
|
||||||
if (rc)
|
if (rc)
|
||||||
{
|
{
|
||||||
RSA* pubKey = PEM_read_bio_RSAPublicKey(out, &_pRSA, 0, 0);
|
RSA* pubKey = PEM_read_bio_RSAPublicKey(bio, &_pRSA, 0, 0);
|
||||||
BIO_free(out);
|
BIO_free(bio);
|
||||||
if (!pubKey)
|
if (!pubKey)
|
||||||
{
|
{
|
||||||
freeRSA();
|
freeRSA();
|
||||||
@@ -153,17 +120,17 @@ void RSAKeyImpl::init(const std::string& publicKeyFile, const std::string& priva
|
|||||||
|
|
||||||
if (!privateKeyFile.empty())
|
if (!privateKeyFile.empty())
|
||||||
{
|
{
|
||||||
BIO* out = BIO_new(BIO_s_file());
|
BIO* bio = BIO_new(BIO_s_file());
|
||||||
if (!out) throw Poco::IOException("Cannot create BIO for reading private key", privateKeyFile);
|
if (!bio) throw Poco::IOException("Cannot create BIO for reading private key", privateKeyFile);
|
||||||
int rc = BIO_read_filename(out, privateKeyFile.c_str());
|
int rc = BIO_read_filename(bio, privateKeyFile.c_str());
|
||||||
if (rc)
|
if (rc)
|
||||||
{
|
{
|
||||||
RSA* privKey = 0;
|
RSA* privKey = 0;
|
||||||
if (privateKeyPassphrase.empty())
|
if (privateKeyPassphrase.empty())
|
||||||
privKey = PEM_read_bio_RSAPrivateKey(out, &_pRSA, 0, 0);
|
privKey = PEM_read_bio_RSAPrivateKey(bio, &_pRSA, 0, 0);
|
||||||
else
|
else
|
||||||
privKey = PEM_read_bio_RSAPrivateKey(out, &_pRSA, 0, const_cast<char*>(privateKeyPassphrase.c_str()));
|
privKey = PEM_read_bio_RSAPrivateKey(bio, &_pRSA, 0, const_cast<char*>(privateKeyPassphrase.c_str()));
|
||||||
BIO_free(out);
|
BIO_free(bio);
|
||||||
if (!privKey)
|
if (!privKey)
|
||||||
{
|
{
|
||||||
freeRSA();
|
freeRSA();
|
||||||
@@ -179,6 +146,48 @@ void RSAKeyImpl::init(const std::string& publicKeyFile, const std::string& priva
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
RSAKeyImpl::RSAKeyImpl(std::istream* pPublicKeyStream, std::istream* pPrivateKeyStream, const std::string& privateKeyPassphrase):
|
||||||
|
_pRSA(0)
|
||||||
|
{
|
||||||
|
poco_assert_dbg(_pRSA == 0);
|
||||||
|
|
||||||
|
_pRSA = RSA_new();
|
||||||
|
if (pPublicKeyStream)
|
||||||
|
{
|
||||||
|
std::string publicKeyData;
|
||||||
|
Poco::StreamCopier::copyToString(*pPublicKeyStream, publicKeyData);
|
||||||
|
BIO* bio = BIO_new_mem_buf(const_cast<char*>(publicKeyData.data()), static_cast<int>(publicKeyData.size()));
|
||||||
|
if (!bio) throw Poco::IOException("Cannot create BIO for reading public key");
|
||||||
|
RSA* publicKey = PEM_read_bio_RSAPublicKey(bio, &_pRSA, 0, 0);
|
||||||
|
BIO_free(bio);
|
||||||
|
if (!publicKey)
|
||||||
|
{
|
||||||
|
freeRSA();
|
||||||
|
throw Poco::FileException("Failed to load public key");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pPrivateKeyStream)
|
||||||
|
{
|
||||||
|
std::string privateKeyData;
|
||||||
|
Poco::StreamCopier::copyToString(*pPrivateKeyStream, privateKeyData);
|
||||||
|
BIO* bio = BIO_new_mem_buf(const_cast<char*>(privateKeyData.data()), static_cast<int>(privateKeyData.size()));
|
||||||
|
if (!bio) throw Poco::IOException("Cannot create BIO for reading private key");
|
||||||
|
RSA* privateKey = 0;
|
||||||
|
if (privateKeyPassphrase.empty())
|
||||||
|
privateKey = PEM_read_bio_RSAPrivateKey(bio, &_pRSA, 0, 0);
|
||||||
|
else
|
||||||
|
privateKey = PEM_read_bio_RSAPrivateKey(bio, &_pRSA, 0, const_cast<char*>(privateKeyPassphrase.c_str()));
|
||||||
|
BIO_free(bio);
|
||||||
|
if (!privateKey)
|
||||||
|
{
|
||||||
|
freeRSA();
|
||||||
|
throw Poco::FileException("Failed to load private key");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
RSAKeyImpl::~RSAKeyImpl()
|
RSAKeyImpl::~RSAKeyImpl()
|
||||||
{
|
{
|
||||||
freeRSA();
|
freeRSA();
|
||||||
@@ -199,42 +208,60 @@ int RSAKeyImpl::size() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
RSAKeyImpl::ByteVec RSAKeyImpl::modulus() const
|
||||||
|
{
|
||||||
|
return convertToByteVec(_pRSA->n);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
RSAKeyImpl::ByteVec RSAKeyImpl::encryptionExponent() const
|
||||||
|
{
|
||||||
|
return convertToByteVec(_pRSA->e);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
RSAKeyImpl::ByteVec RSAKeyImpl::decryptionExponent() const
|
||||||
|
{
|
||||||
|
return convertToByteVec(_pRSA->d);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void RSAKeyImpl::save(const std::string& publicKeyFile, const std::string& privateKeyFile, const std::string& privateKeyPassphrase)
|
void RSAKeyImpl::save(const std::string& publicKeyFile, const std::string& privateKeyFile, const std::string& privateKeyPassphrase)
|
||||||
{
|
{
|
||||||
if (!publicKeyFile.empty())
|
if (!publicKeyFile.empty())
|
||||||
{
|
{
|
||||||
BIO* out = BIO_new(BIO_s_file());
|
BIO* bio = BIO_new(BIO_s_file());
|
||||||
if (!out) throw Poco::IOException("Cannot create BIO for writing public key file", publicKeyFile);
|
if (!bio) throw Poco::IOException("Cannot create BIO for writing public key file", publicKeyFile);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (BIO_write_filename(out, const_cast<char*>(publicKeyFile.c_str())))
|
if (BIO_write_filename(bio, const_cast<char*>(publicKeyFile.c_str())))
|
||||||
{
|
{
|
||||||
if (!PEM_write_bio_RSAPublicKey(out, _pRSA))
|
if (!PEM_write_bio_RSAPublicKey(bio, _pRSA))
|
||||||
throw Poco::WriteFileException("Failed to write public key to file", publicKeyFile);
|
throw Poco::WriteFileException("Failed to write public key to file", publicKeyFile);
|
||||||
}
|
}
|
||||||
else throw Poco::CreateFileException("Cannot create public key file");
|
else throw Poco::CreateFileException("Cannot create public key file");
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
BIO_free(out);
|
BIO_free(bio);
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
BIO_free(out);
|
BIO_free(bio);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!privateKeyFile.empty())
|
if (!privateKeyFile.empty())
|
||||||
{
|
{
|
||||||
BIO* out = BIO_new(BIO_s_file());
|
BIO* bio = BIO_new(BIO_s_file());
|
||||||
if (!out) throw Poco::IOException("Cannot create BIO for writing private key file", privateKeyFile);
|
if (!bio) throw Poco::IOException("Cannot create BIO for writing private key file", privateKeyFile);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (BIO_write_filename(out, const_cast<char*>(privateKeyFile.c_str())))
|
if (BIO_write_filename(bio, const_cast<char*>(privateKeyFile.c_str())))
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
if (privateKeyPassphrase.empty())
|
if (privateKeyPassphrase.empty())
|
||||||
rc = PEM_write_bio_RSAPrivateKey(out, _pRSA, EVP_des_ede3_cbc(), 0, 0, 0, 0);
|
rc = PEM_write_bio_RSAPrivateKey(bio, _pRSA, EVP_des_ede3_cbc(), 0, 0, 0, 0);
|
||||||
else
|
else
|
||||||
rc = PEM_write_bio_RSAPrivateKey(out, _pRSA, EVP_des_ede3_cbc(),
|
rc = PEM_write_bio_RSAPrivateKey(bio, _pRSA, EVP_des_ede3_cbc(),
|
||||||
reinterpret_cast<unsigned char*>(const_cast<char*>(privateKeyPassphrase.c_str())),
|
reinterpret_cast<unsigned char*>(const_cast<char*>(privateKeyPassphrase.c_str())),
|
||||||
static_cast<int>(privateKeyPassphrase.length()), 0, 0);
|
static_cast<int>(privateKeyPassphrase.length()), 0, 0);
|
||||||
if (!rc) throw Poco::FileException("Failed to write private key to file", privateKeyFile);
|
if (!rc) throw Poco::FileException("Failed to write private key to file", privateKeyFile);
|
||||||
@@ -243,48 +270,69 @@ void RSAKeyImpl::save(const std::string& publicKeyFile, const std::string& priva
|
|||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
BIO_free(out);
|
BIO_free(bio);
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
BIO_free(out);
|
BIO_free(bio);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RSAKeyImpl::save(std::ostream* pPublicKeyStream, std::ostream* pPrivateKeyStream, const std::string& privateKeyPassphrase)
|
void RSAKeyImpl::save(std::ostream* pPublicKeyStream, std::ostream* pPrivateKeyStream, const std::string& privateKeyPassphrase)
|
||||||
{
|
{
|
||||||
if (!pPublicKeyStream && !pPrivateKeyStream) return;
|
|
||||||
|
|
||||||
// due to C lib not supporting streams, we create two temporary files
|
|
||||||
std::string publicKeyFile;
|
|
||||||
Poco::TemporaryFile pubFile;
|
|
||||||
if (pPublicKeyStream)
|
if (pPublicKeyStream)
|
||||||
{
|
{
|
||||||
publicKeyFile = pubFile.path();
|
BIO* bio = BIO_new(BIO_s_mem());
|
||||||
if (!pubFile.createFile())
|
if (!bio) throw Poco::IOException("Cannot create BIO for writing public key");
|
||||||
throw Poco::CreateFileException("Cannot create temporary public file");
|
if (!PEM_write_bio_RSAPublicKey(bio, _pRSA))
|
||||||
}
|
|
||||||
std::string privateKeyFile;
|
|
||||||
Poco::TemporaryFile privFile;
|
|
||||||
if (pPrivateKeyStream)
|
|
||||||
{
|
{
|
||||||
privateKeyFile = privFile.path();
|
BIO_free(bio);
|
||||||
if (!privFile.createFile())
|
throw Poco::WriteFileException("Failed to write public key to stream");
|
||||||
throw Poco::FileException("Cannot crate temporary private key file");
|
}
|
||||||
|
char* pData;
|
||||||
|
long size = BIO_get_mem_data(bio, &pData);
|
||||||
|
pPublicKeyStream->write(pData, static_cast<std::streamsize>(size));
|
||||||
|
BIO_free(bio);
|
||||||
}
|
}
|
||||||
save(publicKeyFile, privateKeyFile, privateKeyPassphrase);
|
|
||||||
|
|
||||||
// now copy everything from the temp files to the original streams
|
|
||||||
if (pPublicKeyStream)
|
|
||||||
{
|
|
||||||
Poco::FileInputStream istr(publicKeyFile);
|
|
||||||
Poco::StreamCopier::copyStream(istr, *pPublicKeyStream);
|
|
||||||
}
|
|
||||||
if (pPrivateKeyStream)
|
if (pPrivateKeyStream)
|
||||||
{
|
{
|
||||||
Poco::FileInputStream istr(privateKeyFile);
|
BIO* bio = BIO_new(BIO_s_mem());
|
||||||
Poco::StreamCopier::copyStream(istr, *pPrivateKeyStream);
|
if (!bio) throw Poco::IOException("Cannot create BIO for writing public key");
|
||||||
|
int rc = 0;
|
||||||
|
if (privateKeyPassphrase.empty())
|
||||||
|
rc = PEM_write_bio_RSAPrivateKey(bio, _pRSA, EVP_des_ede3_cbc(), 0, 0, 0, 0);
|
||||||
|
else
|
||||||
|
rc = PEM_write_bio_RSAPrivateKey(bio, _pRSA, 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
RSAKeyImpl::ByteVec RSAKeyImpl::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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// X509Certificate.cpp
|
// X509Certificate.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/Main/Crypto/src/X509Certificate.cpp#1 $
|
// $Id: //poco/1.4/Crypto/src/X509Certificate.cpp#1 $
|
||||||
//
|
//
|
||||||
// Library: Crypto
|
// Library: Crypto
|
||||||
// Package: Certificate
|
// Package: Certificate
|
||||||
@@ -68,7 +68,20 @@ X509Certificate::X509Certificate(X509* pCert):
|
|||||||
{
|
{
|
||||||
poco_check_ptr(_pCert);
|
poco_check_ptr(_pCert);
|
||||||
|
|
||||||
_pCert = X509_dup(_pCert);
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
X509Certificate::X509Certificate(X509* pCert, bool shared):
|
||||||
|
_pCert(pCert)
|
||||||
|
{
|
||||||
|
poco_check_ptr(_pCert);
|
||||||
|
|
||||||
|
if (shared)
|
||||||
|
{
|
||||||
|
_pCert->references++;
|
||||||
|
}
|
||||||
|
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
315
Crypto/testsuite/TestSuite_vs100.vcxproj
Normal file
315
Crypto/testsuite/TestSuite_vs100.vcxproj
Normal file
@@ -0,0 +1,315 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="debug_shared|Win32">
|
||||||
|
<Configuration>debug_shared</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_md|Win32">
|
||||||
|
<Configuration>debug_static_md</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_mt|Win32">
|
||||||
|
<Configuration>debug_static_mt</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_shared|Win32">
|
||||||
|
<Configuration>release_shared</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_md|Win32">
|
||||||
|
<Configuration>release_static_md</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_mt|Win32">
|
||||||
|
<Configuration>release_static_mt</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectName>TestSuite</ProjectName>
|
||||||
|
<ProjectGuid>{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}</ProjectGuid>
|
||||||
|
<RootNamespace>TestSuite</RootNamespace>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseOfMfc>Dynamic</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseOfMfc>Dynamic</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseOfMfc>Static</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseOfMfc>Static</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseOfMfc>Dynamic</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseOfMfc>Dynamic</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||||
|
<ImportGroup Label="ExtensionSettings"/>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros"/>
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">bin\static_mt\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">bin\static_mt\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">bin\static_md\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">bin\static_md\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">false</LinkIncremental>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">TestSuited</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">TestSuited</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">TestSuited</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">TestSuite</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">TestSuite</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">TestSuite</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>CppUnitd.lib;WinTestRunnerd.lib;ws2_32.lib;iphlpapi.lib;libeay32mdd.lib;ssleay32mdd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin\TestSuited.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>bin\TestSuited.pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>CppUnit.lib;WinTestRunner.lib;ws2_32.lib;iphlpapi.lib;libeay32md.lib;ssleay32md.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin\TestSuite.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>CppUnitmtd.lib;WinTestRunnermtd.lib;iphlpapi.lib;winmm.lib;nafxcwd.lib;libcmtd.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32mtd.lib;ssleay32mtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin\static_mt\TestSuited.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<IgnoreSpecificDefaultLibraries>nafxcwd.lib;libcmtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>bin\static_mt\TestSuited.pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>CppUnitmt.lib;WinTestRunnermt.lib;iphlpapi.lib;winmm.lib;nafxcw.lib;libcmt.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32mt.lib;ssleay32mt.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin\static_mt\TestSuite.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<IgnoreSpecificDefaultLibraries>nafxcw.lib;libcmt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>CppUnitmdd.lib;WinTestRunnermdd.lib;iphlpapi.lib;winmm.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32mdd.lib;ssleay32mdd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin\static_md\TestSuited.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>bin\static_md\TestSuited.pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>CppUnitmd.lib;WinTestRunnermd.lib;iphlpapi.lib;winmm.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32md.lib;ssleay32md.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin\static_md\TestSuite.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="src\CryptoTest.h"/>
|
||||||
|
<ClInclude Include="src\RSATest.h"/>
|
||||||
|
<ClInclude Include="src\CryptoTestSuite.h"/>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\CryptoTest.cpp"/>
|
||||||
|
<ClCompile Include="src\RSATest.cpp"/>
|
||||||
|
<ClCompile Include="src\CryptoTestSuite.cpp"/>
|
||||||
|
<ClCompile Include="src\WinDriver.cpp"/>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||||
|
<ImportGroup Label="ExtensionTargets"/>
|
||||||
|
</Project>
|
||||||
54
Crypto/testsuite/TestSuite_vs100.vcxproj.filters
Normal file
54
Crypto/testsuite/TestSuite_vs100.vcxproj.filters
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Crypto">
|
||||||
|
<UniqueIdentifier>{02debdde-8664-412b-ba6c-4c13197de6f9}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Crypto\Header Files">
|
||||||
|
<UniqueIdentifier>{2311d4f4-8f52-459d-8caa-4febea4f0654}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Crypto\Source Files">
|
||||||
|
<UniqueIdentifier>{536bcab9-b11f-4dc2-bb55-ed2fc7101adf}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="_Suite">
|
||||||
|
<UniqueIdentifier>{4d25d62e-2b08-4863-8e6e-a37a27784732}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="_Suite\Header Files">
|
||||||
|
<UniqueIdentifier>{a197b9e5-7e95-4f57-a438-237041d9a3c4}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="_Suite\Source Files">
|
||||||
|
<UniqueIdentifier>{9df90fce-71cf-4b62-af6b-b1edadb7e6e2}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="_Driver">
|
||||||
|
<UniqueIdentifier>{a248980e-d5c3-41f7-a739-cd98b2f9f766}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="_Driver\Source Files">
|
||||||
|
<UniqueIdentifier>{e3b401c0-2adc-4abc-96a3-07d3520ba75d}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="src\CryptoTest.h">
|
||||||
|
<Filter>Crypto\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\RSATest.h">
|
||||||
|
<Filter>Crypto\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\CryptoTestSuite.h">
|
||||||
|
<Filter>_Suite\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\CryptoTest.cpp">
|
||||||
|
<Filter>Crypto\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\RSATest.cpp">
|
||||||
|
<Filter>Crypto\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\CryptoTestSuite.cpp">
|
||||||
|
<Filter>_Suite\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\WinDriver.cpp">
|
||||||
|
<Filter>_Driver\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
3
Crypto/testsuite/TestSuite_vs100.vcxproj.user
Normal file
3
Crypto/testsuite/TestSuite_vs100.vcxproj.user
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
</Project>
|
||||||
315
Crypto/testsuite/TestSuite_x64_vs100.vcxproj
Normal file
315
Crypto/testsuite/TestSuite_x64_vs100.vcxproj
Normal file
@@ -0,0 +1,315 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="debug_shared|x64">
|
||||||
|
<Configuration>debug_shared</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_md|x64">
|
||||||
|
<Configuration>debug_static_md</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_mt|x64">
|
||||||
|
<Configuration>debug_static_mt</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_shared|x64">
|
||||||
|
<Configuration>release_shared</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_md|x64">
|
||||||
|
<Configuration>release_static_md</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_mt|x64">
|
||||||
|
<Configuration>release_static_mt</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectName>TestSuite</ProjectName>
|
||||||
|
<ProjectGuid>{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}</ProjectGuid>
|
||||||
|
<RootNamespace>TestSuite</RootNamespace>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseOfMfc>Dynamic</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseOfMfc>Dynamic</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseOfMfc>Static</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseOfMfc>Static</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseOfMfc>Dynamic</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseOfMfc>Dynamic</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||||
|
<ImportGroup Label="ExtensionSettings"/>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros"/>
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">bin64\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">obj64\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">bin64\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">obj64\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">bin64\static_mt\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">obj64\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">bin64\static_mt\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">obj64\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">bin64\static_md\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">obj64\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">bin64\static_md\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">obj64\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">false</LinkIncremental>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">TestSuited</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">TestSuited</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">TestSuited</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">TestSuite</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">TestSuite</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">TestSuite</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>CppUnitd.lib;WinTestRunnerd.lib;ws2_32.lib;iphlpapi.lib;libeay32mdd.lib;ssleay32mdd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin64\TestSuited.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>bin64\TestSuited.pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>CppUnit.lib;WinTestRunner.lib;ws2_32.lib;iphlpapi.lib;libeay32md.lib;ssleay32md.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin64\TestSuite.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>CppUnitmtd.lib;WinTestRunnermtd.lib;iphlpapi.lib;winmm.lib;nafxcwd.lib;libcmtd.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32mtd.lib;ssleay32mtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin64\static_mt\TestSuited.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<IgnoreSpecificDefaultLibraries>nafxcwd.lib;libcmtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>bin64\static_mt\TestSuited.pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>CppUnitmt.lib;WinTestRunnermt.lib;iphlpapi.lib;winmm.lib;nafxcw.lib;libcmt.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32mt.lib;ssleay32mt.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin64\static_mt\TestSuite.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<IgnoreSpecificDefaultLibraries>nafxcw.lib;libcmt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>CppUnitmdd.lib;WinTestRunnermdd.lib;iphlpapi.lib;winmm.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32mdd.lib;ssleay32mdd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin64\static_md\TestSuited.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>bin64\static_md\TestSuited.pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader/>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat/>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>CppUnitmd.lib;WinTestRunnermd.lib;iphlpapi.lib;winmm.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32md.lib;ssleay32md.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin64\static_md\TestSuite.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="src\CryptoTest.h"/>
|
||||||
|
<ClInclude Include="src\RSATest.h"/>
|
||||||
|
<ClInclude Include="src\CryptoTestSuite.h"/>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\CryptoTest.cpp"/>
|
||||||
|
<ClCompile Include="src\RSATest.cpp"/>
|
||||||
|
<ClCompile Include="src\CryptoTestSuite.cpp"/>
|
||||||
|
<ClCompile Include="src\WinDriver.cpp"/>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||||
|
<ImportGroup Label="ExtensionTargets"/>
|
||||||
|
</Project>
|
||||||
54
Crypto/testsuite/TestSuite_x64_vs100.vcxproj.filters
Normal file
54
Crypto/testsuite/TestSuite_x64_vs100.vcxproj.filters
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Crypto">
|
||||||
|
<UniqueIdentifier>{45de6552-2469-4aa8-8899-1ba5f38d254e}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Crypto\Header Files">
|
||||||
|
<UniqueIdentifier>{4bee1bf3-cc02-4a05-9641-75f380833200}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Crypto\Source Files">
|
||||||
|
<UniqueIdentifier>{7f034d6f-f9ca-473d-ac5f-8b3c77ded478}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="_Suite">
|
||||||
|
<UniqueIdentifier>{f60d96dc-db3f-45df-be9d-db76636df680}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="_Suite\Header Files">
|
||||||
|
<UniqueIdentifier>{d213663c-3c68-41c6-b524-0106d1081ec9}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="_Suite\Source Files">
|
||||||
|
<UniqueIdentifier>{640d3c67-4362-495e-adf0-09a264035999}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="_Driver">
|
||||||
|
<UniqueIdentifier>{6da1fb8e-0d60-4331-b7c8-b0b1e13f7213}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="_Driver\Source Files">
|
||||||
|
<UniqueIdentifier>{4f158ef4-cabf-4331-bdd3-ad8fef86f624}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="src\CryptoTest.h">
|
||||||
|
<Filter>Crypto\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\RSATest.h">
|
||||||
|
<Filter>Crypto\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\CryptoTestSuite.h">
|
||||||
|
<Filter>_Suite\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\CryptoTest.cpp">
|
||||||
|
<Filter>Crypto\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\RSATest.cpp">
|
||||||
|
<Filter>Crypto\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\CryptoTestSuite.cpp">
|
||||||
|
<Filter>_Suite\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\WinDriver.cpp">
|
||||||
|
<Filter>_Driver\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
3
Crypto/testsuite/TestSuite_x64_vs100.vcxproj.user
Normal file
3
Crypto/testsuite/TestSuite_x64_vs100.vcxproj.user
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
</Project>
|
||||||
@@ -37,6 +37,8 @@
|
|||||||
#include "Poco/Crypto/Cipher.h"
|
#include "Poco/Crypto/Cipher.h"
|
||||||
#include "Poco/Crypto/CipherKey.h"
|
#include "Poco/Crypto/CipherKey.h"
|
||||||
#include "Poco/Crypto/X509Certificate.h"
|
#include "Poco/Crypto/X509Certificate.h"
|
||||||
|
#include "Poco/Crypto/CryptoStream.h"
|
||||||
|
#include "Poco/StreamCopier.h"
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
|
||||||
@@ -86,26 +88,92 @@ void CryptoTest::testEncryptDecrypt()
|
|||||||
{
|
{
|
||||||
Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(CipherKey("aes256"));
|
Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(CipherKey("aes256"));
|
||||||
|
|
||||||
std::string in("1234567890");
|
for (std::size_t n = 1; n < MAX_DATA_SIZE; n++)
|
||||||
|
{
|
||||||
|
std::string in(n, 'x');
|
||||||
|
std::string out = pCipher->encryptString(in, Cipher::ENC_NONE);
|
||||||
|
std::string result = pCipher->decryptString(out, Cipher::ENC_NONE);
|
||||||
|
poco_assert (in == result);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (std::size_t n = 1; n < MAX_DATA_SIZE; n++)
|
||||||
|
{
|
||||||
|
std::string in(n, 'x');
|
||||||
std::string out = pCipher->encryptString(in, Cipher::ENC_BASE64);
|
std::string out = pCipher->encryptString(in, Cipher::ENC_BASE64);
|
||||||
std::string result = pCipher->decryptString(out, Cipher::ENC_BASE64);
|
std::string result = pCipher->decryptString(out, Cipher::ENC_BASE64);
|
||||||
poco_assert (in == result);
|
poco_assert (in == result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (std::size_t n = 1; n < MAX_DATA_SIZE; n++)
|
||||||
|
{
|
||||||
|
std::string in(n, 'x');
|
||||||
|
std::string out = pCipher->encryptString(in, Cipher::ENC_BINHEX);
|
||||||
|
std::string result = pCipher->decryptString(out, Cipher::ENC_BINHEX);
|
||||||
|
poco_assert (in == result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void CryptoTest::testEncryptDecryptWithSalt()
|
void CryptoTest::testEncryptDecryptWithSalt()
|
||||||
{
|
{
|
||||||
Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(CipherKey("aes256", "simplepwd", "Too much salt"));
|
Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(CipherKey("aes256", "simplepwd", "Too much salt"));
|
||||||
|
|
||||||
std::string in("1234567890");
|
|
||||||
std::string out = pCipher->encryptString(in, Cipher::ENC_BASE64);
|
|
||||||
|
|
||||||
Cipher::Ptr pCipher2 = CipherFactory::defaultFactory().createCipher(CipherKey("aes256", "simplepwd", "Too much salt"));
|
Cipher::Ptr pCipher2 = CipherFactory::defaultFactory().createCipher(CipherKey("aes256", "simplepwd", "Too much salt"));
|
||||||
|
|
||||||
|
for (std::size_t n = 1; n < MAX_DATA_SIZE; n++)
|
||||||
|
{
|
||||||
|
std::string in(n, 'x');
|
||||||
|
std::string out = pCipher->encryptString(in, Cipher::ENC_NONE);
|
||||||
|
std::string result = pCipher2->decryptString(out, Cipher::ENC_NONE);
|
||||||
|
poco_assert (in == result);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (std::size_t n = 1; n < MAX_DATA_SIZE; n++)
|
||||||
|
{
|
||||||
|
std::string in(n, 'x');
|
||||||
|
std::string out = pCipher->encryptString(in, Cipher::ENC_BASE64);
|
||||||
std::string result = pCipher2->decryptString(out, Cipher::ENC_BASE64);
|
std::string result = pCipher2->decryptString(out, Cipher::ENC_BASE64);
|
||||||
poco_assert (in == result);
|
poco_assert (in == result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (std::size_t n = 1; n < MAX_DATA_SIZE; n++)
|
||||||
|
{
|
||||||
|
std::string in(n, 'x');
|
||||||
|
std::string out = pCipher->encryptString(in, Cipher::ENC_BINHEX);
|
||||||
|
std::string result = pCipher2->decryptString(out, Cipher::ENC_BINHEX);
|
||||||
|
poco_assert (in == result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CryptoTest::testStreams()
|
||||||
|
{
|
||||||
|
Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(CipherKey("aes256"));
|
||||||
|
|
||||||
|
static const std::string SECRET_MESSAGE = "This is a secret message. Don't tell anyone.";
|
||||||
|
|
||||||
|
std::stringstream sstr;
|
||||||
|
EncryptingOutputStream encryptor(sstr, *pCipher);
|
||||||
|
encryptor << SECRET_MESSAGE;
|
||||||
|
encryptor.close();
|
||||||
|
|
||||||
|
DecryptingInputStream decryptor(sstr, *pCipher);
|
||||||
|
std::string result;
|
||||||
|
Poco::StreamCopier::copyToString(decryptor, result);
|
||||||
|
|
||||||
|
assert (result == SECRET_MESSAGE);
|
||||||
|
assert (decryptor.eof());
|
||||||
|
assert (!decryptor.bad());
|
||||||
|
|
||||||
|
|
||||||
|
std::istringstream emptyStream;
|
||||||
|
DecryptingInputStream badDecryptor(emptyStream, *pCipher);
|
||||||
|
Poco::StreamCopier::copyToString(badDecryptor, result);
|
||||||
|
|
||||||
|
assert (badDecryptor.fail());
|
||||||
|
assert (badDecryptor.bad());
|
||||||
|
assert (!badDecryptor.eof());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void CryptoTest::testCertificate()
|
void CryptoTest::testCertificate()
|
||||||
{
|
{
|
||||||
@@ -150,6 +218,7 @@ CppUnit::Test* CryptoTest::suite()
|
|||||||
|
|
||||||
CppUnit_addTest(pSuite, CryptoTest, testEncryptDecrypt);
|
CppUnit_addTest(pSuite, CryptoTest, testEncryptDecrypt);
|
||||||
CppUnit_addTest(pSuite, CryptoTest, testEncryptDecryptWithSalt);
|
CppUnit_addTest(pSuite, CryptoTest, testEncryptDecryptWithSalt);
|
||||||
|
CppUnit_addTest(pSuite, CryptoTest, testStreams);
|
||||||
CppUnit_addTest(pSuite, CryptoTest, testCertificate);
|
CppUnit_addTest(pSuite, CryptoTest, testCertificate);
|
||||||
|
|
||||||
return pSuite;
|
return pSuite;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// CryptoTest.h
|
// CryptoTest.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/Main/Crypto/testsuite/src/CryptoTest.h#2 $
|
// $Id: //poco/1.4/Crypto/testsuite/src/CryptoTest.h#2 $
|
||||||
//
|
//
|
||||||
// Definition of the CryptoTest class.
|
// Definition of the CryptoTest class.
|
||||||
//
|
//
|
||||||
@@ -43,11 +43,17 @@
|
|||||||
class CryptoTest: public CppUnit::TestCase
|
class CryptoTest: public CppUnit::TestCase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
MAX_DATA_SIZE = 10000
|
||||||
|
};
|
||||||
|
|
||||||
CryptoTest(const std::string& name);
|
CryptoTest(const std::string& name);
|
||||||
~CryptoTest();
|
~CryptoTest();
|
||||||
|
|
||||||
void testEncryptDecrypt();
|
void testEncryptDecrypt();
|
||||||
void testEncryptDecryptWithSalt();
|
void testEncryptDecryptWithSalt();
|
||||||
|
void testStreams();
|
||||||
void testCertificate();
|
void testCertificate();
|
||||||
|
|
||||||
void setUp();
|
void setUp();
|
||||||
|
|||||||
@@ -34,6 +34,32 @@
|
|||||||
|
|
||||||
#include "CppUnit/TestRunner.h"
|
#include "CppUnit/TestRunner.h"
|
||||||
#include "CryptoTestSuite.h"
|
#include "CryptoTestSuite.h"
|
||||||
|
#include "Poco/Crypto/Crypto.h"
|
||||||
|
|
||||||
|
|
||||||
CppUnitMain(CryptoTestSuite)
|
class CryptoInitializer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CryptoInitializer()
|
||||||
|
{
|
||||||
|
Poco::Crypto::initializeCrypto();
|
||||||
|
}
|
||||||
|
|
||||||
|
~CryptoInitializer()
|
||||||
|
{
|
||||||
|
Poco::Crypto::uninitializeCrypto();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
int main(int ac, char **av)
|
||||||
|
{
|
||||||
|
CryptoInitializer ci;
|
||||||
|
|
||||||
|
std::vector<std::string> args;
|
||||||
|
for (int i = 0; i < ac; ++i)
|
||||||
|
args.push_back(std::string(av[i]));
|
||||||
|
CppUnit::TestRunner runner;
|
||||||
|
runner.addTest("CryptoTestSuite", CryptoTestSuite::suite());
|
||||||
|
return runner.run(args) ? 0 : 1;
|
||||||
|
}
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ void RSATest::testSign()
|
|||||||
std::string msg("Test this sign message");
|
std::string msg("Test this sign message");
|
||||||
RSAKey key(RSAKey::KL_2048, RSAKey::EXP_LARGE);
|
RSAKey key(RSAKey::KL_2048, RSAKey::EXP_LARGE);
|
||||||
RSADigestEngine eng(key);
|
RSADigestEngine eng(key);
|
||||||
eng.update(msg.c_str(), msg.length());
|
eng.update(msg.c_str(), static_cast<unsigned>(msg.length()));
|
||||||
const Poco::DigestEngine::Digest& sig = eng.signature();
|
const Poco::DigestEngine::Digest& sig = eng.signature();
|
||||||
std::string hexDig = Poco::DigestEngine::digestToHex(sig);
|
std::string hexDig = Poco::DigestEngine::digestToHex(sig);
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ void RSATest::testSign()
|
|||||||
std::istringstream iPub(pubKey);
|
std::istringstream iPub(pubKey);
|
||||||
RSAKey keyPub(&iPub);
|
RSAKey keyPub(&iPub);
|
||||||
RSADigestEngine eng2(key);
|
RSADigestEngine eng2(key);
|
||||||
eng2.update(msg.c_str(), msg.length());
|
eng2.update(msg.c_str(), static_cast<unsigned>(msg.length()));
|
||||||
assert (eng2.verify(sig));
|
assert (eng2.verify(sig));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@ void RSATest::testSignManipulated()
|
|||||||
std::string msgManip("Test that sign message");
|
std::string msgManip("Test that sign message");
|
||||||
RSAKey key(RSAKey::KL_2048, RSAKey::EXP_LARGE);
|
RSAKey key(RSAKey::KL_2048, RSAKey::EXP_LARGE);
|
||||||
RSADigestEngine eng(key);
|
RSADigestEngine eng(key);
|
||||||
eng.update(msg.c_str(), msg.length());
|
eng.update(msg.c_str(), static_cast<unsigned>(msg.length()));
|
||||||
const Poco::DigestEngine::Digest& sig = eng.signature();
|
const Poco::DigestEngine::Digest& sig = eng.signature();
|
||||||
std::string hexDig = Poco::DigestEngine::digestToHex(sig);
|
std::string hexDig = Poco::DigestEngine::digestToHex(sig);
|
||||||
|
|
||||||
@@ -166,41 +166,65 @@ void RSATest::testSignManipulated()
|
|||||||
std::istringstream iPub(pubKey);
|
std::istringstream iPub(pubKey);
|
||||||
RSAKey keyPub(&iPub);
|
RSAKey keyPub(&iPub);
|
||||||
RSADigestEngine eng2(key);
|
RSADigestEngine eng2(key);
|
||||||
eng2.update(msgManip.c_str(), msgManip.length());
|
eng2.update(msgManip.c_str(), static_cast<unsigned>(msgManip.length()));
|
||||||
assert (!eng2.verify(sig));
|
assert (!eng2.verify(sig));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RSATest::createRSACipher()
|
void RSATest::testRSACipher()
|
||||||
{
|
{
|
||||||
Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(RSAKey(RSAKey::KL_1024, RSAKey::EXP_SMALL));
|
Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(RSAKey(RSAKey::KL_1024, RSAKey::EXP_SMALL));
|
||||||
std::string val("lets do some encryption");
|
for (std::size_t n = 1; n <= 1200; n++)
|
||||||
|
{
|
||||||
|
std::string val(n, 'x');
|
||||||
std::string enc = pCipher->encryptString(val);
|
std::string enc = pCipher->encryptString(val);
|
||||||
std::string dec = pCipher->decryptString(enc);
|
std::string dec = pCipher->decryptString(enc);
|
||||||
assert (dec == val);
|
assert (dec == val);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void RSATest::createRSACipherLarge()
|
void RSATest::testRSACipherLarge()
|
||||||
{
|
{
|
||||||
|
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(RSAKey(RSAKey::KL_1024, RSAKey::EXP_SMALL));
|
Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(RSAKey(RSAKey::KL_1024, RSAKey::EXP_SMALL));
|
||||||
std::string val(16385, 'x');
|
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 enc = pCipher->encryptString(val);
|
||||||
std::string dec = pCipher->decryptString(enc);
|
std::string dec = pCipher->decryptString(enc);
|
||||||
assert (dec == val);
|
assert (dec == val);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void RSATest::testCertificate()
|
void RSATest::testCertificate()
|
||||||
{
|
{
|
||||||
std::istringstream str(anyPem);
|
std::istringstream str(anyPem);
|
||||||
X509Certificate cert(str);
|
X509Certificate cert(str);
|
||||||
|
RSAKey publicKey(cert);
|
||||||
RSAKey key(cert);
|
std::istringstream str2(anyPem);
|
||||||
Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(key);
|
RSAKey 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 val("lets do some encryption");
|
||||||
|
|
||||||
std::string enc = pCipher->encryptString(val);
|
std::string enc = pCipher->encryptString(val);
|
||||||
|
std::string dec = pCipher2->decryptString(enc);
|
||||||
|
assert (dec == val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -221,8 +245,8 @@ CppUnit::Test* RSATest::suite()
|
|||||||
CppUnit_addTest(pSuite, RSATest, testNewKeys);
|
CppUnit_addTest(pSuite, RSATest, testNewKeys);
|
||||||
CppUnit_addTest(pSuite, RSATest, testSign);
|
CppUnit_addTest(pSuite, RSATest, testSign);
|
||||||
CppUnit_addTest(pSuite, RSATest, testSignManipulated);
|
CppUnit_addTest(pSuite, RSATest, testSignManipulated);
|
||||||
CppUnit_addTest(pSuite, RSATest, createRSACipher);
|
CppUnit_addTest(pSuite, RSATest, testRSACipher);
|
||||||
CppUnit_addTest(pSuite, RSATest, createRSACipherLarge);
|
CppUnit_addTest(pSuite, RSATest, testRSACipherLarge);
|
||||||
CppUnit_addTest(pSuite, RSATest, testCertificate);
|
CppUnit_addTest(pSuite, RSATest, testCertificate);
|
||||||
|
|
||||||
return pSuite;
|
return pSuite;
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ public:
|
|||||||
void testNewKeys();
|
void testNewKeys();
|
||||||
void testSign();
|
void testSign();
|
||||||
void testSignManipulated();
|
void testSignManipulated();
|
||||||
void createRSACipher();
|
void testRSACipher();
|
||||||
void createRSACipherLarge();
|
void testRSACipherLarge();
|
||||||
void testCertificate();
|
void testCertificate();
|
||||||
|
|
||||||
void setUp();
|
void setUp();
|
||||||
|
|||||||
70
Crypto/testsuite/src/WinCEDriver.cpp
Normal file
70
Crypto/testsuite/src/WinCEDriver.cpp
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
//
|
||||||
|
// WinCEDriver.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/1.4/Crypto/testsuite/src/WinCEDriver.cpp#1 $
|
||||||
|
//
|
||||||
|
// Console-based test driver for Windows CE.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2004-2010, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "CppUnit/TestRunner.h"
|
||||||
|
#include "CryptoTestSuite.h"
|
||||||
|
#include "Poco/Crypto/Crypto.h"
|
||||||
|
#include <cstdlib>
|
||||||
|
|
||||||
|
|
||||||
|
class CryptoInitializer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CryptoInitializer()
|
||||||
|
{
|
||||||
|
Poco::Crypto::initializeCrypto();
|
||||||
|
}
|
||||||
|
|
||||||
|
~CryptoInitializer()
|
||||||
|
{
|
||||||
|
Poco::Crypto::uninitializeCrypto();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
int _tmain(int argc, wchar_t* argv[])
|
||||||
|
{
|
||||||
|
CryptoInitializer ci;
|
||||||
|
|
||||||
|
std::vector<std::string> args;
|
||||||
|
for (int i = 0; i < argc; ++i)
|
||||||
|
{
|
||||||
|
char buffer[1024];
|
||||||
|
std::wcstombs(buffer, argv[i], sizeof(buffer));
|
||||||
|
args.push_back(std::string(buffer));
|
||||||
|
}
|
||||||
|
CppUnit::TestRunner runner;
|
||||||
|
runner.addTest("CryptoTestSuite", CryptoTestSuite::suite());
|
||||||
|
return runner.run(args) ? 0 : 1;
|
||||||
|
}
|
||||||
@@ -34,12 +34,30 @@
|
|||||||
|
|
||||||
#include "WinTestRunner/WinTestRunner.h"
|
#include "WinTestRunner/WinTestRunner.h"
|
||||||
#include "CryptoTestSuite.h"
|
#include "CryptoTestSuite.h"
|
||||||
|
#include "Poco/Crypto/Crypto.h"
|
||||||
|
|
||||||
|
|
||||||
|
class CryptoInitializer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CryptoInitializer()
|
||||||
|
{
|
||||||
|
Poco::Crypto::initializeCrypto();
|
||||||
|
}
|
||||||
|
|
||||||
|
~CryptoInitializer()
|
||||||
|
{
|
||||||
|
Poco::Crypto::uninitializeCrypto();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
class TestDriver: public CppUnit::WinTestRunnerApp
|
class TestDriver: public CppUnit::WinTestRunnerApp
|
||||||
{
|
{
|
||||||
void TestMain()
|
void TestMain()
|
||||||
{
|
{
|
||||||
|
CryptoInitializer ci;
|
||||||
|
|
||||||
CppUnit::WinTestRunner runner;
|
CppUnit::WinTestRunner runner;
|
||||||
runner.addTest(CryptoTestSuite::suite());
|
runner.addTest(CryptoTestSuite::suite());
|
||||||
runner.run();
|
runner.run();
|
||||||
|
|||||||
Reference in New Issue
Block a user