openssl 1.1

This commit is contained in:
Alex Fabijanic 2017-09-22 18:29:30 -05:00
parent 9732441043
commit faa089e249
10 changed files with 140 additions and 141 deletions

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="debug_shared|x64">
@ -184,7 +184,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>.\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -211,7 +211,7 @@
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>.\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
@ -231,7 +231,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>.\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -258,7 +258,7 @@
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>.\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>

View File

@ -121,8 +121,9 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin\* 1>nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*.dll ..\bin\* 1>nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*.lib ..\lib\* 1>nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*.pdb ..\bin\* 1>nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -156,8 +157,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin\* 1>nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*.dll ..\bin\* 1>nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*.lib ..\lib\* 1>nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -194,8 +195,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.lib ..\lib\* 1>nul
xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.pdb ..\lib\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win32\lib\debug\*.lib ..\lib\* 1>nul
xcopy /y ..\openssl\VS_120\win32\lib\debug\*.pdb ..\lib\* 1>nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -222,7 +223,7 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\lib\release\*32MT.lib ..\lib\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win32\lib\release\*.lib ..\lib\* 1>nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -250,8 +251,9 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin\* 1>nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*.dll ..\bin\* 1>nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*.lib ..\lib\* 1>nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*.pdb ..\bin\* 1>nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -278,8 +280,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin\* 1>nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*.dll ..\bin\* 1>nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*.lib ..\lib\* 1>nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>

View File

@ -121,8 +121,9 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin\* 1>nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*.dll ..\bin\* 1>nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*.lib ..\lib\* 1>nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*.pdb ..\bin\* 1>nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -156,8 +157,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin\* 1>nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*.dll ..\bin\* 1>nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*.lib ..\lib\* 1>nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -194,8 +195,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.lib ..\lib\* 1>nul
xcopy /y ..\openssl\VS_120\win32\lib\debug\*32MTd.pdb ..\lib\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win32\lib\debug\*.lib ..\lib\* 1>nul
xcopy /y ..\openssl\VS_120\win32\lib\debug\*.pdb ..\lib\* 1>nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -222,7 +223,7 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\lib\release\*32MT.lib ..\lib\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win32\lib\release\*.lib ..\lib\* 1>nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -250,8 +251,9 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.dll ..\bin\* 1>nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*32MDd.lib ..\lib\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\debug\*.dll ..\bin\* 1>nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*.lib ..\lib\* 1>nul
xcopy /y ..\openssl\VS_120\win32\bin\debug\*.pdb ..\bin\* 1>nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -278,8 +280,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.dll ..\bin\* 1>nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*32MD.lib ..\lib\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win32\bin\release\*.dll ..\bin\* 1>nul
xcopy /y ..\openssl\VS_120\win32\bin\release\*.lib ..\lib\* 1>nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>

View File

@ -121,8 +121,9 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin64\* 1>nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib64\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*.dll ..\bin64\* 1>nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*.lib ..\lib64\* 1>nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*.pdb ..\bin64\* 1>nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -156,8 +157,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin64\* 1>nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib64\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*.dll ..\bin64\* 1>nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*.lib ..\lib64\* 1>nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -194,8 +195,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.lib ..\lib64\* 1>nul
xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.pdb ..\lib64\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win64\lib\debug\*.lib ..\lib64\* 1>nul
xcopy /y ..\openssl\VS_120\win64\lib\debug\*.pdb ..\lib64\* 1>nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -222,7 +223,7 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\lib\release\*64MT.lib ..\lib64\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win64\lib\release\*.lib ..\lib64\* 1>nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -250,8 +251,9 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin64\* 1>nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib64\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*.dll ..\bin64\* 1>nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*.lib ..\lib64\* 1>nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*.pdb ..\bin64\* 1>nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -278,8 +280,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin64\* 1>nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib64\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*.dll ..\bin64\* 1>nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*.lib ..\lib64\* 1>nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="debug_shared|x64">
@ -121,8 +121,9 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin64\* 1>nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib64\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*.dll ..\bin64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*.lib ..\lib64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*.pdb ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -156,8 +157,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin64\* 1>nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib64\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*.dll ..\bin64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -194,8 +195,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.lib ..\lib64\* 1>nul
xcopy /y ..\openssl\VS_120\win64\lib\debug\*64MTd.pdb ..\lib64\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win64\lib\debug\*.lib ..\lib64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\lib\debug\*.pdb ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -222,7 +223,7 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\lib\release\*64MT.lib ..\lib64\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win64\lib\release\*.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -250,8 +251,9 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.dll ..\bin64\* 1>nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*64MDd.lib ..\lib64\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\debug\*.dll ..\bin64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*.lib ..\lib64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\debug\*.pdb ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>
@ -278,8 +280,8 @@ exit 0</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
<PreBuildEvent>
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.dll ..\bin64\* 1>nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*64MD.lib ..\lib64\* 1>nul
<Command>xcopy /y ..\openssl\VS_120\win64\bin\release\*.dll ..\bin64\* 1&gt;nul
xcopy /y ..\openssl\VS_120\win64\bin\release\*.lib ..\lib64\* 1&gt;nul
exit 0</Command>
</PreBuildEvent>
<ClCompile>

View File

@ -87,27 +87,10 @@ enum RSAPaddingMode
// Automatically link Crypto and OpenSSL libraries.
//
#if defined(_MSC_VER)
#if defined(_WIN64)
#define POCO_PLATFORM_BITS "64"
#else
#define POCO_PLATFORM_BITS "32"
#endif
#if defined (_DEBUG)
#define POCO_DEBUG_POSTFIX "d"
#else
#define POCO_DEBUG_POSTFIX ""
#endif
#if !defined(POCO_NO_AUTOMATIC_LIBS)
#if !defined(POCO_EXTERNAL_OPENSSL)
#if defined (_DLL)
#pragma comment(lib, "libeay" POCO_PLATFORM_BITS "MD" POCO_DEBUG_POSTFIX ".lib")
#pragma comment(lib, "ssleay" POCO_PLATFORM_BITS "MD" POCO_DEBUG_POSTFIX ".lib")
#else
#pragma comment(lib, "libeay" POCO_PLATFORM_BITS "MT" POCO_DEBUG_POSTFIX ".lib")
#pragma comment(lib, "ssleay" POCO_PLATFORM_BITS "MT" POCO_DEBUG_POSTFIX ".lib")
#endif
#pragma comment(lib, "libcrypto.lib")
#pragma comment(lib, "libssl.lib")
#endif // POCO_EXTERNAL_OPENSSL
#if !defined(Crypto_EXPORTS)
#pragma comment(lib, "PocoCrypto" POCO_LIB_SUFFIX)

View File

@ -120,6 +120,7 @@ public:
/// Returns pointer to the OpenSSL EVP_PKEY structure.
private:
static int type(EVP_PKEY* pEVPPKey);
void newECKey(const char* group);
void duplicate(EVP_PKEY* pEVPPKey);
void setKey(ECKey* pKey);
@ -244,11 +245,17 @@ private:
// inlines
//
inline int EVPPKey::type(EVP_PKEY* pEVPPKey)
{
if (!pEVPPKey) return NID_undef;
return EVP_PKEY_type(EVP_PKEY_id(pEVPPKey));
}
inline int EVPPKey::type() const
{
if (!_pEVPPKey) return NID_undef;
return EVP_PKEY_type(_pEVPPKey->type);
return type(_pEVPPKey);
}

View File

@ -213,7 +213,8 @@ void EVPPKey::duplicate(EVP_PKEY* pEVPPKey)
if (!_pEVPPKey) throw NullPointerException("EVPPKey::duplicate(): "
"EVP_PKEY_new() returned null.");
switch (pEVPPKey->type)
int keyType = type(pEVPPKey);
switch (keyType)
{
case EVP_PKEY_RSA:
{
@ -234,12 +235,12 @@ void EVPPKey::duplicate(EVP_PKEY* pEVPPKey)
EVP_PKEY_set1_EC_KEY(_pEVPPKey, pEC);
EC_KEY_free(pEC);
}
else throw OpenSSLException("EVPPKey:duplicate()");
else throw OpenSSLException();
break;
}
default:
throw NotImplementedException("EVPPKey:duplicate(); Key type: " +
NumberFormatter::format(pEVPPKey->type));
NumberFormatter::format(keyType));
}
}

View File

@ -99,7 +99,7 @@ void PKCS12Container::load(PKCS12* pPKCS12, const std::string& password)
if(pBuffer)
{
_pkcsFriendlyname = pBuffer;
CRYPTO_free(pBuffer);
OPENSSL_free(pBuffer);
}else _pkcsFriendlyname.clear();
if(pBags) sk_PKCS12_SAFEBAG_pop_free(pBags, PKCS12_SAFEBAG_free);
}

@ -1 +1 @@
Subproject commit 6dc14894cb5cb32d8079acca9cd7d2853ba425da
Subproject commit af3dfc6ca786061640f55618b022aa4a62dffb2e