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 3 // found in the LICENSE file. 4 5 #ifndef NET_CERT_CT_VERIFY_RESULT_H_ 6 #define NET_CERT_CT_VERIFY_RESULT_H_ 7 8 #include <vector> 9 10 #include "net/base/net_export.h" 11 #include "net/cert/signed_certificate_timestamp_and_status.h" 12 13 namespace net { 14 15 namespace ct { 16 17 enum class CTPolicyCompliance; 18 19 // Holds Signed Certificate Timestamps, depending on their verification 20 // results, and information about CT policies that were applied on the 21 // connection. 22 struct NET_EXPORT CTVerifyResult { 23 CTVerifyResult(); 24 CTVerifyResult(const CTVerifyResult& other); 25 ~CTVerifyResult(); 26 27 // All SCTs and their statuses 28 SignedCertificateTimestampAndStatusList scts; 29 30 // The result of evaluating whether the connection complies with the 31 // CT certificate policy. 32 CTPolicyCompliance policy_compliance; 33 // True if the connection was required to comply with the CT certificate 34 // policy. This value is not meaningful if |policy_compliance| is 35 // COMPLIANCE_DETAILS_NOT_AVAILABLE. 36 bool policy_compliance_required; 37 }; 38 39 // Returns a list of SCTs from |sct_and_status_list| whose status matches 40 // |match_status|. 41 SCTList NET_EXPORT SCTsMatchingStatus( 42 const SignedCertificateTimestampAndStatusList& sct_and_status_list, 43 SCTVerifyStatus match_status); 44 45 } // namespace ct 46 47 } // namespace net 48 49 #endif // NET_CERT_CT_VERIFY_RESULT_H_ 50