fix linux build

This commit is contained in:
Alex Fabijanic 2017-09-21 11:42:54 -05:00
parent 6b57edd031
commit b01d45a166
3 changed files with 12 additions and 7 deletions

View File

@ -8,7 +8,9 @@ include $(POCO_BASE)/build/rules/global
SYSLIBS += -lssl -lcrypto
objects = Cipher CipherFactory CipherImpl CipherKey CipherKeyImpl CryptoStream CryptoTransform \
objects = Cipher CipherFactory CipherImpl CipherKey CipherKeyImpl \
CryptoException CryptoStream CryptoTransform ECDSADigestEngine \
ECKey ECKeyImpl EVPPKey KeyPair KeyPairImpl PKCS12Container \
RSACipherImpl RSAKey RSAKeyImpl RSADigestEngine DigestEngine \
X509Certificate OpenSSLInitializer

View File

@ -27,6 +27,7 @@
#include <openssl/evp.h>
#include <openssl/pem.h>
#include <sstream>
#include <typeinfo>
namespace Poco {
@ -146,8 +147,8 @@ private:
const std::string& keyFile,
const std::string& pass = "")
{
poco_assert_dbg (((typeid(K) == typeid(RSA) || typeid(K) == typeid(EC_KEY)) && getFunc) ||
((typeid(K) == typeid(EVP_PKEY)) && !getFunc));
poco_assert_dbg (((typeid(K*) == typeid(RSA*) || typeid(K*) == typeid(EC_KEY*)) && getFunc) ||
((typeid(K*) == typeid(EVP_PKEY*)) && !getFunc));
poco_check_ptr (ppKey);
poco_assert_dbg (!*ppKey);
@ -192,8 +193,8 @@ private:
std::istream* pIstr,
const std::string& pass = "")
{
poco_assert_dbg (((typeid(K) == typeid(RSA) || typeid(K) == typeid(EC_KEY)) && getFunc) ||
((typeid(K) == typeid(EVP_PKEY)) && !getFunc));
poco_assert_dbg (((typeid(K*) == typeid(RSA*) || typeid(K*) == typeid(EC_KEY*)) && getFunc) ||
((typeid(K*) == typeid(EVP_PKEY*)) && !getFunc));
poco_check_ptr(ppKey);
poco_assert_dbg(!*ppKey);

View File

@ -18,6 +18,8 @@
#include "CppUnit/TestSuite.h"
#include <sstream>
#include <fstream>
#include <iostream>
#include <cstring>
using namespace Poco::Crypto;
@ -126,7 +128,7 @@ void EVPTest::testRSAEVPPKey()
assert (sizePub1 && (sizePub1 == sizePub2));
assert (0 == memcmp(pPubData1, pPubData2, sizePub1));
#endif POCO_ENABLE_CPP11
#endif // POCO_ENABLE_CPP11
BIO_free(bioPub2);
BIO_free(bioPriv2);
@ -269,7 +271,7 @@ void EVPTest::testECEVPPKey()
assert (0 == memcmp(pPrivData1, pPrivData2, sizePriv1));
assert (sizePub1 && (sizePub1 == sizePub2));
assert (0 == memcmp(pPubData1, pPubData2, sizePub1));
#endif POCO_ENABLE_CPP11
#endif // POCO_ENABLE_CPP11
BIO_free(bioPub2);
BIO_free(bioPriv2);