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/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 { |
(...skipping 12 matching lines...) Expand all Loading... |
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; | 28 is_issued_by_known_root = info.is_issued_by_known_root; |
29 client_cert_sent = info.client_cert_sent; | 29 client_cert_sent = info.client_cert_sent; |
30 channel_id_sent = info.channel_id_sent; | 30 channel_id_sent = info.channel_id_sent; |
31 handshake_type = info.handshake_type; | 31 handshake_type = info.handshake_type; |
32 public_key_hashes = info.public_key_hashes; | 32 public_key_hashes = info.public_key_hashes; |
| 33 |
33 return *this; | 34 return *this; |
34 } | 35 } |
35 | 36 |
36 void SSLInfo::Reset() { | 37 void SSLInfo::Reset() { |
37 cert = NULL; | 38 cert = NULL; |
38 cert_status = 0; | 39 cert_status = 0; |
39 security_bits = -1; | 40 security_bits = -1; |
40 connection_status = 0; | 41 connection_status = 0; |
41 is_issued_by_known_root = false; | 42 is_issued_by_known_root = false; |
42 client_cert_sent = false; | 43 client_cert_sent = false; |
43 channel_id_sent = false; | 44 channel_id_sent = false; |
44 handshake_type = HANDSHAKE_UNKNOWN; | 45 handshake_type = HANDSHAKE_UNKNOWN; |
| 46 |
45 public_key_hashes.clear(); | 47 public_key_hashes.clear(); |
| 48 public_key_hashes.reserve(HASH_VALUE_TAGS_COUNT); |
| 49 HashValueVector sha1s; |
| 50 public_key_hashes.push_back(sha1s); |
| 51 HashValueVector sha256s; |
| 52 public_key_hashes.push_back(sha256s); |
46 } | 53 } |
47 | 54 |
48 void SSLInfo::SetCertError(int error) { | 55 void SSLInfo::SetCertError(int error) { |
49 cert_status |= MapNetErrorToCertStatus(error); | 56 cert_status |= MapNetErrorToCertStatus(error); |
50 } | 57 } |
51 | 58 |
52 } // namespace net | 59 } // namespace net |
OLD | NEW |