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

Side by Side Diff: net/base/ssl_config_service.cc

Issue 6693077: Read and Write SSL3, TLS1 and Cert revocation SSL preferences (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/pref_names.cc ('k') | net/net.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/base/ssl_config_service.h" 5 #include "net/base/ssl_config_service.h"
6
7 #include "net/base/ssl_config_service_defaults.h"
6 #include "net/base/ssl_false_start_blacklist.h" 8 #include "net/base/ssl_false_start_blacklist.h"
7 9
8 #if defined(OS_WIN)
9 #include "net/base/ssl_config_service_win.h"
10 #elif defined(OS_MACOSX)
11 #include "net/base/ssl_config_service_mac.h"
12 #else
13 #include "net/base/ssl_config_service_defaults.h"
14 #endif
15
16 namespace net { 10 namespace net {
17 11
18 SSLConfig::CertAndStatus::CertAndStatus() : cert_status(0) {} 12 SSLConfig::CertAndStatus::CertAndStatus() : cert_status(0) {}
19 13
20 SSLConfig::CertAndStatus::~CertAndStatus() {} 14 SSLConfig::CertAndStatus::~CertAndStatus() {}
21 15
22 SSLConfig::SSLConfig() 16 SSLConfig::SSLConfig()
23 : rev_checking_enabled(true), ssl3_enabled(true), 17 : rev_checking_enabled(true), ssl3_enabled(true),
24 tls1_enabled(true), dnssec_enabled(false), snap_start_enabled(false), 18 tls1_enabled(true), dnssec_enabled(false), snap_start_enabled(false),
25 dns_cert_provenance_checking_enabled(false), 19 dns_cert_provenance_checking_enabled(false),
(...skipping 11 matching lines...) Expand all
37 } 31 }
38 return false; 32 return false;
39 } 33 }
40 34
41 SSLConfigService::SSLConfigService() 35 SSLConfigService::SSLConfigService()
42 : observer_list_(ObserverList<Observer>::NOTIFY_EXISTING_ONLY) { 36 : observer_list_(ObserverList<Observer>::NOTIFY_EXISTING_ONLY) {
43 } 37 }
44 38
45 // static 39 // static
46 SSLConfigService* SSLConfigService::CreateSystemSSLConfigService() { 40 SSLConfigService* SSLConfigService::CreateSystemSSLConfigService() {
47 #if defined(OS_WIN) 41 // TODO(rtenneti): We don't use the system SSL configuration any more.
48 return new SSLConfigServiceWin; 42 // Simplify this code after talking with mattm.
49 #elif defined(OS_MACOSX)
50 return new SSLConfigServiceMac;
51 #else
52 return new SSLConfigServiceDefaults; 43 return new SSLConfigServiceDefaults;
53 #endif
54 } 44 }
55 45
56 // static 46 // static
57 bool SSLConfigService::IsKnownFalseStartIncompatibleServer( 47 bool SSLConfigService::IsKnownFalseStartIncompatibleServer(
58 const std::string& hostname) { 48 const std::string& hostname) {
59 return SSLFalseStartBlacklist::IsMember(hostname.c_str()); 49 return SSLFalseStartBlacklist::IsMember(hostname.c_str());
60 } 50 }
61 51
62 static bool g_dnssec_enabled = false; 52 static bool g_dnssec_enabled = false;
63 static bool g_false_start_enabled = true; 53 static bool g_false_start_enabled = true;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 void SSLConfigService::ProcessConfigUpdate(const SSLConfig& orig_config, 117 void SSLConfigService::ProcessConfigUpdate(const SSLConfig& orig_config,
128 const SSLConfig& new_config) { 118 const SSLConfig& new_config) {
129 if (orig_config.rev_checking_enabled != new_config.rev_checking_enabled || 119 if (orig_config.rev_checking_enabled != new_config.rev_checking_enabled ||
130 orig_config.ssl3_enabled != new_config.ssl3_enabled || 120 orig_config.ssl3_enabled != new_config.ssl3_enabled ||
131 orig_config.tls1_enabled != new_config.tls1_enabled) { 121 orig_config.tls1_enabled != new_config.tls1_enabled) {
132 FOR_EACH_OBSERVER(Observer, observer_list_, OnSSLConfigChanged()); 122 FOR_EACH_OBSERVER(Observer, observer_list_, OnSSLConfigChanged());
133 } 123 }
134 } 124 }
135 125
136 } // namespace net 126 } // namespace net
OLDNEW
« no previous file with comments | « chrome/common/pref_names.cc ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698