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

Side by Side Diff: chrome/browser/io_thread.cc

Issue 337603003: Certificate Transparency: Switch to using a generated CT log list (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing final nit Created 6 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 | « no previous file | net/cert/ct_known_logs.h » ('j') | net/cert/ct_known_logs_static.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/io_thread.h" 5 #include "chrome/browser/io_thread.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 #endif 552 #endif
553 553
554 globals_->transport_security_state.reset(new net::TransportSecurityState()); 554 globals_->transport_security_state.reset(new net::TransportSecurityState());
555 #if !defined(USE_OPENSSL) 555 #if !defined(USE_OPENSSL)
556 // For now, Certificate Transparency is only implemented for platforms 556 // For now, Certificate Transparency is only implemented for platforms
557 // that use NSS. 557 // that use NSS.
558 net::MultiLogCTVerifier* ct_verifier = new net::MultiLogCTVerifier(); 558 net::MultiLogCTVerifier* ct_verifier = new net::MultiLogCTVerifier();
559 globals_->cert_transparency_verifier.reset(ct_verifier); 559 globals_->cert_transparency_verifier.reset(ct_verifier);
560 560
561 // Add built-in logs 561 // Add built-in logs
562 ct_verifier->AddLog(net::ct::CreateGooglePilotLogVerifier().Pass()); 562 ct_verifier->AddLogs(net::ct::CreateLogVerifiersForKnownLogs());
563 ct_verifier->AddLog(net::ct::CreateGoogleAviatorLogVerifier().Pass());
564 ct_verifier->AddLog(net::ct::CreateGoogleRocketeerLogVerifier().Pass());
565 563
566 // Add logs from command line 564 // Add logs from command line
567 if (command_line.HasSwitch(switches::kCertificateTransparencyLog)) { 565 if (command_line.HasSwitch(switches::kCertificateTransparencyLog)) {
568 std::string switch_value = command_line.GetSwitchValueASCII( 566 std::string switch_value = command_line.GetSwitchValueASCII(
569 switches::kCertificateTransparencyLog); 567 switches::kCertificateTransparencyLog);
570 std::vector<std::string> logs; 568 std::vector<std::string> logs;
571 base::SplitString(switch_value, ',', &logs); 569 base::SplitString(switch_value, ',', &logs);
572 for (std::vector<std::string>::iterator it = logs.begin(); it != logs.end(); 570 for (std::vector<std::string>::iterator it = logs.begin(); it != logs.end();
573 ++it) { 571 ++it) {
574 const std::string& curr_log = *it; 572 const std::string& curr_log = *it;
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 std::string version_flag = 1211 std::string version_flag =
1214 command_line.GetSwitchValueASCII(switches::kQuicVersion); 1212 command_line.GetSwitchValueASCII(switches::kQuicVersion);
1215 for (size_t i = 0; i < supported_versions.size(); ++i) { 1213 for (size_t i = 0; i < supported_versions.size(); ++i) {
1216 net::QuicVersion version = supported_versions[i]; 1214 net::QuicVersion version = supported_versions[i];
1217 if (net::QuicVersionToString(version) == version_flag) { 1215 if (net::QuicVersionToString(version) == version_flag) {
1218 return version; 1216 return version;
1219 } 1217 }
1220 } 1218 }
1221 return net::QUIC_VERSION_UNSUPPORTED; 1219 return net::QUIC_VERSION_UNSUPPORTED;
1222 } 1220 }
OLDNEW
« no previous file with comments | « no previous file | net/cert/ct_known_logs.h » ('j') | net/cert/ct_known_logs_static.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698