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

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) 2010 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 // We don't use the system SSL configuration any more. We will be getting rid
48 return new SSLConfigServiceWin; 42 // of CreateSystemSSLConfigService real soon and we will simplify the code
49 #elif defined(OS_MACOSX) 43 // further.
wtc 2011/04/06 00:33:28 Please omit the second sentence, which promises "r
ramant (doing other things) 2011/04/06 01:30:03 Done.
50 return new SSLConfigServiceMac;
51 #else
52 return new SSLConfigServiceDefaults; 44 return new SSLConfigServiceDefaults;
53 #endif
54 } 45 }
55 46
56 // static 47 // static
57 bool SSLConfigService::IsKnownStrictTLSServer(const std::string& hostname) { 48 bool SSLConfigService::IsKnownStrictTLSServer(const std::string& hostname) {
58 // If you wish to add an entry to this list, please contact agl AT chromium 49 // If you wish to add an entry to this list, please contact agl AT chromium
59 // DOT org. 50 // DOT org.
60 // 51 //
61 // If this list starts growing, it'll need to be something more efficient 52 // If this list starts growing, it'll need to be something more efficient
62 // than a linear list. 53 // than a linear list.
63 static const char kStrictServers[][22] = { 54 static const char kStrictServers[][22] = {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 void SSLConfigService::ProcessConfigUpdate(const SSLConfig& orig_config, 160 void SSLConfigService::ProcessConfigUpdate(const SSLConfig& orig_config,
170 const SSLConfig& new_config) { 161 const SSLConfig& new_config) {
171 if (orig_config.rev_checking_enabled != new_config.rev_checking_enabled || 162 if (orig_config.rev_checking_enabled != new_config.rev_checking_enabled ||
172 orig_config.ssl3_enabled != new_config.ssl3_enabled || 163 orig_config.ssl3_enabled != new_config.ssl3_enabled ||
173 orig_config.tls1_enabled != new_config.tls1_enabled) { 164 orig_config.tls1_enabled != new_config.tls1_enabled) {
174 FOR_EACH_OBSERVER(Observer, observer_list_, OnSSLConfigChanged()); 165 FOR_EACH_OBSERVER(Observer, observer_list_, OnSSLConfigChanged());
175 } 166 }
176 } 167 }
177 168
178 } // namespace net 169 } // 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