mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-11 00:44:48 +01:00
openssl 1.1 support
This commit is contained in:
@@ -216,7 +216,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:
|
||||
{
|
||||
@@ -242,7 +243,7 @@ void EVPPKey::duplicate(EVP_PKEY* pEVPPKey)
|
||||
}
|
||||
default:
|
||||
throw NotImplementedException("EVPPKey:duplicate(); Key type: " +
|
||||
NumberFormatter::format(pEVPPKey->type));
|
||||
NumberFormatter::format(keyType));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,11 +95,11 @@ void PKCS12Container::load(PKCS12* pPKCS12, const std::string& password)
|
||||
PKCS12_SAFEBAG* pBag = PKCS12_add_cert(&pBags, pCert);
|
||||
if (pBag)
|
||||
{
|
||||
char*pBuffer = PKCS12_get_friendlyname(pBag);
|
||||
char* pBuffer = PKCS12_get_friendlyname(pBag);
|
||||
if(pBuffer)
|
||||
{
|
||||
_pkcsFriendlyname = pBuffer;
|
||||
CRYPTO_free(pBuffer);
|
||||
OPENSSL_free(pBuffer);
|
||||
}else _pkcsFriendlyname.clear();
|
||||
if(pBags) sk_PKCS12_SAFEBAG_pop_free(pBags, PKCS12_SAFEBAG_free);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user