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

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

Issue 2937563002: Remove the EV Certs Whitelist (Closed)
Patch Set: Update comment Created 3 years, 6 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
« no previous file with comments | « net/ssl/ssl_info.h ('k') | net/url_request/url_request_unittest.cc » ('j') | 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 "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "net/cert/cert_status_flags.h" 9 #include "net/cert/cert_status_flags.h"
10 #include "net/cert/ct_policy_status.h" 10 #include "net/cert/ct_policy_status.h"
(...skipping 26 matching lines...) Expand all
37 pkp_bypassed = info.pkp_bypassed; 37 pkp_bypassed = info.pkp_bypassed;
38 client_cert_sent = info.client_cert_sent; 38 client_cert_sent = info.client_cert_sent;
39 channel_id_sent = info.channel_id_sent; 39 channel_id_sent = info.channel_id_sent;
40 token_binding_negotiated = info.token_binding_negotiated; 40 token_binding_negotiated = info.token_binding_negotiated;
41 token_binding_key_param = info.token_binding_key_param; 41 token_binding_key_param = info.token_binding_key_param;
42 handshake_type = info.handshake_type; 42 handshake_type = info.handshake_type;
43 public_key_hashes = info.public_key_hashes; 43 public_key_hashes = info.public_key_hashes;
44 pinning_failure_log = info.pinning_failure_log; 44 pinning_failure_log = info.pinning_failure_log;
45 signed_certificate_timestamps = info.signed_certificate_timestamps; 45 signed_certificate_timestamps = info.signed_certificate_timestamps;
46 ct_compliance_details_available = info.ct_compliance_details_available; 46 ct_compliance_details_available = info.ct_compliance_details_available;
47 ct_ev_policy_compliance = info.ct_ev_policy_compliance;
48 ct_cert_policy_compliance = info.ct_cert_policy_compliance; 47 ct_cert_policy_compliance = info.ct_cert_policy_compliance;
49 ocsp_result = info.ocsp_result; 48 ocsp_result = info.ocsp_result;
50 return *this; 49 return *this;
51 } 50 }
52 51
53 void SSLInfo::Reset() { 52 void SSLInfo::Reset() {
54 cert = NULL; 53 cert = NULL;
55 unverified_cert = NULL; 54 unverified_cert = NULL;
56 cert_status = 0; 55 cert_status = 0;
57 security_bits = -1; 56 security_bits = -1;
58 key_exchange_group = 0; 57 key_exchange_group = 0;
59 connection_status = 0; 58 connection_status = 0;
60 is_issued_by_known_root = false; 59 is_issued_by_known_root = false;
61 pkp_bypassed = false; 60 pkp_bypassed = false;
62 client_cert_sent = false; 61 client_cert_sent = false;
63 channel_id_sent = false; 62 channel_id_sent = false;
64 token_binding_negotiated = false; 63 token_binding_negotiated = false;
65 token_binding_key_param = TB_PARAM_ECDSAP256; 64 token_binding_key_param = TB_PARAM_ECDSAP256;
66 handshake_type = HANDSHAKE_UNKNOWN; 65 handshake_type = HANDSHAKE_UNKNOWN;
67 base::STLClearObject(&public_key_hashes); 66 base::STLClearObject(&public_key_hashes);
68 base::STLClearObject(&pinning_failure_log); 67 base::STLClearObject(&pinning_failure_log);
69 base::STLClearObject(&signed_certificate_timestamps); 68 base::STLClearObject(&signed_certificate_timestamps);
70 ct_compliance_details_available = false; 69 ct_compliance_details_available = false;
71 ct_ev_policy_compliance = ct::EVPolicyCompliance::EV_POLICY_DOES_NOT_APPLY;
72 ct_cert_policy_compliance = 70 ct_cert_policy_compliance =
73 ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS; 71 ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS;
74 ocsp_result = OCSPVerifyResult(); 72 ocsp_result = OCSPVerifyResult();
75 } 73 }
76 74
77 void SSLInfo::SetCertError(int error) { 75 void SSLInfo::SetCertError(int error) {
78 cert_status |= MapNetErrorToCertStatus(error); 76 cert_status |= MapNetErrorToCertStatus(error);
79 } 77 }
80 78
81 void SSLInfo::UpdateCertificateTransparencyInfo( 79 void SSLInfo::UpdateCertificateTransparencyInfo(
82 const ct::CTVerifyResult& ct_verify_result) { 80 const ct::CTVerifyResult& ct_verify_result) {
83 signed_certificate_timestamps.insert(signed_certificate_timestamps.end(), 81 signed_certificate_timestamps.insert(signed_certificate_timestamps.end(),
84 ct_verify_result.scts.begin(), 82 ct_verify_result.scts.begin(),
85 ct_verify_result.scts.end()); 83 ct_verify_result.scts.end());
86 84
87 ct_compliance_details_available = ct_verify_result.ct_policies_applied; 85 ct_compliance_details_available = ct_verify_result.ct_policies_applied;
88 ct_cert_policy_compliance = ct_verify_result.cert_policy_compliance; 86 ct_cert_policy_compliance = ct_verify_result.cert_policy_compliance;
89 ct_ev_policy_compliance = ct_verify_result.ev_policy_compliance;
90 } 87 }
91 88
92 } // namespace net 89 } // namespace net
OLDNEW
« no previous file with comments | « net/ssl/ssl_info.h ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698