Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Backed out changeset 5059d47bd423 (bug 1548398) for GCC 4.8 failures …
…in gcm.h

--HG--
extra : amend_source : 34a6e18f8e4598c1523599691088179560a6130b
  • Loading branch information
jcjones committed May 2, 2019
1 parent d031b47 commit c596f14
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
14 changes: 6 additions & 8 deletions gtests/freebl_gtest/mpi_unittest.cc
Expand Up @@ -6,7 +6,6 @@

#include <stdint.h>
#include <string.h>
#include <memory>

#ifdef __MACH__
#include <mach/clock.h>
Expand All @@ -28,7 +27,7 @@ void gettime(struct timespec* tp) {
tp->tv_sec = mts.tv_sec;
tp->tv_nsec = mts.tv_nsec;
#else
ASSERT_NE(0, timespec_get(tp, TIME_UTC));
clock_gettime(CLOCK_MONOTONIC, tp);
#endif
}

Expand Down Expand Up @@ -85,9 +84,8 @@ class MPITest : public ::testing::Test {
mp_int a;
ASSERT_EQ(MP_OKAY, mp_init(&a));
ASSERT_EQ(MP_OKAY, mp_read_unsigned_octets(&a, ref.data(), ref.size()));
std::unique_ptr<uint8_t[]> buf(new uint8_t[len]);
ASSERT_NE(buf, nullptr);
ASSERT_EQ(MP_OKAY, mp_to_fixlen_octets(&a, buf.get(), len));
uint8_t buf[len];
ASSERT_EQ(MP_OKAY, mp_to_fixlen_octets(&a, buf, len));
size_t compare;
if (len > ref.size()) {
for (size_t i = 0; i < len - ref.size(); ++i) {
Expand All @@ -98,9 +96,9 @@ class MPITest : public ::testing::Test {
compare = len;
}
dump("value", ref.data(), ref.size());
dump("output", buf.get(), len);
ASSERT_EQ(0, memcmp(buf.get() + len - compare,
ref.data() + ref.size() - compare, compare))
dump("output", buf, len);
ASSERT_EQ(0, memcmp(buf + len - compare, ref.data() + ref.size() - compare,
compare))
<< "comparing " << compare << " octets";
mp_clear(&a);
}
Expand Down
1 change: 0 additions & 1 deletion gtests/freebl_gtest/rsa_unittest.cc
Expand Up @@ -5,7 +5,6 @@
#include "gtest/gtest.h"

#include <stdint.h>
#include <memory>

#include "blapi.h"
#include "secitem.h"
Expand Down
1 change: 0 additions & 1 deletion nss.gyp
Expand Up @@ -198,7 +198,6 @@
'gtests/certdb_gtest/certdb_gtest.gyp:certdb_gtest',
'gtests/freebl_gtest/freebl_gtest.gyp:prng_gtest',
'gtests/freebl_gtest/freebl_gtest.gyp:blake2b_gtest',
'gtests/freebl_gtest/freebl_gtest.gyp:freebl_gtest',
'gtests/mozpkix_gtest/mozpkix_gtest.gyp:mozpkix_gtest',
'gtests/nss_bogo_shim/nss_bogo_shim.gyp:nss_bogo_shim',
'gtests/pk11_gtest/pk11_gtest.gyp:pk11_gtest',
Expand Down

0 comments on commit c596f14

Please sign in to comment.