| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 // ---------------------------- | 5 // ---------------------------- |
| 6 // Overview of error design | 6 // Overview of error design |
| 7 // ---------------------------- | 7 // ---------------------------- |
| 8 // | 8 // |
| 9 // Certificate path building/validation/parsing may emit a sequence of errors | 9 // Certificate path building/validation/parsing may emit a sequence of errors |
| 10 // and warnings. | 10 // and warnings. |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 // Dumps a textual representation of the errors for debugging purposes. | 107 // Dumps a textual representation of the errors for debugging purposes. |
| 108 std::string ToDebugString() const; | 108 std::string ToDebugString() const; |
| 109 | 109 |
| 110 // Returns true if the error |id| was added to this CertErrors (of any | 110 // Returns true if the error |id| was added to this CertErrors (of any |
| 111 // severity). | 111 // severity). |
| 112 bool ContainsError(CertErrorId id) const; | 112 bool ContainsError(CertErrorId id) const; |
| 113 | 113 |
| 114 // Returns true if this contains any errors of the given severity level. | 114 // Returns true if this contains any errors of the given severity level. |
| 115 bool ContainsAnyErrorWithSeverity(CertError::Severity severity) const; | 115 bool ContainsAnyErrorWithSeverity(CertError::Severity severity) const; |
| 116 | 116 |
| 117 const std::vector<CertError>& nodes() const { return nodes_; } |
| 118 |
| 117 private: | 119 private: |
| 118 std::vector<CertError> nodes_; | 120 std::vector<CertError> nodes_; |
| 119 }; | 121 }; |
| 120 | 122 |
| 121 // CertPathErrors is a collection of CertErrors, to group errors into different | 123 // CertPathErrors is a collection of CertErrors, to group errors into different |
| 122 // buckets for different certificates. The "index" should correspond with that | 124 // buckets for different certificates. The "index" should correspond with that |
| 123 // of the certificate relative to its chain. | 125 // of the certificate relative to its chain. |
| 124 class NET_EXPORT CertPathErrors { | 126 class NET_EXPORT CertPathErrors { |
| 125 public: | 127 public: |
| 126 CertPathErrors(); | 128 CertPathErrors(); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 155 std::string ToDebugString(const ParsedCertificateList& certs) const; | 157 std::string ToDebugString(const ParsedCertificateList& certs) const; |
| 156 | 158 |
| 157 private: | 159 private: |
| 158 std::vector<CertErrors> cert_errors_; | 160 std::vector<CertErrors> cert_errors_; |
| 159 CertErrors other_errors_; | 161 CertErrors other_errors_; |
| 160 }; | 162 }; |
| 161 | 163 |
| 162 } // namespace net | 164 } // namespace net |
| 163 | 165 |
| 164 #endif // NET_CERT_INTERNAL_CERT_ERRORS_H_ | 166 #endif // NET_CERT_INTERNAL_CERT_ERRORS_H_ |
| OLD | NEW |