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

Side by Side Diff: trunk/src/net/ssl/ssl_config_service.cc

Issue 17553016: Revert 207759 "Disable TLS 1.2 if USE_OPENSSL is defined (such a..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 6 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 | « no previous file | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ssl/ssl_config_service.h" 5 #include "net/ssl/ssl_config_service.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "net/cert/crl_set.h" 10 #include "net/cert/crl_set.h"
11 #include "net/ssl/ssl_config_service_defaults.h" 11 #include "net/ssl/ssl_config_service_defaults.h"
12 12
13 #if defined(USE_OPENSSL) 13 #if defined(USE_OPENSSL)
14 #include <openssl/ssl.h> 14 #include <openssl/ssl.h>
15 #endif 15 #endif
16 16
17 namespace net { 17 namespace net {
18 18
19 static uint16 g_default_version_min = SSL_PROTOCOL_VERSION_SSL3; 19 static uint16 g_default_version_min = SSL_PROTOCOL_VERSION_SSL3;
20 20
21 static uint16 g_default_version_max = 21 static uint16 g_default_version_max =
22 #if defined(USE_OPENSSL) 22 #if defined(USE_OPENSSL)
23 // TODO(wtc): do not enable TLS 1.2 until we can keep ClientHello under 256 23 #if defined(SSL_OP_NO_TLSv1_2)
24 // bytes. See http://crbug.com/245500 and http://crbug.com/247691. 24 SSL_PROTOCOL_VERSION_TLS1_2;
25 #if defined(SSL_OP_NO_TLSv1_1) 25 #elif defined(SSL_OP_NO_TLSv1_1)
26 SSL_PROTOCOL_VERSION_TLS1_1; 26 SSL_PROTOCOL_VERSION_TLS1_1;
27 #else 27 #else
28 SSL_PROTOCOL_VERSION_TLS1; 28 SSL_PROTOCOL_VERSION_TLS1;
29 #endif 29 #endif
30 #else 30 #else
31 SSL_PROTOCOL_VERSION_TLS1_2; 31 SSL_PROTOCOL_VERSION_TLS1_2;
32 #endif 32 #endif
33 33
34 SSLConfig::CertAndStatus::CertAndStatus() : cert_status(0) {} 34 SSLConfig::CertAndStatus::CertAndStatus() : cert_status(0) {}
35 35
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 bool SSLConfigService::IsSNIAvailable(SSLConfigService* service) { 171 bool SSLConfigService::IsSNIAvailable(SSLConfigService* service) {
172 if (!service) 172 if (!service)
173 return false; 173 return false;
174 174
175 SSLConfig ssl_config; 175 SSLConfig ssl_config;
176 service->GetSSLConfig(&ssl_config); 176 service->GetSSLConfig(&ssl_config);
177 return ssl_config.version_max >= SSL_PROTOCOL_VERSION_TLS1; 177 return ssl_config.version_max >= SSL_PROTOCOL_VERSION_TLS1;
178 } 178 }
179 179
180 } // namespace net 180 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698