Fix Clang warning on missing template definitions

This commit is contained in:
Jeffrey Walton 2017-08-16 12:21:07 -04:00
parent 8f4b0dc081
commit c40a4dc9f7
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
9 changed files with 16 additions and 1 deletions

View File

@ -8,6 +8,7 @@
#include "pubkey.h" #include "pubkey.h"
#include "gfpcrypt.h" #include "gfpcrypt.h"
#include "eccrypto.h" #include "eccrypto.h"
#include "pkcspad.h"
#include "files.h" #include "files.h"
#include "filters.h" #include "filters.h"

View File

@ -6,6 +6,7 @@
#include "dll.h" #include "dll.h"
#include "config.h" #include "config.h"
#include "iterhash.h" #include "iterhash.h"
#include "pkcspad.h"
// Cast from FARPROC to funcptr with args, http://stackoverflow.com/q/4192058/608639 // Cast from FARPROC to funcptr with args, http://stackoverflow.com/q/4192058/608639
#pragma warning(disable: 4191) #pragma warning(disable: 4191)

View File

@ -5,6 +5,7 @@
#include "dll.h" #include "dll.h"
#include "cryptlib.h" #include "cryptlib.h"
#include "filters.h" #include "filters.h"
#include "pkcspad.h"
#if CRYPTOPP_MSC_VERSION #if CRYPTOPP_MSC_VERSION
# pragma warning(disable: 4505 4355) # pragma warning(disable: 4505 4355)

View File

@ -10,6 +10,7 @@
#include "cryptlib.h" #include "cryptlib.h"
#include "filters.h" #include "filters.h"
#include "smartptr.h" #include "smartptr.h"
#include "pkcspad.h"
#include "misc.h" #include "misc.h"
// Simply disable CRYPTOPP_WIN32_AVAILABLE for Windows Phone and Windows Store apps // Simply disable CRYPTOPP_WIN32_AVAILABLE for Windows Phone and Windows Store apps

View File

@ -7,6 +7,7 @@
#include "integer.h" #include "integer.h"
#include "nbtheory.h" #include "nbtheory.h"
#include "algparam.h" #include "algparam.h"
#include "pkcspad.h"
NAMESPACE_BEGIN(CryptoPP) NAMESPACE_BEGIN(CryptoPP)

View File

@ -53,12 +53,19 @@ class MD5;
} }
// end of list // end of list
#ifdef CRYPTOPP_IS_DLL #if defined(CRYPTOPP_IS_DLL)
CRYPTOPP_DLL_TEMPLATE_CLASS PKCS_DigestDecoration<SHA1>; CRYPTOPP_DLL_TEMPLATE_CLASS PKCS_DigestDecoration<SHA1>;
CRYPTOPP_DLL_TEMPLATE_CLASS PKCS_DigestDecoration<SHA224>; CRYPTOPP_DLL_TEMPLATE_CLASS PKCS_DigestDecoration<SHA224>;
CRYPTOPP_DLL_TEMPLATE_CLASS PKCS_DigestDecoration<SHA256>; CRYPTOPP_DLL_TEMPLATE_CLASS PKCS_DigestDecoration<SHA256>;
CRYPTOPP_DLL_TEMPLATE_CLASS PKCS_DigestDecoration<SHA384>; CRYPTOPP_DLL_TEMPLATE_CLASS PKCS_DigestDecoration<SHA384>;
CRYPTOPP_DLL_TEMPLATE_CLASS PKCS_DigestDecoration<SHA512>; CRYPTOPP_DLL_TEMPLATE_CLASS PKCS_DigestDecoration<SHA512>;
#elif defined(__clang__)
// Provide a default definition to avoid Clang warnings. CRTP will provide a
// real definition later. The single element is due to MSVC compile failures
// after adding the default definition. However, GCC produces multiple
// definitions which result in link failures. I give up...
template <class H>
const byte PKCS_DigestDecoration<H>::decoration[1] = {0x00};
#endif #endif
//! \class PKCS1v15_SignatureMessageEncodingMethod //! \class PKCS1v15_SignatureMessageEncodingMethod

View File

@ -9,6 +9,7 @@
#include "nbtheory.h" #include "nbtheory.h"
#include "algparam.h" #include "algparam.h"
#include "fips140.h" #include "fips140.h"
#include "pkcspad.h"
#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING) && !defined(CRYPTOPP_IS_DLL) #if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING) && !defined(CRYPTOPP_IS_DLL)
#include "pssr.h" #include "pssr.h"

View File

@ -24,6 +24,7 @@
#include "whrlpool.h" #include "whrlpool.h"
#include "tiger.h" #include "tiger.h"
#include "smartptr.h" #include "smartptr.h"
#include "pkcspad.h"
#include "stdcpp.h" #include "stdcpp.h"
#include "ossig.h" #include "ossig.h"
#include "trap.h" #include "trap.h"

View File

@ -39,6 +39,7 @@
#include "sha.h" #include "sha.h"
#include "ripemd.h" #include "ripemd.h"
#include "smartptr.h" #include "smartptr.h"
#include "pkcspad.h"
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>