Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(645)

Unified Diff: net/quic/crypto/aes_128_gcm_decrypter_test.cc

Issue 14816006: Land Recent QUIC changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing NET_PRIVATE_EXPORT to QuicWallTime Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/crypto/aes_128_gcm_decrypter_openssl.cc ('k') | net/quic/crypto/aes_128_gcm_encrypter_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/aes_128_gcm_decrypter_test.cc
diff --git a/net/quic/crypto/aes_128_gcm_decrypter_test.cc b/net/quic/crypto/aes_128_gcm_decrypter_test.cc
index 2ab0dd0d7f683ed1ef8e3ecd7e8db19125be3ef4..156dfb84932fe0b502271d52bab566d10a1bf6b4 100644
--- a/net/quic/crypto/aes_128_gcm_decrypter_test.cc
+++ b/net/quic/crypto/aes_128_gcm_decrypter_test.cc
@@ -333,18 +333,15 @@ TEST(Aes128GcmDecrypterTest, Decrypt) {
const TestGroupInfo& test_info = test_group_info[i];
for (size_t j = 0; test_vector[j].key != NULL; j++) {
// Decode the test vector.
- ASSERT_TRUE(DecodeHexString(test_vector[j].key, key, &key_len,
- sizeof(key)));
- ASSERT_TRUE(DecodeHexString(test_vector[j].iv, iv, &iv_len,
- sizeof(iv)));
- ASSERT_TRUE(DecodeHexString(test_vector[j].ct, ct, &ct_len,
- sizeof(ct)));
- ASSERT_TRUE(DecodeHexString(test_vector[j].aad, aad, &aad_len,
- sizeof(aad)));
- ASSERT_TRUE(DecodeHexString(test_vector[j].tag, tag, &tag_len,
- sizeof(tag)));
- ASSERT_TRUE(DecodeHexString(test_vector[j].pt, pt, &pt_len,
- sizeof(pt)));
+ ASSERT_TRUE(
+ DecodeHexString(test_vector[j].key, key, &key_len, sizeof(key)));
+ ASSERT_TRUE(DecodeHexString(test_vector[j].iv, iv, &iv_len, sizeof(iv)));
+ ASSERT_TRUE(DecodeHexString(test_vector[j].ct, ct, &ct_len, sizeof(ct)));
+ ASSERT_TRUE(
+ DecodeHexString(test_vector[j].aad, aad, &aad_len, sizeof(aad)));
+ ASSERT_TRUE(
+ DecodeHexString(test_vector[j].tag, tag, &tag_len, sizeof(tag)));
+ ASSERT_TRUE(DecodeHexString(test_vector[j].pt, pt, &pt_len, sizeof(pt)));
// The test vector's lengths should look sane. Note that the lengths
// in |test_info| are in bits.
@@ -365,8 +362,7 @@ TEST(Aes128GcmDecrypterTest, Decrypt) {
&decrypter, StringPiece(iv, iv_len),
// OpenSSL fails if NULL is set as the AAD, as opposed to a
// zero-length, non-NULL pointer.
- StringPiece(aad_len ? aad : NULL, aad_len),
- ciphertext));
+ StringPiece(aad_len ? aad : NULL, aad_len), ciphertext));
if (!decrypted.get()) {
EXPECT_EQ((size_t)-1, pt_len);
continue;
@@ -374,9 +370,8 @@ TEST(Aes128GcmDecrypterTest, Decrypt) {
ASSERT_NE((size_t)-1, pt_len);
ASSERT_EQ(pt_len, decrypted->length());
- test::CompareCharArraysWithHexError(
- "plaintext", decrypted->data(), pt_len,
- pt, pt_len);
+ test::CompareCharArraysWithHexError("plaintext", decrypted->data(),
+ pt_len, pt, pt_len);
}
}
}
« no previous file with comments | « net/quic/crypto/aes_128_gcm_decrypter_openssl.cc ('k') | net/quic/crypto/aes_128_gcm_encrypter_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698