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 "net/ssl/ssl_info.h" | 5 #include "net/ssl/ssl_info.h" |
6 | 6 |
7 #include "net/cert/cert_status_flags.h" | 7 #include "net/cert/cert_status_flags.h" |
| 8 #include "net/cert/signed_certificate_timestamp.h" |
8 #include "net/cert/x509_certificate.h" | 9 #include "net/cert/x509_certificate.h" |
9 | 10 |
10 namespace net { | 11 namespace net { |
11 | 12 |
12 SSLInfo::SSLInfo() { | 13 SSLInfo::SSLInfo() { |
13 Reset(); | 14 Reset(); |
14 } | 15 } |
15 | 16 |
16 SSLInfo::SSLInfo(const SSLInfo& info) { | 17 SSLInfo::SSLInfo(const SSLInfo& info) { |
17 *this = info; | 18 *this = info; |
18 } | 19 } |
19 | 20 |
20 SSLInfo::~SSLInfo() { | 21 SSLInfo::~SSLInfo() { |
21 } | 22 } |
22 | 23 |
23 SSLInfo& SSLInfo::operator=(const SSLInfo& info) { | 24 SSLInfo& SSLInfo::operator=(const SSLInfo& info) { |
24 cert = info.cert; | 25 cert = info.cert; |
| 26 scts = info.scts; |
25 cert_status = info.cert_status; | 27 cert_status = info.cert_status; |
26 security_bits = info.security_bits; | 28 security_bits = info.security_bits; |
27 connection_status = info.connection_status; | 29 connection_status = info.connection_status; |
28 is_issued_by_known_root = info.is_issued_by_known_root; | 30 is_issued_by_known_root = info.is_issued_by_known_root; |
29 client_cert_sent = info.client_cert_sent; | 31 client_cert_sent = info.client_cert_sent; |
30 channel_id_sent = info.channel_id_sent; | 32 channel_id_sent = info.channel_id_sent; |
31 handshake_type = info.handshake_type; | 33 handshake_type = info.handshake_type; |
32 public_key_hashes = info.public_key_hashes; | 34 public_key_hashes = info.public_key_hashes; |
33 | 35 |
34 return *this; | 36 return *this; |
35 } | 37 } |
36 | 38 |
37 void SSLInfo::Reset() { | 39 void SSLInfo::Reset() { |
38 cert = NULL; | 40 cert = NULL; |
| 41 scts.clear(); |
39 cert_status = 0; | 42 cert_status = 0; |
40 security_bits = -1; | 43 security_bits = -1; |
41 connection_status = 0; | 44 connection_status = 0; |
42 is_issued_by_known_root = false; | 45 is_issued_by_known_root = false; |
43 client_cert_sent = false; | 46 client_cert_sent = false; |
44 channel_id_sent = false; | 47 channel_id_sent = false; |
45 handshake_type = HANDSHAKE_UNKNOWN; | 48 handshake_type = HANDSHAKE_UNKNOWN; |
46 | 49 |
47 public_key_hashes.clear(); | 50 public_key_hashes.clear(); |
48 } | 51 } |
49 | 52 |
50 void SSLInfo::SetCertError(int error) { | 53 void SSLInfo::SetCertError(int error) { |
51 cert_status |= MapNetErrorToCertStatus(error); | 54 cert_status |= MapNetErrorToCertStatus(error); |
52 } | 55 } |
53 | 56 |
54 } // namespace net | 57 } // namespace net |
OLD | NEW |