OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.h" | 5 #include "net/ssl/ssl_config.h" |
6 | 6 |
7 #include "net/cert/cert_verifier.h" | 7 #include "net/cert/cert_verifier.h" |
8 | 8 |
9 namespace net { | 9 namespace net { |
10 | 10 |
11 const uint16_t kDefaultSSLVersionMin = SSL_PROTOCOL_VERSION_TLS1; | 11 const uint16_t kDefaultSSLVersionMin = SSL_PROTOCOL_VERSION_TLS1; |
12 | 12 |
13 const uint16_t kDefaultSSLVersionMax = SSL_PROTOCOL_VERSION_TLS1_2; | 13 const uint16_t kDefaultSSLVersionMax = SSL_PROTOCOL_VERSION_TLS1_2; |
14 | 14 |
15 SSLConfig::CertAndStatus::CertAndStatus() = default; | 15 SSLConfig::CertAndStatus::CertAndStatus() = default; |
16 SSLConfig::CertAndStatus::CertAndStatus(scoped_refptr<X509Certificate> cert_arg, | 16 SSLConfig::CertAndStatus::CertAndStatus(scoped_refptr<X509Certificate> cert_arg, |
17 CertStatus status) | 17 CertStatus status) |
18 : cert(std::move(cert_arg)), cert_status(status) {} | 18 : cert(std::move(cert_arg)), cert_status(status) {} |
19 SSLConfig::CertAndStatus::CertAndStatus(const CertAndStatus& other) | 19 SSLConfig::CertAndStatus::CertAndStatus(const CertAndStatus& other) |
20 : cert(other.cert), cert_status(other.cert_status) {} | 20 : cert(other.cert), cert_status(other.cert_status) {} |
21 SSLConfig::CertAndStatus::~CertAndStatus() = default; | 21 SSLConfig::CertAndStatus::~CertAndStatus() = default; |
22 | 22 |
23 SSLConfig::SSLConfig() | 23 SSLConfig::SSLConfig() |
24 : rev_checking_enabled(false), | 24 : rev_checking_enabled(false), |
25 rev_checking_required_local_anchors(false), | 25 rev_checking_required_local_anchors(false), |
26 sha1_local_anchors_enabled(true), | 26 sha1_local_anchors_enabled(true), |
27 version_min(kDefaultSSLVersionMin), | 27 version_min(kDefaultSSLVersionMin), |
28 version_max(kDefaultSSLVersionMax), | 28 version_max(kDefaultSSLVersionMax), |
29 deprecated_cipher_suites_enabled(false), | 29 deprecated_cipher_suites_enabled(false), |
30 dhe_enabled(false), | |
31 channel_id_enabled(true), | 30 channel_id_enabled(true), |
32 false_start_enabled(true), | 31 false_start_enabled(true), |
33 signed_cert_timestamps_enabled(true), | 32 signed_cert_timestamps_enabled(true), |
34 require_ecdhe(false), | 33 require_ecdhe(false), |
35 send_client_cert(false), | 34 send_client_cert(false), |
36 verify_ev_cert(false), | 35 verify_ev_cert(false), |
37 cert_io_enabled(true), | 36 cert_io_enabled(true), |
38 renego_allowed_default(false) {} | 37 renego_allowed_default(false) {} |
39 | 38 |
40 SSLConfig::SSLConfig(const SSLConfig& other) = default; | 39 SSLConfig::SSLConfig(const SSLConfig& other) = default; |
(...skipping 21 matching lines...) Expand all Loading... |
62 if (cert_io_enabled) | 61 if (cert_io_enabled) |
63 flags |= CertVerifier::VERIFY_CERT_IO_ENABLED; | 62 flags |= CertVerifier::VERIFY_CERT_IO_ENABLED; |
64 if (rev_checking_required_local_anchors) | 63 if (rev_checking_required_local_anchors) |
65 flags |= CertVerifier::VERIFY_REV_CHECKING_REQUIRED_LOCAL_ANCHORS; | 64 flags |= CertVerifier::VERIFY_REV_CHECKING_REQUIRED_LOCAL_ANCHORS; |
66 if (sha1_local_anchors_enabled) | 65 if (sha1_local_anchors_enabled) |
67 flags |= CertVerifier::VERIFY_ENABLE_SHA1_LOCAL_ANCHORS; | 66 flags |= CertVerifier::VERIFY_ENABLE_SHA1_LOCAL_ANCHORS; |
68 return flags; | 67 return flags; |
69 } | 68 } |
70 | 69 |
71 } // namespace net | 70 } // namespace net |
OLD | NEW |