OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/public/common/ssl_status.h" | 5 #include "content/public/common/ssl_status.h" |
6 | 6 |
7 #include "net/cert/sct_status_flags.h" | 7 #include "net/cert/sct_status_flags.h" |
8 #include "net/ssl/ssl_info.h" | 8 #include "net/ssl/ssl_info.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 | 11 |
12 SSLStatus::SSLStatus() | 12 SSLStatus::SSLStatus() |
13 : security_style(SECURITY_STYLE_UNKNOWN), | 13 : security_style(SECURITY_STYLE_UNKNOWN), |
14 cert_id(0), | 14 cert_id(0), |
15 cert_status(0), | 15 cert_status(0), |
16 security_bits(-1), | 16 security_bits(-1), |
17 key_exchange_info(0), | 17 key_exchange_group(0), |
18 connection_status(0), | 18 connection_status(0), |
19 content_status(NORMAL_CONTENT), | 19 content_status(NORMAL_CONTENT), |
20 pkp_bypassed(false) {} | 20 pkp_bypassed(false) {} |
21 | 21 |
22 SSLStatus::SSLStatus(SecurityStyle security_style, | 22 SSLStatus::SSLStatus(SecurityStyle security_style, |
23 int cert_id, | 23 int cert_id, |
24 const net::SSLInfo& ssl_info) | 24 const net::SSLInfo& ssl_info) |
25 : security_style(security_style), | 25 : security_style(security_style), |
26 cert_id(cert_id), | 26 cert_id(cert_id), |
27 cert_status(ssl_info.cert_status), | 27 cert_status(ssl_info.cert_status), |
28 security_bits(ssl_info.security_bits), | 28 security_bits(ssl_info.security_bits), |
29 key_exchange_info(ssl_info.key_exchange_info), | 29 key_exchange_group(ssl_info.GetKeyExchangeGroup()), |
30 connection_status(ssl_info.connection_status), | 30 connection_status(ssl_info.connection_status), |
31 content_status(NORMAL_CONTENT), | 31 content_status(NORMAL_CONTENT), |
32 pkp_bypassed(ssl_info.pkp_bypassed) { | 32 pkp_bypassed(ssl_info.pkp_bypassed) { |
33 for (const auto& sct_and_status : ssl_info.signed_certificate_timestamps) { | 33 for (const auto& sct_and_status : ssl_info.signed_certificate_timestamps) { |
34 sct_statuses.push_back(sct_and_status.status); | 34 sct_statuses.push_back(sct_and_status.status); |
35 } | 35 } |
36 } | 36 } |
37 | 37 |
38 SSLStatus::SSLStatus(const SSLStatus& other) = default; | 38 SSLStatus::SSLStatus(const SSLStatus& other) = default; |
39 | 39 |
40 SSLStatus::~SSLStatus() {} | 40 SSLStatus::~SSLStatus() {} |
41 | 41 |
42 } // namespace content | 42 } // namespace content |
OLD | NEW |