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 #include "components/ssl_config/ssl_config_service_manager.h" | 4 #include "components/ssl_config/ssl_config_service_manager.h" |
5 | 5 |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // Returns the SSL protocol version (as a uint16_t) represented by a string. | 72 // Returns the SSL protocol version (as a uint16_t) represented by a string. |
73 // Returns 0 if the string is invalid. | 73 // Returns 0 if the string is invalid. |
74 uint16_t SSLProtocolVersionFromString(const std::string& version_str) { | 74 uint16_t SSLProtocolVersionFromString(const std::string& version_str) { |
75 uint16_t version = 0; // Invalid. | 75 uint16_t version = 0; // Invalid. |
76 if (version_str == switches::kSSLVersionTLSv1) { | 76 if (version_str == switches::kSSLVersionTLSv1) { |
77 version = net::SSL_PROTOCOL_VERSION_TLS1; | 77 version = net::SSL_PROTOCOL_VERSION_TLS1; |
78 } else if (version_str == switches::kSSLVersionTLSv11) { | 78 } else if (version_str == switches::kSSLVersionTLSv11) { |
79 version = net::SSL_PROTOCOL_VERSION_TLS1_1; | 79 version = net::SSL_PROTOCOL_VERSION_TLS1_1; |
80 } else if (version_str == switches::kSSLVersionTLSv12) { | 80 } else if (version_str == switches::kSSLVersionTLSv12) { |
81 version = net::SSL_PROTOCOL_VERSION_TLS1_2; | 81 version = net::SSL_PROTOCOL_VERSION_TLS1_2; |
| 82 } else if (version_str == switches::kSSLVersionTLSv13) { |
| 83 version = net::SSL_PROTOCOL_VERSION_TLS1_3; |
82 } | 84 } |
83 return version; | 85 return version; |
84 } | 86 } |
85 | 87 |
86 const base::Feature kDHECiphersFeature{ | 88 const base::Feature kDHECiphersFeature{ |
87 "DHECiphers", base::FEATURE_DISABLED_BY_DEFAULT, | 89 "DHECiphers", base::FEATURE_DISABLED_BY_DEFAULT, |
88 }; | 90 }; |
89 | 91 |
90 } // namespace | 92 } // namespace |
91 | 93 |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 PrefService* local_state, | 310 PrefService* local_state, |
309 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) { | 311 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) { |
310 return new SSLConfigServiceManagerPref(local_state, io_task_runner); | 312 return new SSLConfigServiceManagerPref(local_state, io_task_runner); |
311 } | 313 } |
312 | 314 |
313 // static | 315 // static |
314 void SSLConfigServiceManager::RegisterPrefs(PrefRegistrySimple* registry) { | 316 void SSLConfigServiceManager::RegisterPrefs(PrefRegistrySimple* registry) { |
315 SSLConfigServiceManagerPref::RegisterPrefs(registry); | 317 SSLConfigServiceManagerPref::RegisterPrefs(registry); |
316 } | 318 } |
317 } // namespace ssl_config | 319 } // namespace ssl_config |
OLD | NEW |