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

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

Issue 517083002: Enable Certificate Transparency in the OpenSSL port. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ct-objects-extractor
Patch Set: hopefully fix NaCl build Created 6 years, 3 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/asn1_util.h » ('j') | net/cert/asn1_util.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "components/data_reduction_proxy/browser/data_reduction_proxy_prefs.h" 42 #include "components/data_reduction_proxy/browser/data_reduction_proxy_prefs.h"
43 #include "components/policy/core/common/policy_service.h" 43 #include "components/policy/core/common/policy_service.h"
44 #include "components/variations/variations_associated_data.h" 44 #include "components/variations/variations_associated_data.h"
45 #include "content/public/browser/browser_thread.h" 45 #include "content/public/browser/browser_thread.h"
46 #include "content/public/browser/cookie_store_factory.h" 46 #include "content/public/browser/cookie_store_factory.h"
47 #include "net/base/host_mapping_rules.h" 47 #include "net/base/host_mapping_rules.h"
48 #include "net/base/net_util.h" 48 #include "net/base/net_util.h"
49 #include "net/cert/cert_verifier.h" 49 #include "net/cert/cert_verifier.h"
50 #include "net/cert/cert_verify_proc.h" 50 #include "net/cert/cert_verify_proc.h"
51 #include "net/cert/ct_known_logs.h" 51 #include "net/cert/ct_known_logs.h"
52 #include "net/cert/ct_log_verifier.h"
52 #include "net/cert/ct_verifier.h" 53 #include "net/cert/ct_verifier.h"
54 #include "net/cert/multi_log_ct_verifier.h"
53 #include "net/cert/multi_threaded_cert_verifier.h" 55 #include "net/cert/multi_threaded_cert_verifier.h"
54 #include "net/cookies/cookie_store.h" 56 #include "net/cookies/cookie_store.h"
55 #include "net/dns/host_cache.h" 57 #include "net/dns/host_cache.h"
56 #include "net/dns/host_resolver.h" 58 #include "net/dns/host_resolver.h"
57 #include "net/dns/mapped_host_resolver.h" 59 #include "net/dns/mapped_host_resolver.h"
58 #include "net/ftp/ftp_network_layer.h" 60 #include "net/ftp/ftp_network_layer.h"
59 #include "net/http/http_auth_filter.h" 61 #include "net/http/http_auth_filter.h"
60 #include "net/http/http_auth_handler_factory.h" 62 #include "net/http/http_auth_handler_factory.h"
61 #include "net/http/http_network_layer.h" 63 #include "net/http/http_network_layer.h"
62 #include "net/http/http_server_properties_impl.h" 64 #include "net/http/http_server_properties_impl.h"
(...skipping 18 matching lines...) Expand all
81 #include "url/url_constants.h" 83 #include "url/url_constants.h"
82 84
83 #if defined(ENABLE_CONFIGURATION_POLICY) 85 #if defined(ENABLE_CONFIGURATION_POLICY)
84 #include "policy/policy_constants.h" 86 #include "policy/policy_constants.h"
85 #endif 87 #endif
86 88
87 #if defined(ENABLE_EXTENSIONS) 89 #if defined(ENABLE_EXTENSIONS)
88 #include "chrome/browser/extensions/event_router_forwarder.h" 90 #include "chrome/browser/extensions/event_router_forwarder.h"
89 #endif 91 #endif
90 92
91 #if !defined(USE_OPENSSL)
92 #include "net/cert/ct_log_verifier.h"
93 #include "net/cert/multi_log_ct_verifier.h"
94 #endif
95
96 #if defined(USE_NSS) || defined(OS_IOS) 93 #if defined(USE_NSS) || defined(OS_IOS)
97 #include "net/ocsp/nss_ocsp.h" 94 #include "net/ocsp/nss_ocsp.h"
98 #endif 95 #endif
99 96
100 #if defined(SPDY_PROXY_AUTH_ORIGIN) 97 #if defined(SPDY_PROXY_AUTH_ORIGIN)
101 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" 98 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
102 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h" 99 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h"
103 #include "components/data_reduction_proxy/browser/data_reduction_proxy_auth_requ est_handler.h" 100 #include "components/data_reduction_proxy/browser/data_reduction_proxy_auth_requ est_handler.h"
104 #include "components/data_reduction_proxy/browser/data_reduction_proxy_protocol. h" 101 #include "components/data_reduction_proxy/browser/data_reduction_proxy_protocol. h"
105 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) 102 #endif // defined(SPDY_PROXY_AUTH_ORIGIN)
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 UpdateDnsClientEnabled(); 583 UpdateDnsClientEnabled();
587 #if defined(OS_CHROMEOS) 584 #if defined(OS_CHROMEOS)
588 // Creates a CertVerifyProc that doesn't allow any profile-provided certs. 585 // Creates a CertVerifyProc that doesn't allow any profile-provided certs.
589 globals_->cert_verifier.reset(new net::MultiThreadedCertVerifier( 586 globals_->cert_verifier.reset(new net::MultiThreadedCertVerifier(
590 new chromeos::CertVerifyProcChromeOS())); 587 new chromeos::CertVerifyProcChromeOS()));
591 #else 588 #else
592 globals_->cert_verifier.reset(new net::MultiThreadedCertVerifier( 589 globals_->cert_verifier.reset(new net::MultiThreadedCertVerifier(
593 net::CertVerifyProc::CreateDefault())); 590 net::CertVerifyProc::CreateDefault()));
594 #endif 591 #endif
595 592
596 globals_->transport_security_state.reset(new net::TransportSecurityState()); 593 globals_->transport_security_state.reset(new net::TransportSecurityState());
597 #if !defined(USE_OPENSSL) 594
598 // For now, Certificate Transparency is only implemented for platforms
599 // that use NSS.
600 net::MultiLogCTVerifier* ct_verifier = new net::MultiLogCTVerifier(); 595 net::MultiLogCTVerifier* ct_verifier = new net::MultiLogCTVerifier();
601 globals_->cert_transparency_verifier.reset(ct_verifier); 596 globals_->cert_transparency_verifier.reset(ct_verifier);
602 597
603 // Add built-in logs 598 // Add built-in logs
604 ct_verifier->AddLogs(net::ct::CreateLogVerifiersForKnownLogs()); 599 ct_verifier->AddLogs(net::ct::CreateLogVerifiersForKnownLogs());
605 600
606 // Add logs from command line 601 // Add logs from command line
607 if (command_line.HasSwitch(switches::kCertificateTransparencyLog)) { 602 if (command_line.HasSwitch(switches::kCertificateTransparencyLog)) {
608 std::string switch_value = command_line.GetSwitchValueASCII( 603 std::string switch_value = command_line.GetSwitchValueASCII(
609 switches::kCertificateTransparencyLog); 604 switches::kCertificateTransparencyLog);
(...skipping 11 matching lines...) Expand all
621 CHECK(base::Base64Decode(curr_log.substr(delim_pos + 1), 616 CHECK(base::Base64Decode(curr_log.substr(delim_pos + 1),
622 &ct_public_key_data)) 617 &ct_public_key_data))
623 << "Unable to decode CT public key."; 618 << "Unable to decode CT public key.";
624 scoped_ptr<net::CTLogVerifier> external_log_verifier( 619 scoped_ptr<net::CTLogVerifier> external_log_verifier(
625 net::CTLogVerifier::Create(ct_public_key_data, log_description)); 620 net::CTLogVerifier::Create(ct_public_key_data, log_description));
626 CHECK(external_log_verifier) << "Unable to parse CT public key."; 621 CHECK(external_log_verifier) << "Unable to parse CT public key.";
627 VLOG(1) << "Adding log with description " << log_description; 622 VLOG(1) << "Adding log with description " << log_description;
628 ct_verifier->AddLog(external_log_verifier.Pass()); 623 ct_verifier->AddLog(external_log_verifier.Pass());
629 } 624 }
630 } 625 }
631 #else 626
632 if (command_line.HasSwitch(switches::kCertificateTransparencyLog)) {
633 LOG(DFATAL) << "Certificate Transparency is not yet supported in Chrome "
634 "builds using OpenSSL.";
635 }
636 #endif
637 globals_->ssl_config_service = GetSSLConfigService(); 627 globals_->ssl_config_service = GetSSLConfigService();
638 628
639 #if defined(SPDY_PROXY_AUTH_ORIGIN) 629 #if defined(SPDY_PROXY_AUTH_ORIGIN)
640 int drp_flags = 0; 630 int drp_flags = 0;
641 if (data_reduction_proxy::DataReductionProxyParams:: 631 if (data_reduction_proxy::DataReductionProxyParams::
642 IsIncludedInFieldTrial()) { 632 IsIncludedInFieldTrial()) {
643 drp_flags |= 633 drp_flags |=
644 (data_reduction_proxy::DataReductionProxyParams::kAllowed | 634 (data_reduction_proxy::DataReductionProxyParams::kAllowed |
645 data_reduction_proxy::DataReductionProxyParams::kFallbackAllowed); 635 data_reduction_proxy::DataReductionProxyParams::kFallbackAllowed);
646 } 636 }
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); 1382 net::QuicVersionVector supported_versions = net::QuicSupportedVersions();
1393 for (size_t i = 0; i < supported_versions.size(); ++i) { 1383 for (size_t i = 0; i < supported_versions.size(); ++i) {
1394 net::QuicVersion version = supported_versions[i]; 1384 net::QuicVersion version = supported_versions[i];
1395 if (net::QuicVersionToString(version) == quic_version) { 1385 if (net::QuicVersionToString(version) == quic_version) {
1396 return version; 1386 return version;
1397 } 1387 }
1398 } 1388 }
1399 1389
1400 return net::QUIC_VERSION_UNSUPPORTED; 1390 return net::QUIC_VERSION_UNSUPPORTED;
1401 } 1391 }
OLDNEW
« no previous file with comments | « no previous file | net/cert/asn1_util.h » ('j') | net/cert/asn1_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698