This avoids a circular dependency between misc.h and trap.h. It also allows us to logically segregate and group code to replace C++ handlers, like set_terminate
trap.h and CRYPTOPP_ASSERT has existed for over a year in Master. We deferred on the cut-over waiting for a minor version bump (5.7). We have to use it now due to CVE-2016-7420
Add CRYPTOPP_CROSS_COMPILE variable. Guard host uname calls on CROSS_COMPILE. Set CMAKE_CXX_LINK_FLAGS to CMAKE_CXX_FLAGS. Change to SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} <option>") pattern.
Solaris is showing unusual signs with SunCC 5.13 and 5.14. One user is experiencing a SIGBUS in SHA512::Transform due to data alignment of 'data', which was only 2-byte aligned. The project experienced an exception "Coneable not implemented" during the hashing test after building with Cmake. Its not clear how much Cmake influenced the project's results.
Recent versions of clang warn about missing PKCS_DigestDecoration
definitions, specifically the decoration members. For example:
In file included from testpkcs.cpp:8:
./pkcspad.h:89:53: warning: instantiation of variable 'CryptoPP::PKCS_DigestDecoration<CryptoPP::SHA1>::decoration' required here, but no definition is available [-Wundefined-var-template]
return HashIdentifier(PKCS_DigestDecoration<H>::decoration, (size_t)PKCS_DigestDecoration<H>::length);
^
./pubkey.h:608:19: note: in instantiation of member function 'CryptoPP::PKCS1v15_SignatureMessageEncodingMethod::HashIdentifierLookup::HashIdentifierLookup2<CryptoPP::SHA1>::Lookup' requested here
return L::Lookup();
^
./pubkey.h:638:26: note: in instantiation of member function 'CryptoPP::TF_ObjectImplBase<CryptoPP::TF_VerifierBase, CryptoPP::TF_SignatureSchemeOptions<CryptoPP::TF_SS<CryptoPP::PKCS1v15, CryptoPP::SHA1, CryptoPP::RSA, int
CryptoPP::RSA, CryptoPP::PKCS1v15_SignatureMessageEncodingMethod, CryptoPP::SHA1>, CryptoPP::RSAFunction>::GetHashIdentifier' requested here
class CRYPTOPP_NO_VTABLE TF_ObjectImpl : public TF_ObjectImplBase<BASE, SCHEME_OPTIONS, KEY_CLASS>
^
./pkcspad.h:32:20: note: forward declaration of template entity is here
static const byte decoration[];
^
This is because pkcspad.h doen't contain explicit instantiation
declarations for PKCS_DigestDecoration. These warnings can be fixed by
adding them in the !CRYPTOPP_IS_DLL case, which appears to apply only to
Windows.