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

Side by Side Diff: net/test/channel_id_test_util.cc

Issue 1076063002: Remove certificates from Channel ID (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Udpate KeysEqual to fail if preconditions fail Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « net/test/channel_id_test_util.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « net/test/channel_id_test_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698