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

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

Issue 3845005: Add support for restricting the cipher suites that SSLClientSocket(Mac,NSS) use (Closed)
Patch Set: Upload before commit Created 10 years, 1 month 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_mac.h" 5 #include "net/base/ssl_config_service_mac.h"
6 6
7 #include <CoreFoundation/CoreFoundation.h> 7 #include <CoreFoundation/CoreFoundation.h>
8 8
9 #include "base/mac/scoped_cftyperef.h" 9 #include "base/mac/scoped_cftyperef.h"
10 10
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 RevocationStyleIsEnabled(kCRLStyleKey)); 90 RevocationStyleIsEnabled(kCRLStyleKey));
91 91
92 config->ssl2_enabled = SSLVersionIsEnabled(kSSL2EnabledKey, 92 config->ssl2_enabled = SSLVersionIsEnabled(kSSL2EnabledKey,
93 kSSL2EnabledDefaultValue); 93 kSSL2EnabledDefaultValue);
94 config->ssl3_enabled = SSLVersionIsEnabled(kSSL3EnabledKey, 94 config->ssl3_enabled = SSLVersionIsEnabled(kSSL3EnabledKey,
95 kSSL3EnabledDefaultValue); 95 kSSL3EnabledDefaultValue);
96 config->tls1_enabled = SSLVersionIsEnabled(kTLS1EnabledKey, 96 config->tls1_enabled = SSLVersionIsEnabled(kTLS1EnabledKey,
97 kTLS1EnabledDefaultValue); 97 kTLS1EnabledDefaultValue);
98 SSLConfigService::SetSSLConfigFlags(config); 98 SSLConfigService::SetSSLConfigFlags(config);
99 99
100 // TODO(rsleevi): http://crbug.com/58831 - Implement preferences for
101 // disabling cipher suites.
100 return true; 102 return true;
101 } 103 }
102 104
103 // static 105 // static
104 void SSLConfigServiceMac::SetSSL2Enabled(bool enabled) { 106 void SSLConfigServiceMac::SetSSL2Enabled(bool enabled) {
105 CFPreferencesSetAppValue(kSSL2EnabledKey, 107 CFPreferencesSetAppValue(kSSL2EnabledKey,
106 enabled ? kCFBooleanTrue : kCFBooleanFalse, 108 enabled ? kCFBooleanTrue : kCFBooleanFalse,
107 kCFPreferencesCurrentApplication); 109 kCFPreferencesCurrentApplication);
108 CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication); 110 CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
109 } 111 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 void SSLConfigServiceMac::UpdateConfig(TimeTicks now) { 144 void SSLConfigServiceMac::UpdateConfig(TimeTicks now) {
143 SSLConfig orig_config = config_info_; 145 SSLConfig orig_config = config_info_;
144 GetSSLConfigNow(&config_info_); 146 GetSSLConfigNow(&config_info_);
145 if (ever_updated_) 147 if (ever_updated_)
146 ProcessConfigUpdate(orig_config, config_info_); 148 ProcessConfigUpdate(orig_config, config_info_);
147 config_time_ = now; 149 config_time_ = now;
148 ever_updated_ = true; 150 ever_updated_ = true;
149 } 151 }
150 152
151 } // namespace net 153 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698