Chromium Code Reviews| 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 "base/pickle.h" | |
| 7 #include "net/cert/cert_status_flags.h" | 8 #include "net/cert/cert_status_flags.h" |
| 9 #include "net/cert/signed_certificate_timestamp.h" | |
| 8 #include "net/cert/x509_certificate.h" | 10 #include "net/cert/x509_certificate.h" |
| 9 | 11 |
| 10 namespace net { | 12 namespace net { |
| 11 | 13 |
| 12 SSLInfo::SSLInfo() { | 14 SSLInfo::SSLInfo() { |
| 13 Reset(); | 15 Reset(); |
| 14 } | 16 } |
| 15 | 17 |
| 16 SSLInfo::SSLInfo(const SSLInfo& info) { | 18 SSLInfo::SSLInfo(const SSLInfo& info) { |
| 17 *this = info; | 19 *this = info; |
| 18 } | 20 } |
| 19 | 21 |
| 20 SSLInfo::~SSLInfo() { | 22 SSLInfo::~SSLInfo() { |
| 21 } | 23 } |
| 22 | 24 |
| 23 SSLInfo& SSLInfo::operator=(const SSLInfo& info) { | 25 SSLInfo& SSLInfo::operator=(const SSLInfo& info) { |
| 24 cert = info.cert; | 26 cert = info.cert; |
| 27 signed_certificate_timestamps = info.signed_certificate_timestamps; | |
|
wtc
2013/11/28 01:28:02
Nit: move this to the end of the function, after p
alcutter
2013/11/28 12:08:19
Done.
| |
| 25 cert_status = info.cert_status; | 28 cert_status = info.cert_status; |
| 26 security_bits = info.security_bits; | 29 security_bits = info.security_bits; |
| 27 connection_status = info.connection_status; | 30 connection_status = info.connection_status; |
| 28 is_issued_by_known_root = info.is_issued_by_known_root; | 31 is_issued_by_known_root = info.is_issued_by_known_root; |
| 29 client_cert_sent = info.client_cert_sent; | 32 client_cert_sent = info.client_cert_sent; |
| 30 channel_id_sent = info.channel_id_sent; | 33 channel_id_sent = info.channel_id_sent; |
| 31 handshake_type = info.handshake_type; | 34 handshake_type = info.handshake_type; |
| 32 public_key_hashes = info.public_key_hashes; | 35 public_key_hashes = info.public_key_hashes; |
| 33 | 36 |
| 34 return *this; | 37 return *this; |
| 35 } | 38 } |
| 36 | 39 |
| 37 void SSLInfo::Reset() { | 40 void SSLInfo::Reset() { |
| 38 cert = NULL; | 41 cert = NULL; |
| 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 | |
| 47 public_key_hashes.clear(); | 49 public_key_hashes.clear(); |
| 50 signed_certificate_timestamps.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 |