Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: net/ssl/ssl_info.cc

Issue 949633002: Include both certificate chains in invalid cert reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a comment to cert logger pb Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« net/ssl/ssl_info.h ('K') | « net/ssl/ssl_info.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/pickle.h"
8 #include "net/cert/cert_status_flags.h" 8 #include "net/cert/cert_status_flags.h"
9 #include "net/cert/signed_certificate_timestamp.h" 9 #include "net/cert/signed_certificate_timestamp.h"
10 #include "net/cert/x509_certificate.h" 10 #include "net/cert/x509_certificate.h"
11 11
12 namespace net { 12 namespace net {
13 13
14 SSLInfo::SSLInfo() { 14 SSLInfo::SSLInfo() {
15 Reset(); 15 Reset();
16 } 16 }
17 17
18 SSLInfo::SSLInfo(const SSLInfo& info) { 18 SSLInfo::SSLInfo(const SSLInfo& info) {
19 *this = info; 19 *this = info;
20 } 20 }
21 21
22 SSLInfo::~SSLInfo() { 22 SSLInfo::~SSLInfo() {
23 } 23 }
24 24
25 SSLInfo& SSLInfo::operator=(const SSLInfo& info) { 25 SSLInfo& SSLInfo::operator=(const SSLInfo& info) {
26 cert = info.cert; 26 cert = info.cert;
27 unverified_server_cert = info.unverified_server_cert;
27 cert_status = info.cert_status; 28 cert_status = info.cert_status;
28 security_bits = info.security_bits; 29 security_bits = info.security_bits;
29 connection_status = info.connection_status; 30 connection_status = info.connection_status;
30 is_issued_by_known_root = info.is_issued_by_known_root; 31 is_issued_by_known_root = info.is_issued_by_known_root;
31 client_cert_sent = info.client_cert_sent; 32 client_cert_sent = info.client_cert_sent;
32 channel_id_sent = info.channel_id_sent; 33 channel_id_sent = info.channel_id_sent;
33 handshake_type = info.handshake_type; 34 handshake_type = info.handshake_type;
34 public_key_hashes = info.public_key_hashes; 35 public_key_hashes = info.public_key_hashes;
35 signed_certificate_timestamps = info.signed_certificate_timestamps; 36 signed_certificate_timestamps = info.signed_certificate_timestamps;
36 pinning_failure_log = info.pinning_failure_log; 37 pinning_failure_log = info.pinning_failure_log;
37 38
38 return *this; 39 return *this;
39 } 40 }
40 41
41 void SSLInfo::Reset() { 42 void SSLInfo::Reset() {
42 cert = NULL; 43 cert = NULL;
44 unverified_server_cert = NULL;
43 cert_status = 0; 45 cert_status = 0;
44 security_bits = -1; 46 security_bits = -1;
45 connection_status = 0; 47 connection_status = 0;
46 is_issued_by_known_root = false; 48 is_issued_by_known_root = false;
47 client_cert_sent = false; 49 client_cert_sent = false;
48 channel_id_sent = false; 50 channel_id_sent = false;
49 handshake_type = HANDSHAKE_UNKNOWN; 51 handshake_type = HANDSHAKE_UNKNOWN;
50 public_key_hashes.clear(); 52 public_key_hashes.clear();
51 signed_certificate_timestamps.clear(); 53 signed_certificate_timestamps.clear();
52 pinning_failure_log.clear(); 54 pinning_failure_log.clear();
53 } 55 }
54 56
55 void SSLInfo::SetCertError(int error) { 57 void SSLInfo::SetCertError(int error) {
56 cert_status |= MapNetErrorToCertStatus(error); 58 cert_status |= MapNetErrorToCertStatus(error);
57 } 59 }
58 60
59 } // namespace net 61 } // namespace net
OLDNEW
« net/ssl/ssl_info.h ('K') | « net/ssl/ssl_info.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698