summaryrefslogtreecommitdiff
path: root/gtests/freebl_gtest
diff options
context:
space:
mode:
authorFranziskus Kiefer <franziskuskiefer@gmail.com>2017-04-25 10:41:03 +0200
committerFranziskus Kiefer <franziskuskiefer@gmail.com>2017-04-25 10:41:03 +0200
commit88fcbb33c9a4c13d46e7542b91993969047eefae (patch)
treef9e86f085e7de42981946687743dbcaaa253170e /gtests/freebl_gtest
parentdd6047548061806f5e7fc27f5f3b9a79bbfd3f56 (diff)
downloadnss-hg-88fcbb33c9a4c13d46e7542b91993969047eefae.tar.gz
Bug 1357670 - AES-NI for all platforms that support it, r=ttaubert,mt
With this patch we use AES-NI whenever possible. The compile time flag USE_HW_AES does NOT disable this new code. NSS_DISABLE_HW_AES can be used as runtime flag to disable AES-NI and fall back to the software implementation. Differential Revision: https://nss-review.dev.mozaws.net/D323
Diffstat (limited to 'gtests/freebl_gtest')
-rw-r--r--gtests/freebl_gtest/ghash_unittest.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/gtests/freebl_gtest/ghash_unittest.cc b/gtests/freebl_gtest/ghash_unittest.cc
index eeca2daaf..1866bda02 100644
--- a/gtests/freebl_gtest/ghash_unittest.cc
+++ b/gtests/freebl_gtest/ghash_unittest.cc
@@ -137,16 +137,15 @@ class GHashTest : public ::testing::TestWithParam<ghash_kat_value> {
// Hash additional_data, cipher_text.
gcmHash_Reset(&ghashCtx,
const_cast<const unsigned char *>(additional_data.data()),
- additional_data.size(), 16);
+ additional_data.size());
gcmHash_Update(&ghashCtx,
const_cast<const unsigned char *>(cipher_text.data()),
- cipher_text.size(), 16);
+ cipher_text.size());
// Finalise (hash in the length).
uint8_t result_bytes[16];
unsigned int out_len;
- ASSERT_EQ(SECSuccess,
- gcmHash_Final(&ghashCtx, result_bytes, &out_len, 16, 16));
+ ASSERT_EQ(SECSuccess, gcmHash_Final(&ghashCtx, result_bytes, &out_len, 16));
ASSERT_EQ(16U, out_len);
EXPECT_EQ(expected, std::vector<uint8_t>(result_bytes, result_bytes + 16));
}