| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_win.h" | 5 #include "net/base/ssl_config_service_win.h" |
| 6 | 6 |
| 7 #include "base/thread_restrictions.h" | 7 #include "base/thread_restrictions.h" |
| 8 #include "base/win/registry.h" | 8 #include "base/win/registry.h" |
| 9 | 9 |
| 10 using base::TimeDelta; | 10 using base::TimeDelta; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 DWORD protocols; | 75 DWORD protocols; |
| 76 if (!internet_settings.ReadValueDW(kProtocolsValueName, &protocols)) | 76 if (!internet_settings.ReadValueDW(kProtocolsValueName, &protocols)) |
| 77 protocols = PROTOCOLS_DEFAULT; | 77 protocols = PROTOCOLS_DEFAULT; |
| 78 | 78 |
| 79 config->rev_checking_enabled = (revocation != 0); | 79 config->rev_checking_enabled = (revocation != 0); |
| 80 config->ssl2_enabled = ((protocols & SSL2) != 0); | 80 config->ssl2_enabled = ((protocols & SSL2) != 0); |
| 81 config->ssl3_enabled = ((protocols & SSL3) != 0); | 81 config->ssl3_enabled = ((protocols & SSL3) != 0); |
| 82 config->tls1_enabled = ((protocols & TLS1) != 0); | 82 config->tls1_enabled = ((protocols & TLS1) != 0); |
| 83 SSLConfigService::SetSSLConfigFlags(config); | 83 SSLConfigService::SetSSLConfigFlags(config); |
| 84 | 84 |
| 85 // TODO(rsleevi): Possibly respect the registry keys defined in |
| 86 // http://support.microsoft.com/kb/245030 (pre-Vista) or |
| 87 // http://msdn.microsoft.com/en-us/library/bb870930(VS.85).aspx (post-Vista). |
| 88 // Currently, these values are respected implicitly when using |
| 89 // SSLClientSocketWin, but they do not propogate to SSLClientSocketNSS |
| 90 // because we're not currently translating the keys. |
| 91 |
| 85 return true; | 92 return true; |
| 86 } | 93 } |
| 87 | 94 |
| 88 // static | 95 // static |
| 89 void SSLConfigServiceWin::SetRevCheckingEnabled(bool enabled) { | 96 void SSLConfigServiceWin::SetRevCheckingEnabled(bool enabled) { |
| 90 // This registry access goes to disk and will slow down the IO thread. | 97 // This registry access goes to disk and will slow down the IO thread. |
| 91 // http://crbug.com/61455 | 98 // http://crbug.com/61455 |
| 92 DWORD value = enabled; | 99 DWORD value = enabled; |
| 93 RegKey internet_settings(HKEY_CURRENT_USER, kInternetSettingsSubKeyName, | 100 RegKey internet_settings(HKEY_CURRENT_USER, kInternetSettingsSubKeyName, |
| 94 KEY_WRITE); | 101 KEY_WRITE); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 void SSLConfigServiceWin::UpdateConfig(TimeTicks now) { | 140 void SSLConfigServiceWin::UpdateConfig(TimeTicks now) { |
| 134 SSLConfig orig_config = config_info_; | 141 SSLConfig orig_config = config_info_; |
| 135 GetSSLConfigNow(&config_info_); | 142 GetSSLConfigNow(&config_info_); |
| 136 if (ever_updated_) | 143 if (ever_updated_) |
| 137 ProcessConfigUpdate(orig_config, config_info_); | 144 ProcessConfigUpdate(orig_config, config_info_); |
| 138 config_time_ = now; | 145 config_time_ = now; |
| 139 ever_updated_ = true; | 146 ever_updated_ = true; |
| 140 } | 147 } |
| 141 | 148 |
| 142 } // namespace net | 149 } // namespace net |
| OLD | NEW |