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.
5 #include "net/test/channel_id_test_util.h"
9 #include "crypto/ec_private_key.h"
10 #include "testing/gtest/include/gtest/gtest.h"
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();
22 return ::testing::AssertionFailure();