summaryrefslogtreecommitdiffstats
path: root/net/base/ssl_config_service_win.cc
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-14 20:10:01 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-14 20:10:01 +0000
commitb626bdc2f6a057e25550b40c3986abdb5903410c (patch)
treed429be826a76a58ebabc1ddb707b35c61d804e1a /net/base/ssl_config_service_win.cc
parentce258c92a8cb8183105d05a6f8d8b8b48614eabf (diff)
downloadchromium_src-b626bdc2f6a057e25550b40c3986abdb5903410c.zip
chromium_src-b626bdc2f6a057e25550b40c3986abdb5903410c.tar.gz
chromium_src-b626bdc2f6a057e25550b40c3986abdb5903410c.tar.bz2
Add the "Use SSL 3.0" and "Use TLS 1.0" checkboxes to
the Options menu ("Under the Hood" tab) on Windows. R=mattm BUG=59125 TEST=net_unittests.exe --gtest_filter=SSLConfigServiceWinTest.SetTest. Manually verify the Options menu has the two new checkboxes. Review URL: http://codereview.chromium.org/3779003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62634 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/ssl_config_service_win.cc')
-rw-r--r--net/base/ssl_config_service_win.cc21
1 files changed, 18 insertions, 3 deletions
diff --git a/net/base/ssl_config_service_win.cc b/net/base/ssl_config_service_win.cc
index 4b289dd..82f44bf 100644
--- a/net/base/ssl_config_service_win.cc
+++ b/net/base/ssl_config_service_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -92,15 +92,30 @@ void SSLConfigServiceWin::SetRevCheckingEnabled(bool enabled) {
// static
void SSLConfigServiceWin::SetSSL2Enabled(bool enabled) {
+ SetSSLVersionEnabled(SSL2, enabled);
+}
+
+// static
+void SSLConfigServiceWin::SetSSL3Enabled(bool enabled) {
+ SetSSLVersionEnabled(SSL3, enabled);
+}
+
+// static
+void SSLConfigServiceWin::SetTLS1Enabled(bool enabled) {
+ SetSSLVersionEnabled(TLS1, enabled);
+}
+
+// static
+void SSLConfigServiceWin::SetSSLVersionEnabled(int version, bool enabled) {
RegKey internet_settings(HKEY_CURRENT_USER, kInternetSettingsSubKeyName,
KEY_READ | KEY_WRITE);
DWORD value;
if (!internet_settings.ReadValueDW(kProtocolsValueName, &value))
value = PROTOCOLS_DEFAULT;
if (enabled)
- value |= SSL2;
+ value |= version;
else
- value &= ~SSL2;
+ value &= ~version;
internet_settings.WriteValue(kProtocolsValueName, value);
// TODO(mattm): We should call UpdateConfig after updating settings, but these
// methods are static.