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

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

Issue 2193073003: Move shared files in net/quic/ into net/quic/core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: io_thread_unittest.cc Created 4 years, 5 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/p256_key_exchange.cc ('k') | net/quic/crypto/proof_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/p256_key_exchange_test.cc
diff --git a/net/quic/crypto/p256_key_exchange_test.cc b/net/quic/crypto/p256_key_exchange_test.cc
deleted file mode 100644
index 4972480bb5c3617a9132be29839be93a62d6ba81..0000000000000000000000000000000000000000
--- a/net/quic/crypto/p256_key_exchange_test.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/quic/crypto/p256_key_exchange.h"
-
-#include <memory>
-
-#include "base/logging.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-using std::string;
-
-namespace net {
-namespace test {
-
-// SharedKey just tests that the basic key exchange identity holds: that both
-// parties end up with the same key.
-TEST(P256KeyExchange, SharedKey) {
- for (int i = 0; i < 5; i++) {
- string alice_private(P256KeyExchange::NewPrivateKey());
- string bob_private(P256KeyExchange::NewPrivateKey());
-
- ASSERT_FALSE(alice_private.empty());
- ASSERT_FALSE(bob_private.empty());
- ASSERT_NE(alice_private, bob_private);
-
- std::unique_ptr<P256KeyExchange> alice(P256KeyExchange::New(alice_private));
- std::unique_ptr<P256KeyExchange> bob(P256KeyExchange::New(bob_private));
-
- ASSERT_TRUE(alice.get() != nullptr);
- ASSERT_TRUE(bob.get() != nullptr);
-
- const base::StringPiece alice_public(alice->public_value());
- const base::StringPiece bob_public(bob->public_value());
-
- std::string alice_shared, bob_shared;
- ASSERT_TRUE(alice->CalculateSharedKey(bob_public, &alice_shared));
- ASSERT_TRUE(bob->CalculateSharedKey(alice_public, &bob_shared));
- ASSERT_EQ(alice_shared, bob_shared);
- }
-}
-
-} // namespace test
-} // namespace net
« no previous file with comments | « net/quic/crypto/p256_key_exchange.cc ('k') | net/quic/crypto/proof_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698