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

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

Issue 2108833005: Adds domain names for all qualified CT logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | net/cert/ct_known_logs_static-inc.h » ('j') | net/cert/ct_known_logs_static-inc.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/cert/ct_known_logs.h" 5 #include "net/cert/ct_known_logs.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 19 matching lines...) Expand all
30 } // namespace 30 } // namespace
31 31
32 #if !defined(OS_NACL) 32 #if !defined(OS_NACL)
33 std::vector<scoped_refptr<const CTLogVerifier>> 33 std::vector<scoped_refptr<const CTLogVerifier>>
34 CreateLogVerifiersForKnownLogs() { 34 CreateLogVerifiersForKnownLogs() {
35 std::vector<scoped_refptr<const CTLogVerifier>> verifiers; 35 std::vector<scoped_refptr<const CTLogVerifier>> verifiers;
36 36
37 // Add all qualified logs. 37 // Add all qualified logs.
38 for (const auto& log : kCTLogList) { 38 for (const auto& log : kCTLogList) {
39 base::StringPiece key(log.log_key, log.log_key_length); 39 base::StringPiece key(log.log_key, log.log_key_length);
40 verifiers.push_back(CTLogVerifier::Create(key, log.log_name, log.log_url)); 40 verifiers.push_back(
41 CTLogVerifier::Create(key, log.log_name, log.log_url, log.log_domain));
41 // Make sure no null logs enter verifiers. Parsing of all known logs should 42 // Make sure no null logs enter verifiers. Parsing of all known logs should
42 // succeed. 43 // succeed.
43 CHECK(verifiers.back().get()); 44 CHECK(verifiers.back().get());
44 } 45 }
45 46
46 // Add all disqualified logs. Callers are expected to filter verified SCTs 47 // Add all disqualified logs. Callers are expected to filter verified SCTs
47 // via IsLogQualified(). 48 // via IsLogQualified().
48 for (const auto& disqualified_log : kDisqualifiedCTLogList) { 49 for (const auto& disqualified_log : kDisqualifiedCTLogList) {
49 const CTLogInfo& log = disqualified_log.log_info; 50 const CTLogInfo& log = disqualified_log.log_info;
50 base::StringPiece key(log.log_key, log.log_key_length); 51 base::StringPiece key(log.log_key, log.log_key_length);
51 verifiers.push_back(CTLogVerifier::Create(key, log.log_name, log.log_url)); 52 verifiers.push_back(
53 CTLogVerifier::Create(key, log.log_name, log.log_url, log.log_domain));
52 // Make sure no null logs enter verifiers. Parsing of all known logs should 54 // Make sure no null logs enter verifiers. Parsing of all known logs should
53 // succeed. 55 // succeed.
54 CHECK(verifiers.back().get()); 56 CHECK(verifiers.back().get());
55 } 57 }
56 58
57 return verifiers; 59 return verifiers;
58 } 60 }
59 #endif 61 #endif
60 62
61 bool IsLogOperatedByGoogle(base::StringPiece log_id) { 63 bool IsLogOperatedByGoogle(base::StringPiece log_id) {
(...skipping 22 matching lines...) Expand all
84 } 86 }
85 87
86 *disqualification_date = base::Time::UnixEpoch() + p->disqualification_date; 88 *disqualification_date = base::Time::UnixEpoch() + p->disqualification_date;
87 return true; 89 return true;
88 } 90 }
89 91
90 } // namespace ct 92 } // namespace ct
91 93
92 } // namespace net 94 } // namespace net
93 95
OLDNEW
« no previous file with comments | « no previous file | net/cert/ct_known_logs_static-inc.h » ('j') | net/cert/ct_known_logs_static-inc.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698