| 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 #ifndef NET_CERT_CT_VERIFY_RESULT_H_ | 5 #ifndef NET_CERT_CT_VERIFY_RESULT_H_ |
| 6 #define NET_CERT_CT_VERIFY_RESULT_H_ | 6 #define NET_CERT_CT_VERIFY_RESULT_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "net/base/net_export.h" | 10 #include "net/base/net_export.h" |
| 11 #include "net/cert/ct_policy_enforcer.h" | 11 #include "net/cert/ct_policy_enforcer.h" |
| 12 #include "net/cert/signed_certificate_timestamp_and_status.h" | 12 #include "net/cert/signed_certificate_timestamp_and_status.h" |
| 13 | 13 |
| 14 namespace net { | 14 namespace net { |
| 15 | 15 |
| 16 namespace ct { | 16 namespace ct { |
| 17 | 17 |
| 18 enum class CertPolicyCompliance; | 18 enum class CertPolicyCompliance; |
| 19 enum class EVPolicyCompliance; | |
| 20 | 19 |
| 21 typedef std::vector<scoped_refptr<SignedCertificateTimestamp> > SCTList; | 20 typedef std::vector<scoped_refptr<SignedCertificateTimestamp> > SCTList; |
| 22 | 21 |
| 23 // Holds Signed Certificate Timestamps, depending on their verification | 22 // Holds Signed Certificate Timestamps, depending on their verification |
| 24 // results, and information about CT policies that were applied on the | 23 // results, and information about CT policies that were applied on the |
| 25 // connection. | 24 // connection. |
| 26 struct NET_EXPORT CTVerifyResult { | 25 struct NET_EXPORT CTVerifyResult { |
| 27 CTVerifyResult(); | 26 CTVerifyResult(); |
| 28 CTVerifyResult(const CTVerifyResult& other); | 27 CTVerifyResult(const CTVerifyResult& other); |
| 29 ~CTVerifyResult(); | 28 ~CTVerifyResult(); |
| 30 | 29 |
| 31 // All SCTs and their statuses | 30 // All SCTs and their statuses |
| 32 SignedCertificateTimestampAndStatusList scts; | 31 SignedCertificateTimestampAndStatusList scts; |
| 33 | 32 |
| 34 // True if any CT policies were applied on this connection. | 33 // True if any CT policies were applied on this connection. |
| 35 bool ct_policies_applied; | 34 bool ct_policies_applied; |
| 36 // The result of evaluating whether the connection complies with the | 35 // The result of evaluating whether the connection complies with the |
| 37 // CT certificate policy. | 36 // CT certificate policy. |
| 38 CertPolicyCompliance cert_policy_compliance; | 37 CertPolicyCompliance cert_policy_compliance; |
| 39 // The result of evaluating whether the connection complies with the | |
| 40 // EV CT policy. | |
| 41 EVPolicyCompliance ev_policy_compliance; | |
| 42 }; | 38 }; |
| 43 | 39 |
| 44 // Returns a list of SCTs from |sct_and_status_list| whose status matches | 40 // Returns a list of SCTs from |sct_and_status_list| whose status matches |
| 45 // |match_status|. | 41 // |match_status|. |
| 46 SCTList NET_EXPORT SCTsMatchingStatus( | 42 SCTList NET_EXPORT SCTsMatchingStatus( |
| 47 const SignedCertificateTimestampAndStatusList& sct_and_status_list, | 43 const SignedCertificateTimestampAndStatusList& sct_and_status_list, |
| 48 SCTVerifyStatus match_status); | 44 SCTVerifyStatus match_status); |
| 49 | 45 |
| 50 } // namespace ct | 46 } // namespace ct |
| 51 | 47 |
| 52 } // namespace net | 48 } // namespace net |
| 53 | 49 |
| 54 #endif // NET_CERT_CT_VERIFY_RESULT_H_ | 50 #endif // NET_CERT_CT_VERIFY_RESULT_H_ |
| OLD | NEW |