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

Unified Diff: net/quic/crypto/curve25519_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/curve25519_key_exchange.cc ('k') | net/quic/crypto/ephemeral_key_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/curve25519_key_exchange_test.cc
diff --git a/net/quic/crypto/curve25519_key_exchange_test.cc b/net/quic/crypto/curve25519_key_exchange_test.cc
deleted file mode 100644
index 6c87d243f749ea16f4b57faa306809efb3478056..0000000000000000000000000000000000000000
--- a/net/quic/crypto/curve25519_key_exchange_test.cc
+++ /dev/null
@@ -1,44 +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/curve25519_key_exchange.h"
-
-#include <memory>
-
-#include "base/strings/string_piece.h"
-#include "net/quic/crypto/quic_random.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-using base::StringPiece;
-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(Curve25519KeyExchange, SharedKey) {
- QuicRandom* const rand = QuicRandom::GetInstance();
-
- for (int i = 0; i < 5; i++) {
- const string alice_key(Curve25519KeyExchange::NewPrivateKey(rand));
- const string bob_key(Curve25519KeyExchange::NewPrivateKey(rand));
-
- std::unique_ptr<Curve25519KeyExchange> alice(
- Curve25519KeyExchange::New(alice_key));
- std::unique_ptr<Curve25519KeyExchange> bob(
- Curve25519KeyExchange::New(bob_key));
-
- const StringPiece alice_public(alice->public_value());
- const StringPiece bob_public(bob->public_value());
-
- 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/curve25519_key_exchange.cc ('k') | net/quic/crypto/ephemeral_key_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698