| OLD | NEW |
| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "net/base/net_util.h" | 10 #include "net/base/net_util.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 class TLS10SSLConfigService : public SSLConfigService { | 27 class TLS10SSLConfigService : public SSLConfigService { |
| 28 public: | 28 public: |
| 29 TLS10SSLConfigService() { | 29 TLS10SSLConfigService() { |
| 30 ssl_config_.version_min = SSL_PROTOCOL_VERSION_SSL3; | 30 ssl_config_.version_min = SSL_PROTOCOL_VERSION_SSL3; |
| 31 ssl_config_.version_max = SSL_PROTOCOL_VERSION_TLS1; | 31 ssl_config_.version_max = SSL_PROTOCOL_VERSION_TLS1; |
| 32 } | 32 } |
| 33 | 33 |
| 34 virtual void GetSSLConfig(SSLConfig* config) OVERRIDE { | 34 virtual void GetSSLConfig(SSLConfig* config) override { |
| 35 *config = ssl_config_; | 35 *config = ssl_config_; |
| 36 } | 36 } |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 virtual ~TLS10SSLConfigService() {} | 39 virtual ~TLS10SSLConfigService() {} |
| 40 | 40 |
| 41 SSLConfig ssl_config_; | 41 SSLConfig ssl_config_; |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 class TLS11SSLConfigService : public SSLConfigService { | 44 class TLS11SSLConfigService : public SSLConfigService { |
| 45 public: | 45 public: |
| 46 TLS11SSLConfigService() { | 46 TLS11SSLConfigService() { |
| 47 ssl_config_.version_min = SSL_PROTOCOL_VERSION_SSL3; | 47 ssl_config_.version_min = SSL_PROTOCOL_VERSION_SSL3; |
| 48 ssl_config_.version_max = SSL_PROTOCOL_VERSION_TLS1_1; | 48 ssl_config_.version_max = SSL_PROTOCOL_VERSION_TLS1_1; |
| 49 } | 49 } |
| 50 | 50 |
| 51 virtual void GetSSLConfig(SSLConfig* config) OVERRIDE { | 51 virtual void GetSSLConfig(SSLConfig* config) override { |
| 52 *config = ssl_config_; | 52 *config = ssl_config_; |
| 53 } | 53 } |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 virtual ~TLS11SSLConfigService() {} | 56 virtual ~TLS11SSLConfigService() {} |
| 57 | 57 |
| 58 SSLConfig ssl_config_; | 58 SSLConfig ssl_config_; |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 } // namespace | 61 } // namespace |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 EXPECT_EQ(3u, mock_data.next_index()); | 149 EXPECT_EQ(3u, mock_data.next_index()); |
| 150 | 150 |
| 151 SSLConfig& ssl_config = GetServerSSLConfig(trans.get()); | 151 SSLConfig& ssl_config = GetServerSSLConfig(trans.get()); |
| 152 // |version_max| fallbacks to SSL 3.0. | 152 // |version_max| fallbacks to SSL 3.0. |
| 153 EXPECT_EQ(SSL_PROTOCOL_VERSION_SSL3, ssl_config.version_max); | 153 EXPECT_EQ(SSL_PROTOCOL_VERSION_SSL3, ssl_config.version_max); |
| 154 EXPECT_TRUE(ssl_config.version_fallback); | 154 EXPECT_TRUE(ssl_config.version_fallback); |
| 155 } | 155 } |
| 156 | 156 |
| 157 } // namespace net | 157 } // namespace net |
| 158 | 158 |
| OLD | NEW |