openssl 1.1 support

This commit is contained in:
Alex Fabijanic
2017-09-22 16:29:33 -05:00
parent 6b57edd031
commit 0e81e082ff
224 changed files with 1499 additions and 1452 deletions

View File

@@ -101,13 +101,8 @@ enum RSAPaddingMode
#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

@@ -121,8 +121,8 @@ public:
private:
EVPPKey();
static int type(EVP_PKEY* pEVPPKey);
void newECKey(const char* group);
void duplicate(EVP_PKEY* pEVPPKey);
void setKey(ECKey* pKey);
@@ -247,14 +247,19 @@ private:
// inlines
//
inline int EVPPKey::type() const
inline int EVPPKey::type(EVP_PKEY* pEVPPKey)
{
if (!_pEVPPKey) return NID_undef;
if (!pEVPPKey) return NID_undef;
return EVP_PKEY_type(_pEVPPKey->type);
return EVP_PKEY_type(EVP_PKEY_id(pEVPPKey));
}
inline int EVPPKey::type() const
{
return type(_pEVPPKey);
}
inline bool EVPPKey::isSupported(int type) const
{
return type == EVP_PKEY_EC || type == EVP_PKEY_RSA;