diff options
author | Jeffrey Walton <noloader@gmail.com> | 2017-12-25 22:27:53 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2017-12-25 22:27:53 -0500 |
commit | 4232cfd40b692da38a3c3098af801d16ebb26852 (patch) | |
tree | 057ebacbf39dd09c62ada3ee4c8153161e31017b /pkcspad.h | |
parent | b20a91f6b2f6a41cc10f9fe5da63fa91f7f081e4 (diff) | |
download | cryptopp-git-4232cfd40b692da38a3c3098af801d16ebb26852.tar.gz |
Fix failed self test under Clang (GH #533)
This may cause GH #300, "Clang 3.9 and missing member definitions for template classes" or GH #294, "Fix clang warnings about undefined variable templates in pkcspad.h" to resurface. Man I hope not...
Diffstat (limited to 'pkcspad.h')
-rw-r--r-- | pkcspad.h | 30 |
1 files changed, 4 insertions, 26 deletions
@@ -2,13 +2,15 @@ /// \file pkcspad.h
/// \brief Classes for PKCS padding schemes
-/// \details PKCS #1 v1.5, v2.0 and P1363a allow MD2, MD5, SHA1, SHA224, SHA256, SHA384, SHA512, Tiger and RipeMd-160 to be instantiated.
+/// \details PKCS #1 v1.5, v2.0 and P1363a allow MD2, MD5, SHA1, SHA224, SHA256, SHA384,
+/// SHA512, Tiger and RipeMd-160 to be instantiated.
#ifndef CRYPTOPP_PKCSPAD_H
#define CRYPTOPP_PKCSPAD_H
#include "cryptlib.h"
#include "pubkey.h"
+#include "hashfwd.h"
#ifdef CRYPTOPP_IS_DLL
#include "sha.h"
@@ -40,24 +42,7 @@ public: // PKCS_DigestDecoration can be instantiated with the following
// classes as specified in PKCS #1 v2.0 and P1363a
-class SHA1;
-class SHA224;
-class SHA256;
-class SHA384;
-class SHA512;
-class Tiger;
-class RIPEMD160;
-
-namespace Weak1 {
- class MD2;
- class MD5;
-}
-
-// http://github.com/weidai11/cryptopp/issues/517
-class SHA3_256;
-class SHA3_384;
-class SHA3_512;
-// end of list
+// SHA1, SHA224, SHA256, SHA384, SHA512, Tiger, RIPEMD160, MD2, MD5
#if defined(CRYPTOPP_IS_DLL)
CRYPTOPP_DLL_TEMPLATE_CLASS PKCS_DigestDecoration<SHA1>;
@@ -69,13 +54,6 @@ CRYPTOPP_DLL_TEMPLATE_CLASS PKCS_DigestDecoration<SHA512>; CRYPTOPP_DLL_TEMPLATE_CLASS PKCS_DigestDecoration<SHA3_256>;
CRYPTOPP_DLL_TEMPLATE_CLASS PKCS_DigestDecoration<SHA3_384>;
CRYPTOPP_DLL_TEMPLATE_CLASS PKCS_DigestDecoration<SHA3_512>;
-#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
/// \class PKCS1v15_SignatureMessageEncodingMethod
|