diff options
author | Jeffrey Walton <noloader@gmail.com> | 2017-12-26 00:46:50 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2017-12-26 00:46:50 -0500 |
commit | b7133e7b3b25ad15810ec90911b0bd01a2ff5ad6 (patch) | |
tree | 00fcaa836260218bdf9c09d3da1614af5b5e203e /emsa2.h | |
parent | c0a8dab984d1214a76b6116a02baf1021bf7dc73 (diff) | |
download | cryptopp-git-b7133e7b3b25ad15810ec90911b0bd01a2ff5ad6.tar.gz |
Fix Clang specialization and definition warnings (GH #300, GH #533)
Clang 3.8 and above generates lots of "'PKCS_DigestDecoration<SHA1>::decoration' required here, but no definition is available" warnings
Diffstat (limited to 'emsa2.h')
-rw-r--r-- | emsa2.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -58,6 +58,16 @@ CRYPTOPP_DLL_TEMPLATE_CLASS EMSA2HashId<SHA384>; CRYPTOPP_DLL_TEMPLATE_CLASS EMSA2HashId<SHA512>;
#endif
+// https://github.com/weidai11/cryptopp/issues/300 and
+// https://github.com/weidai11/cryptopp/issues/533
+#if defined(__clang__)
+template<> const byte EMSA2HashId<SHA1>::id;
+template<> const byte EMSA2HashId<SHA224>::id;
+template<> const byte EMSA2HashId<SHA256>::id;
+template<> const byte EMSA2HashId<SHA384>::id;
+template<> const byte EMSA2HashId<SHA512>::id;
+#endif
+
/// \class EMSA2Pad
/// \brief EMSA2 padding method
/// \since Crypto++ 5.0
|