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

Side by Side Diff: net/cert/ct_known_logs_unittest.cc

Issue 2015493002: Mark the Izenpe log as Disqualified (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review feedback Created 4 years, 6 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/cert/ct_known_logs_static-inc.h ('k') | net/net.gypi » ('j') | 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 2016 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 <stddef.h>
6 #include <stdint.h>
7 #include <string.h>
8
9 #include <algorithm>
10
11 #include "base/time/time.h"
12 #include "crypto/sha2.h"
13 #include "testing/gtest/include/gtest/gtest.h"
14
15 namespace net {
16
17 namespace {
18
19 #include "net/cert/ct_known_logs_static-inc.h"
20
21 } // namespace
22
23 TEST(CTKnownLogsTest, GoogleIDsAreSorted) {
24 ASSERT_TRUE(std::is_sorted(std::begin(kGoogleLogIDs), std::end(kGoogleLogIDs),
25 [](const char* a, const char* b) {
26 return memcmp(a, b, crypto::kSHA256Length) < 0;
27 }));
28 }
29
30 TEST(CTKnownLogsTest, DisallowedLogsAreSortedByLogID) {
31 ASSERT_TRUE(std::is_sorted(
32 std::begin(kDisqualifiedCTLogList), std::end(kDisqualifiedCTLogList),
33 [](const DisqualifiedCTLogInfo& a, const DisqualifiedCTLogInfo& b) {
34 return memcmp(a.log_id, b.log_id, crypto::kSHA256Length) < 0;
35 }));
36 }
37
38 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/ct_known_logs_static-inc.h ('k') | net/net.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698