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