| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/cert/ct_verify_result.h" | 5 #include "net/cert/ct_verify_result.h" |
| 6 | 6 |
| 7 #include "net/cert/ct_policy_status.h" | 7 #include "net/cert/ct_policy_status.h" |
| 8 | 8 |
| 9 namespace net { | 9 namespace net { |
| 10 | 10 |
| 11 namespace ct { | 11 namespace ct { |
| 12 | 12 |
| 13 CTVerifyResult::CTVerifyResult() | 13 CTVerifyResult::CTVerifyResult() |
| 14 : ct_policies_applied(false), | 14 : ct_policies_applied(false), |
| 15 cert_policy_compliance( | 15 cert_policy_compliance( |
| 16 ct::CertPolicyCompliance::CERT_POLICY_NOT_ENOUGH_SCTS), | 16 ct::CertPolicyCompliance::CERT_POLICY_NOT_ENOUGH_SCTS) {} |
| 17 ev_policy_compliance(ct::EVPolicyCompliance::EV_POLICY_DOES_NOT_APPLY) {} | |
| 18 | 17 |
| 19 CTVerifyResult::CTVerifyResult(const CTVerifyResult& other) = default; | 18 CTVerifyResult::CTVerifyResult(const CTVerifyResult& other) = default; |
| 20 | 19 |
| 21 CTVerifyResult::~CTVerifyResult() {} | 20 CTVerifyResult::~CTVerifyResult() {} |
| 22 | 21 |
| 23 SCTList SCTsMatchingStatus( | 22 SCTList SCTsMatchingStatus( |
| 24 const SignedCertificateTimestampAndStatusList& sct_and_status_list, | 23 const SignedCertificateTimestampAndStatusList& sct_and_status_list, |
| 25 SCTVerifyStatus match_status) { | 24 SCTVerifyStatus match_status) { |
| 26 SCTList result; | 25 SCTList result; |
| 27 for (const auto& sct_and_status : sct_and_status_list) | 26 for (const auto& sct_and_status : sct_and_status_list) |
| 28 if (sct_and_status.status == match_status) | 27 if (sct_and_status.status == match_status) |
| 29 result.push_back(sct_and_status.sct); | 28 result.push_back(sct_and_status.sct); |
| 30 | 29 |
| 31 return result; | 30 return result; |
| 32 } | 31 } |
| 33 | 32 |
| 34 } // namespace ct | 33 } // namespace ct |
| 35 | 34 |
| 36 } // namespace net | 35 } // namespace net |
| OLD | NEW |