OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "net/test/channel_id_test_util.h" |
| 6 |
| 7 #include <string> |
| 8 |
| 9 #include "crypto/ec_private_key.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 |
| 12 namespace net { |
| 13 |
| 14 ::testing::AssertionResult KeysEqual(crypto::ECPrivateKey* key1, |
| 15 crypto::ECPrivateKey* key2) { |
| 16 std::string public_key1, public_key2; |
| 17 EXPECT_TRUE(key1 && key1->ExportRawPublicKey(&public_key1)); |
| 18 EXPECT_TRUE(key2 && key2->ExportRawPublicKey(&public_key2)); |
| 19 if (public_key1 == public_key2) |
| 20 return ::testing::AssertionSuccess(); |
| 21 else |
| 22 return ::testing::AssertionFailure(); |
| 23 } |
| 24 |
| 25 } // namespace net |
OLD | NEW |