summaryrefslogtreecommitdiff
path: root/fipsalgt.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2016-09-16 11:27:15 -0400
committerJeffrey Walton <noloader@gmail.com>2016-09-16 11:27:15 -0400
commit399a1546de71f41598c15edada28e7f0d616f541 (patch)
tree530160789358a3303be180df2d8529c82782156b /fipsalgt.cpp
parentfca5fbb36169a7522e6c533df9c322d47e3dc6bb (diff)
downloadcryptopp-git-399a1546de71f41598c15edada28e7f0d616f541.tar.gz
Add CRYPTOPP_ASSERT (Issue 277, CVE-2016-7420)
trap.h and CRYPTOPP_ASSERT has existed for over a year in Master. We deferred on the cut-over waiting for a minor version bump (5.7). We have to use it now due to CVE-2016-7420
Diffstat (limited to 'fipsalgt.cpp')
-rw-r--r--fipsalgt.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/fipsalgt.cpp b/fipsalgt.cpp
index c0d0c628..d20a9b9e 100644
--- a/fipsalgt.cpp
+++ b/fipsalgt.cpp
@@ -262,7 +262,7 @@ protected:
static inline void Xor(SecByteBlock &z, const SecByteBlock &x, const SecByteBlock &y)
{
- assert(x.size() == y.size());
+ CRYPTOPP_ASSERT(x.size() == y.size());
z.resize(x.size());
xorbuf(z, x, y, x.size());
}
@@ -637,7 +637,7 @@ protected:
}
else
{
- assert(m_test == "Gen");
+ CRYPTOPP_ASSERT(m_test == "Gen");
int modLen = atol(m_bracketString.substr(6).c_str());
std::string &encodedKey = m_data["PrivKey"];
RSA::PrivateKey priv;
@@ -1034,7 +1034,7 @@ protected:
}
else
{
- assert(m_test == "KAT");
+ CRYPTOPP_ASSERT(m_test == "KAT");
SecByteBlock &input = m_data2[INPUT];
SecByteBlock result(input.size());
@@ -1097,7 +1097,7 @@ protected:
if (m_line.substr(0, 2) == "H>")
{
- assert(m_test == "sha");
+ CRYPTOPP_ASSERT(m_test == "sha");
m_bracketString = m_line.substr(2, m_line.size()-4);
m_line = m_line.substr(0, 13) + "Hashes<H";
copyLine = true;