| OLD | NEW |
| 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/crypto/p256_key_exchange.h" | 5 #include "net/quic/crypto/p256_key_exchange.h" |
| 6 | 6 |
| 7 #include <memory> |
| 8 |
| 7 #include "base/logging.h" | 9 #include "base/logging.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 11 |
| 10 using std::string; | 12 using std::string; |
| 11 | 13 |
| 12 namespace net { | 14 namespace net { |
| 13 namespace test { | 15 namespace test { |
| 14 | 16 |
| 15 // SharedKey just tests that the basic key exchange identity holds: that both | 17 // SharedKey just tests that the basic key exchange identity holds: that both |
| 16 // parties end up with the same key. | 18 // parties end up with the same key. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 34 | 36 |
| 35 std::string alice_shared, bob_shared; | 37 std::string alice_shared, bob_shared; |
| 36 ASSERT_TRUE(alice->CalculateSharedKey(bob_public, &alice_shared)); | 38 ASSERT_TRUE(alice->CalculateSharedKey(bob_public, &alice_shared)); |
| 37 ASSERT_TRUE(bob->CalculateSharedKey(alice_public, &bob_shared)); | 39 ASSERT_TRUE(bob->CalculateSharedKey(alice_public, &bob_shared)); |
| 38 ASSERT_EQ(alice_shared, bob_shared); | 40 ASSERT_EQ(alice_shared, bob_shared); |
| 39 } | 41 } |
| 40 } | 42 } |
| 41 | 43 |
| 42 } // namespace test | 44 } // namespace test |
| 43 } // namespace net | 45 } // namespace net |
| OLD | NEW |