diff options
-rw-r--r-- | 3way.cpp | 2 | ||||
-rw-r--r-- | arc4.cpp | 2 | ||||
-rw-r--r-- | chacha.cpp | 2 | ||||
-rw-r--r-- | dh.cpp | 2 | ||||
-rw-r--r-- | dh2.cpp | 2 | ||||
-rw-r--r-- | ec2n.h | 28 | ||||
-rw-r--r-- | eccrypto.cpp | 2 | ||||
-rw-r--r-- | eccrypto.h | 32 | ||||
-rw-r--r-- | ecp.h | 28 | ||||
-rw-r--r-- | elgamal.cpp | 2 | ||||
-rw-r--r-- | esign.cpp | 2 | ||||
-rw-r--r-- | files.cpp | 2 | ||||
-rw-r--r-- | gf2n.cpp | 2 | ||||
-rw-r--r-- | gfpcrypt.cpp | 2 | ||||
-rw-r--r-- | integer.cpp | 4 | ||||
-rw-r--r-- | luc.cpp | 2 | ||||
-rw-r--r-- | md5.cpp | 2 | ||||
-rw-r--r-- | modes.cpp | 6 | ||||
-rw-r--r-- | mqv.cpp | 2 | ||||
-rw-r--r-- | rsa.cpp | 2 | ||||
-rw-r--r-- | salsa.cpp | 2 | ||||
-rw-r--r-- | seal.cpp | 2 | ||||
-rw-r--r-- | test.cpp | 2 | ||||
-rw-r--r-- | trap.h | 10 | ||||
-rw-r--r-- | validat1.cpp | 6 | ||||
-rw-r--r-- | validat2.cpp | 2 | ||||
-rw-r--r-- | validate.h | 2 | ||||
-rw-r--r-- | wake.cpp | 2 | ||||
-rw-r--r-- | whrlpool.cpp | 2 |
29 files changed, 76 insertions, 82 deletions
@@ -7,7 +7,7 @@ NAMESPACE_BEGIN(CryptoPP)
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void ThreeWay_TestInstantiations()
{
ThreeWay::Encryption x1;
@@ -13,7 +13,7 @@ NAMESPACE_BEGIN(CryptoPP)
namespace Weak1 {
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void ARC4_TestInstantiations()
{
ARC4 x;
@@ -18,7 +18,7 @@ NAMESPACE_BEGIN(CryptoPP) a += b; d ^= a; d = rotlFixed<word32>(d, 8); \
c += d; b ^= c; b = rotlFixed<word32>(b, 7);
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void ChaCha_TestInstantiations()
{
ChaCha8::Encryption x1;
@@ -8,7 +8,7 @@ NAMESPACE_BEGIN(CryptoPP)
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void DH_TestInstantiations()
{
DH dh1;
@@ -5,7 +5,7 @@ NAMESPACE_BEGIN(CryptoPP)
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void DH2_TestInstantiations()
{
DH2 dh(*(SimpleKeyAgreementDomain*)NULL);
@@ -21,21 +21,21 @@ NAMESPACE_BEGIN(CryptoPP) //! Elliptic Curve Point
struct CRYPTOPP_DLL EC2NPoint
{
+#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
+ virtual ~EC2NPoint() {}
+#endif
+
EC2NPoint() : identity(true) {}
EC2NPoint(const PolynomialMod2 &x, const PolynomialMod2 &y)
- : identity(false), x(x), y(y) {}
+ : x(x), y(y), identity(false) {}
bool operator==(const EC2NPoint &t) const
{return (identity && t.identity) || (!identity && !t.identity && x==t.x && y==t.y);}
bool operator< (const EC2NPoint &t) const
{return identity ? !t.identity : (!t.identity && (x<t.x || (x==t.x && y<t.y)));}
-#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
- virtual ~EC2NPoint() {}
-#endif
-
- bool identity;
PolynomialMod2 x, y;
+ bool identity;
};
CRYPTOPP_DLL_TEMPLATE_CLASS AbstractGroup<EC2NPoint>;
@@ -48,6 +48,10 @@ public: typedef Field::Element FieldElement;
typedef EC2NPoint Point;
+#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
+ virtual ~EC2N() {}
+#endif
+
EC2N() {}
EC2N(const Field &field, const Field::Element &a, const Field::Element &b)
: m_field(field), m_a(a), m_b(b) {}
@@ -92,10 +96,6 @@ public: bool operator==(const EC2N &rhs) const
{return GetField() == rhs.GetField() && m_a == rhs.m_a && m_b == rhs.m_b;}
-#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
- virtual ~EC2N() {}
-#endif
-
private:
clonable_ptr<Field> m_field;
FieldElement m_a, m_b;
@@ -113,6 +113,10 @@ template<> class EcPrecomputation<EC2N> : public DL_GroupPrecomputation<EC2N::Po public:
typedef EC2N EllipticCurve;
+#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
+ virtual ~EcPrecomputation() {}
+#endif
+
// DL_GroupPrecomputation
const AbstractGroup<Element> & GetGroup() const {return m_ec;}
Element BERDecodeElement(BufferedTransformation &bt) const {return m_ec.BERDecodePoint(bt);}
@@ -122,10 +126,6 @@ public: void SetCurve(const EC2N &ec) {m_ec = ec;}
const EC2N & GetCurve() const {return m_ec;}
-#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
- virtual ~EcPrecomputation() {}
-#endif
-
private:
EC2N m_ec;
};
diff --git a/eccrypto.cpp b/eccrypto.cpp index 4c2640b0..19395a2c 100644 --- a/eccrypto.cpp +++ b/eccrypto.cpp @@ -31,7 +31,7 @@ NAMESPACE_BEGIN(CryptoPP)
#if 0
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
static void ECDSA_TestInstantiations()
{
ECDSA<EC2N>::Signer t1;
@@ -38,6 +38,10 @@ public: typedef Point Element;
typedef IncompatibleCofactorMultiplication DefaultCofactorOption;
+#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
+ virtual ~DL_GroupParameters_EC() {}
+#endif
+
DL_GroupParameters_EC() : m_compress(false), m_encodeAsOID(true) {}
DL_GroupParameters_EC(const OID &oid)
: m_compress(false), m_encodeAsOID(true) {Initialize(oid);}
@@ -133,10 +137,6 @@ public: void LoadRecommendedParameters(const OID &oid) {Initialize(oid);}
#endif
-#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
- virtual ~DL_GroupParameters_EC() {}
-#endif
-
protected:
unsigned int FieldElementLength() const {return GetCurve().GetField().MaxElementByteLength();}
unsigned int ExponentLength() const {return m_n.ByteCount();}
@@ -154,6 +154,10 @@ class DL_PublicKey_EC : public DL_PublicKeyImpl<DL_GroupParameters_EC<EC> > public:
typedef typename EC::Point Element;
+#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
+ virtual ~DL_PublicKey_EC() {}
+#endif
+
void Initialize(const DL_GroupParameters_EC<EC> ¶ms, const Element &Q)
{this->AccessGroupParameters() = params; this->SetPublicElement(Q);}
void Initialize(const EC &ec, const Element &G, const Integer &n, const Element &Q)
@@ -162,10 +166,6 @@ public: // X509PublicKey
void BERDecodePublicKey(BufferedTransformation &bt, bool parametersPresent, size_t size);
void DEREncodePublicKey(BufferedTransformation &bt) const;
-
-#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
- virtual ~DL_PublicKey_EC() {}
-#endif
};
//! EC private key
@@ -175,6 +175,10 @@ class DL_PrivateKey_EC : public DL_PrivateKeyImpl<DL_GroupParameters_EC<EC> > public:
typedef typename EC::Point Element;
+#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
+ virtual ~DL_PrivateKey_EC() {}
+#endif
+
void Initialize(const DL_GroupParameters_EC<EC> ¶ms, const Integer &x)
{this->AccessGroupParameters() = params; this->SetPrivateExponent(x);}
void Initialize(const EC &ec, const Element &G, const Integer &n, const Integer &x)
@@ -187,10 +191,6 @@ public: // PKCS8PrivateKey
void BERDecodePrivateKey(BufferedTransformation &bt, bool parametersPresent, size_t size);
void DEREncodePrivateKey(BufferedTransformation &bt) const;
-
-#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
- virtual ~DL_PrivateKey_EC() {}
-#endif
};
//! Elliptic Curve Diffie-Hellman, AKA <a href="http://www.weidai.com/scan-mirror/ka.html#ECDH">ECDH</a>
@@ -340,13 +340,7 @@ struct ECIES virtual ~ECIES() {}
#endif
-#if (CRYPTOPP_GCC_VERSION >= 40500) || (CRYPTOPP_LLVM_CLANG_VERSION >= 20800)
-} __attribute__((deprecated ("ECIES will be changing in the near future due to (1) an implementation bug and (2) an interop issue")));
-#elif (CRYPTOPP_GCC_VERSION)
-} __attribute__((deprecated));
-#else
-};
-#endif
+} CRYPTOPP_DEPRECATED ("ECIES will be changing in the near future due to an interop issue");
NAMESPACE_END
@@ -19,21 +19,21 @@ NAMESPACE_BEGIN(CryptoPP) //! Elliptical Curve Point
struct CRYPTOPP_DLL ECPPoint
{
+#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
+ virtual ~ECPPoint() {}
+#endif
+
ECPPoint() : identity(true) {}
ECPPoint(const Integer &x, const Integer &y)
- : identity(false), x(x), y(y) {}
+ : x(x), y(y), identity(false) {}
bool operator==(const ECPPoint &t) const
{return (identity && t.identity) || (!identity && !t.identity && x==t.x && y==t.y);}
bool operator< (const ECPPoint &t) const
{return identity ? !t.identity : (!t.identity && (x<t.x || (x==t.x && y<t.y)));}
-#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
- virtual ~ECPPoint() {}
-#endif
-
- bool identity;
Integer x, y;
+ bool identity;
};
CRYPTOPP_DLL_TEMPLATE_CLASS AbstractGroup<ECPPoint>;
@@ -46,6 +46,10 @@ public: typedef Integer FieldElement;
typedef ECPPoint Point;
+#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
+ virtual ~ECP() {}
+#endif
+
ECP() {}
ECP(const ECP &ecp, bool convertToMontgomeryRepresentation = false);
ECP(const Integer &modulus, const FieldElement &a, const FieldElement &b)
@@ -94,10 +98,6 @@ public: bool operator==(const ECP &rhs) const
{return GetField() == rhs.GetField() && m_a == rhs.m_a && m_b == rhs.m_b;}
-#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
- virtual ~ECP() {}
-#endif
-
private:
clonable_ptr<Field> m_fieldPtr;
FieldElement m_a, m_b;
@@ -115,6 +115,10 @@ template<> class EcPrecomputation<ECP> : public DL_GroupPrecomputation<ECP::Poin public:
typedef ECP EllipticCurve;
+#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
+ virtual ~EcPrecomputation() {}
+#endif
+
// DL_GroupPrecomputation
bool NeedConversions() const {return true;}
Element ConvertIn(const Element &P) const
@@ -133,10 +137,6 @@ public: }
const ECP & GetCurve() const {return *m_ecOriginal;}
-#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
- virtual ~EcPrecomputation() {}
-#endif
-
private:
value_ptr<ECP> m_ec, m_ecOriginal;
};
diff --git a/elgamal.cpp b/elgamal.cpp index ca3dcccc..650a4cc5 100644 --- a/elgamal.cpp +++ b/elgamal.cpp @@ -7,7 +7,7 @@ NAMESPACE_BEGIN(CryptoPP)
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void ElGamal_TestInstantiations()
{
ElGamalEncryptor test1(1, 1, 1);
@@ -18,7 +18,7 @@ NAMESPACE_BEGIN(CryptoPP)
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void ESIGN_TestInstantiations()
{
ESIGN<SHA>::Verifier x1(1, 1);
@@ -10,7 +10,7 @@ NAMESPACE_BEGIN(CryptoPP)
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void Files_TestInstantiations()
{
FileStore f0;
@@ -325,7 +325,7 @@ PolynomialMod2 PolynomialMod2::Modulo(const PolynomialMod2 &b) const PolynomialMod2& PolynomialMod2::operator<<=(unsigned int n)
{
-#if CRYPTOPP_DEBUG
+#if defined(CRYPTOPP_DEBUG)
int x; CRYPTOPP_UNUSED(x);
CRYPTOPP_ASSERT(SafeConvert(n,x));
#endif
diff --git a/gfpcrypt.cpp b/gfpcrypt.cpp index f49be2f9..80fbd1b8 100644 --- a/gfpcrypt.cpp +++ b/gfpcrypt.cpp @@ -20,7 +20,7 @@ NAMESPACE_BEGIN(CryptoPP)
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void TestInstantiations_gfpcrypt()
{
GDSA<SHA>::Signer test;
diff --git a/integer.cpp b/integer.cpp index e1d59f8b..e4d7993c 100644 --- a/integer.cpp +++ b/integer.cpp @@ -2637,7 +2637,7 @@ static inline void AtomicDivide(word *Q, const word *A, const word *B) Q[1] = SubatomicDivide(T+1, B[0], B[1]);
Q[0] = SubatomicDivide(T, B[0], B[1]);
-#if CRYPTOPP_DEBUG
+#if defined(CRYPTOPP_DEBUG)
// multiply quotient and divisor and add remainder, make sure it equals dividend
CRYPTOPP_ASSERT(!T[2] && !T[3] && (T[1] < B[1] || (T[1]==B[1] && T[0]<B[0])));
word P[4];
@@ -2656,7 +2656,7 @@ static inline void AtomicDivide(word *Q, const word *A, const word *B) Q[0] = q.GetLowHalf();
Q[1] = q.GetHighHalf();
-#if CRYPTOPP_DEBUG
+#if defined(CRYPTOPP_DEBUG)
if (B[0] || B[1])
{
// multiply quotient and divisor and add remainder, make sure it equals dividend
@@ -10,7 +10,7 @@ NAMESPACE_BEGIN(CryptoPP)
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void LUC_TestInstantiations()
{
LUC_HMP<SHA>::Signer t1;
@@ -9,7 +9,7 @@ NAMESPACE_BEGIN(CryptoPP)
namespace Weak1 {
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void MD5_TestInstantiations()
{
MD5 x;
@@ -7,13 +7,13 @@ #include "modes.h"
#include "misc.h"
-//#if CRYPTOPP_DEBUG
+#if defined(CRYPTOPP_DEBUG)
#include "des.h"
-//#endif
+#endif
NAMESPACE_BEGIN(CryptoPP)
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void Modes_TestInstantiations()
{
CFB_Mode<DES>::Encryption m0;
@@ -9,7 +9,7 @@ NAMESPACE_BEGIN(CryptoPP)
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void TestInstantiations_MQV()
{
MQV mqv;
@@ -10,7 +10,7 @@ #include "algparam.h"
#include "fips140.h"
-#if 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"
NAMESPACE_BEGIN(CryptoPP)
void RSA_TestInstantiations()
@@ -32,7 +32,7 @@ NAMESPACE_BEGIN(CryptoPP)
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void Salsa20_TestInstantiations()
{
Salsa20::Encryption x1;
@@ -10,7 +10,7 @@ NAMESPACE_BEGIN(CryptoPP)
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void SEAL_TestInstantiations()
{
SEAL<>::Encryption x;
@@ -126,7 +126,7 @@ RandomNumberGenerator & GlobalRNG() }
// See misc.h and trap.h for comments and usage
-#if CRYPTOPP_DEBUG && defined(UNIX_SIGNALS_AVAILABLE)
+#if defined(CRYPTOPP_DEBUG) && defined(UNIX_SIGNALS_AVAILABLE)
static const SignalHandler<SIGTRAP, false> s_dummyHandler;
// static const DebugTrapHandler s_dummyHandler;
#endif
@@ -18,7 +18,7 @@ #include "config.h"
-#if CRYPTOPP_DEBUG
+#if defined(CRYPTOPP_DEBUG)
# include <iostream>
# include <sstream>
# if defined(UNIX_SIGNALS_AVAILABLE)
@@ -46,7 +46,7 @@ //! \details An example of using \ref CRYPTOPP_ASSERT "CRYPTOPP_ASSERT" and DebugTrapHandler is shown below. The library's
//! test program, <tt>cryptest.exe</tt> (from test.cpp), exercises the structure:
//! <pre>
-//! #if CRYPTOPP_DEBUG && (defined(CRYPTOPP_BSD_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE))
+//! #if defined(CRYPTOPP_DEBUG) && defined(UNIX_SIGNALS_AVAILABLE)
//! static const DebugTrapHandler g_dummyHandler;
//! #endif
//!
@@ -62,7 +62,7 @@ # define CRYPTOPP_ASSERT(exp) { ... }
#endif
-#if CRYPTOPP_DEBUG && defined(UNIX_SIGNALS_AVAILABLE)
+#if defined(CRYPTOPP_DEBUG) && defined(UNIX_SIGNALS_AVAILABLE)
# define CRYPTOPP_ASSERT(exp) { \
if (!(exp)) { \
std::ostringstream oss; \
@@ -89,7 +89,7 @@ // Remove CRYPTOPP_ASSERT in non-debug builds.
// Can't use CRYPTOPP_UNUSED due to circular dependency
#ifndef CRYPTOPP_ASSERT
-# define CRYPTOPP_ASSERT(exp) ((void)(exp))
+# define CRYPTOPP_ASSERT(exp) ((void)0)
#endif
NAMESPACE_BEGIN(CryptoPP)
@@ -119,7 +119,7 @@ NAMESPACE_BEGIN(CryptoPP) //! \details An example of using \ref CRYPTOPP_ASSERT "CRYPTOPP_ASSERT" and DebugTrapHandler is shown below. The library's
//! test program, <tt>cryptest.exe</tt> (from test.cpp), exercises the structure:
//! <pre>
-//! #if CRYPTOPP_DEBUG && (defined(CRYPTOPP_BSD_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE))
+//! #if defined(CRYPTOPP_DEBUG) && defined(UNIX_SIGNALS_AVAILABLE)
//! static const DebugTrapHandler g_dummyHandler;
//! #endif
//!
diff --git a/validat1.cpp b/validat1.cpp index 9b7fcf54..fdda7957 100644 --- a/validat1.cpp +++ b/validat1.cpp @@ -78,7 +78,7 @@ bool ValidateAll(bool thorough) pass=TestRDSEED() && pass;
#endif
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_IMPORTS)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_IMPORTS)
// http://github.com/weidai11/cryptopp/issues/92
pass=TestSecBlock() && pass;
// http://github.com/weidai11/cryptopp/issues/64
@@ -330,7 +330,7 @@ bool TestSettings() return pass;
}
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_IMPORTS)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_IMPORTS)
bool TestSecBlock()
{
cout << "\nTesting SecBlock...\n\n";
@@ -1264,7 +1264,7 @@ bool TestSecBlock() }
#endif
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_IMPORTS)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_IMPORTS)
bool TestHuffmanCodes()
{
cout << "\nTesting Huffman codes...\n\n";
diff --git a/validat2.cpp b/validat2.cpp index 847491f4..16b98147 100644 --- a/validat2.cpp +++ b/validat2.cpp @@ -794,7 +794,7 @@ bool ValidateBlumGoldwasser() }
*/
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_IMPORTS)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_IMPORTS)
// Issue 64: "PolynomialMod2::operator<<=", http://github.com/weidai11/cryptopp/issues/64
bool TestPolynomialMod2()
{
@@ -90,7 +90,7 @@ bool ValidateEC2N(); bool ValidateECDSA();
bool ValidateESIGN();
-#if CRYPTOPP_DEBUG
+#if defined(CRYPTOPP_DEBUG)
bool TestSecBlock();
bool TestPolynomialMod2();
bool TestHuffmanCodes();
@@ -7,7 +7,7 @@ NAMESPACE_BEGIN(CryptoPP)
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void WAKE_TestInstantiations()
{
WAKE_OFB<>::Encryption x2;
diff --git a/whrlpool.cpp b/whrlpool.cpp index 853e1bc4..dc7c7c94 100644 --- a/whrlpool.cpp +++ b/whrlpool.cpp @@ -85,7 +85,7 @@ NAMESPACE_BEGIN(CryptoPP)
-#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
+#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void Whirlpool_TestInstantiations()
{
Whirlpool x;
|