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

Side by Side Diff: net/quic/core/crypto/p256_key_exchange_test.cc

Issue 2566783002: Various formatting cleanups to net/quic/crypto and net/quic/congestion_control (Closed)
Patch Set: Rebase Created 4 years 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 unified diff | Download patch
« no previous file with comments | « net/quic/core/crypto/p256_key_exchange.cc ('k') | net/quic/core/crypto/proof_source.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/core/crypto/p256_key_exchange.h" 5 #include "net/quic/core/crypto/p256_key_exchange.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h"
10 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
11 10
12 using std::string; 11 using std::string;
13 12
14 namespace net { 13 namespace net {
15 namespace test { 14 namespace test {
16 15
17 // SharedKey just tests that the basic key exchange identity holds: that both 16 // SharedKey just tests that the basic key exchange identity holds: that both
18 // parties end up with the same key. 17 // parties end up with the same key.
19 TEST(P256KeyExchange, SharedKey) { 18 TEST(P256KeyExchange, SharedKey) {
(...skipping 16 matching lines...) Expand all
36 35
37 std::string alice_shared, bob_shared; 36 std::string alice_shared, bob_shared;
38 ASSERT_TRUE(alice->CalculateSharedKey(bob_public, &alice_shared)); 37 ASSERT_TRUE(alice->CalculateSharedKey(bob_public, &alice_shared));
39 ASSERT_TRUE(bob->CalculateSharedKey(alice_public, &bob_shared)); 38 ASSERT_TRUE(bob->CalculateSharedKey(alice_public, &bob_shared));
40 ASSERT_EQ(alice_shared, bob_shared); 39 ASSERT_EQ(alice_shared, bob_shared);
41 } 40 }
42 } 41 }
43 42
44 } // namespace test 43 } // namespace test
45 } // namespace net 44 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/crypto/p256_key_exchange.cc ('k') | net/quic/core/crypto/proof_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698