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.
__BIGGEST_ALIGNMENT__ is provided by some compilers, like GCC and ICC (but not Clang). It is usually 16 on 64-bit platforms; and it is usually 8 on 32-bit platforms