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

Side by Side Diff: net/cert/ct_verify_result.cc

Issue 2225223002: Certificate Transparency: Change CTVerifyResult to have a single list (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
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) {} 17 ev_policy_compliance(ct::EVPolicyCompliance::EV_POLICY_DOES_NOT_APPLY) {}
18 18
19 CTVerifyResult::CTVerifyResult(const CTVerifyResult& other) = default; 19 CTVerifyResult::CTVerifyResult(const CTVerifyResult& other) = default;
20 20
21 CTVerifyResult::~CTVerifyResult() {} 21 CTVerifyResult::~CTVerifyResult() {}
22 22
23 SCTList SCTsMatchingStatus(
24 const SignedCertificateTimestampAndStatusList& sct_and_status_list,
25 SCTVerifyStatus match_status) {
26 SCTList result;
27 for (auto sct_and_status : sct_and_status_list)
estark 2016/08/09 02:43:22 const auto& sct_and_status
Eran Messeri 2016/08/09 08:14:21 Done.
28 if (sct_and_status.status == match_status)
29 result.push_back(sct_and_status.sct);
30
31 return result;
32 }
33
23 } // namespace ct 34 } // namespace ct
24 35
25 } // namespace net 36 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698