| 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 "base/pickle.h" |
| 8 #include "base/stl_util.h" |
| 8 #include "net/cert/cert_status_flags.h" | 9 #include "net/cert/cert_status_flags.h" |
| 9 #include "net/cert/ct_policy_status.h" | 10 #include "net/cert/ct_policy_status.h" |
| 10 #include "net/cert/signed_certificate_timestamp.h" | 11 #include "net/cert/signed_certificate_timestamp.h" |
| 11 #include "net/cert/x509_certificate.h" | 12 #include "net/cert/x509_certificate.h" |
| 12 #include "net/ssl/ssl_connection_status_flags.h" | 13 #include "net/ssl/ssl_connection_status_flags.h" |
| 13 #include "third_party/boringssl/src/include/openssl/ssl.h" | 14 #include "third_party/boringssl/src/include/openssl/ssl.h" |
| 14 | 15 |
| 15 namespace net { | 16 namespace net { |
| 16 | 17 |
| 17 SSLInfo::SSLInfo() { | 18 SSLInfo::SSLInfo() { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 security_bits = -1; | 57 security_bits = -1; |
| 57 key_exchange_group = 0; | 58 key_exchange_group = 0; |
| 58 connection_status = 0; | 59 connection_status = 0; |
| 59 is_issued_by_known_root = false; | 60 is_issued_by_known_root = false; |
| 60 pkp_bypassed = false; | 61 pkp_bypassed = false; |
| 61 client_cert_sent = false; | 62 client_cert_sent = false; |
| 62 channel_id_sent = false; | 63 channel_id_sent = false; |
| 63 token_binding_negotiated = false; | 64 token_binding_negotiated = false; |
| 64 token_binding_key_param = TB_PARAM_ECDSAP256; | 65 token_binding_key_param = TB_PARAM_ECDSAP256; |
| 65 handshake_type = HANDSHAKE_UNKNOWN; | 66 handshake_type = HANDSHAKE_UNKNOWN; |
| 66 public_key_hashes.clear(); | 67 base::STLClearObject(&public_key_hashes); |
| 67 pinning_failure_log.clear(); | 68 base::STLClearObject(&pinning_failure_log); |
| 68 signed_certificate_timestamps.clear(); | 69 base::STLClearObject(&signed_certificate_timestamps); |
| 69 ct_compliance_details_available = false; | 70 ct_compliance_details_available = false; |
| 70 ct_ev_policy_compliance = ct::EVPolicyCompliance::EV_POLICY_DOES_NOT_APPLY; | 71 ct_ev_policy_compliance = ct::EVPolicyCompliance::EV_POLICY_DOES_NOT_APPLY; |
| 71 ct_cert_policy_compliance = | 72 ct_cert_policy_compliance = |
| 72 ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS; | 73 ct::CertPolicyCompliance::CERT_POLICY_COMPLIES_VIA_SCTS; |
| 73 ocsp_result = OCSPVerifyResult(); | 74 ocsp_result = OCSPVerifyResult(); |
| 74 } | 75 } |
| 75 | 76 |
| 76 void SSLInfo::SetCertError(int error) { | 77 void SSLInfo::SetCertError(int error) { |
| 77 cert_status |= MapNetErrorToCertStatus(error); | 78 cert_status |= MapNetErrorToCertStatus(error); |
| 78 } | 79 } |
| 79 | 80 |
| 80 void SSLInfo::UpdateCertificateTransparencyInfo( | 81 void SSLInfo::UpdateCertificateTransparencyInfo( |
| 81 const ct::CTVerifyResult& ct_verify_result) { | 82 const ct::CTVerifyResult& ct_verify_result) { |
| 82 signed_certificate_timestamps.insert(signed_certificate_timestamps.end(), | 83 signed_certificate_timestamps.insert(signed_certificate_timestamps.end(), |
| 83 ct_verify_result.scts.begin(), | 84 ct_verify_result.scts.begin(), |
| 84 ct_verify_result.scts.end()); | 85 ct_verify_result.scts.end()); |
| 85 | 86 |
| 86 ct_compliance_details_available = ct_verify_result.ct_policies_applied; | 87 ct_compliance_details_available = ct_verify_result.ct_policies_applied; |
| 87 ct_cert_policy_compliance = ct_verify_result.cert_policy_compliance; | 88 ct_cert_policy_compliance = ct_verify_result.cert_policy_compliance; |
| 88 ct_ev_policy_compliance = ct_verify_result.ev_policy_compliance; | 89 ct_ev_policy_compliance = ct_verify_result.ev_policy_compliance; |
| 89 } | 90 } |
| 90 | 91 |
| 91 } // namespace net | 92 } // namespace net |
| OLD | NEW |