| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/certificate_reporting/error_report.h" | 5 #include "components/certificate_reporting/error_report.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 COPY_CERT_STATUS(AUTHORITY_INVALID) | 31 COPY_CERT_STATUS(AUTHORITY_INVALID) |
| 32 COPY_CERT_STATUS(COMMON_NAME_INVALID) | 32 COPY_CERT_STATUS(COMMON_NAME_INVALID) |
| 33 COPY_CERT_STATUS(NON_UNIQUE_NAME) | 33 COPY_CERT_STATUS(NON_UNIQUE_NAME) |
| 34 COPY_CERT_STATUS(NAME_CONSTRAINT_VIOLATION) | 34 COPY_CERT_STATUS(NAME_CONSTRAINT_VIOLATION) |
| 35 COPY_CERT_STATUS(WEAK_SIGNATURE_ALGORITHM) | 35 COPY_CERT_STATUS(WEAK_SIGNATURE_ALGORITHM) |
| 36 COPY_CERT_STATUS(WEAK_KEY) | 36 COPY_CERT_STATUS(WEAK_KEY) |
| 37 COPY_CERT_STATUS(DATE_INVALID) | 37 COPY_CERT_STATUS(DATE_INVALID) |
| 38 COPY_CERT_STATUS(VALIDITY_TOO_LONG) | 38 COPY_CERT_STATUS(VALIDITY_TOO_LONG) |
| 39 COPY_CERT_STATUS(UNABLE_TO_CHECK_REVOCATION) | 39 COPY_CERT_STATUS(UNABLE_TO_CHECK_REVOCATION) |
| 40 COPY_CERT_STATUS(NO_REVOCATION_MECHANISM) | 40 COPY_CERT_STATUS(NO_REVOCATION_MECHANISM) |
| 41 RENAME_CERT_STATUS(CERTIFICATE_TRANSPARENCY_REQUIRED, |
| 42 CERTIFICATE_TRANSPARENCY_REQUIRED) |
| 41 | 43 |
| 42 #undef RENAME_CERT_STATUS | 44 #undef RENAME_CERT_STATUS |
| 43 #undef COPY_CERT_STATUS | 45 #undef COPY_CERT_STATUS |
| 44 } | 46 } |
| 45 | 47 |
| 46 bool CertificateChainToString(scoped_refptr<net::X509Certificate> cert, | 48 bool CertificateChainToString(scoped_refptr<net::X509Certificate> cert, |
| 47 std::string* result) { | 49 std::string* result) { |
| 48 std::vector<std::string> pem_encoded_chain; | 50 std::vector<std::string> pem_encoded_chain; |
| 49 if (!cert->GetPEMEncodedChain(&pem_encoded_chain)) | 51 if (!cert->GetPEMEncodedChain(&pem_encoded_chain)) |
| 50 return false; | 52 return false; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 118 |
| 117 interstitial_info->set_user_proceeded(proceed_decision == USER_PROCEEDED); | 119 interstitial_info->set_user_proceeded(proceed_decision == USER_PROCEEDED); |
| 118 interstitial_info->set_overridable(overridable == INTERSTITIAL_OVERRIDABLE); | 120 interstitial_info->set_overridable(overridable == INTERSTITIAL_OVERRIDABLE); |
| 119 } | 121 } |
| 120 | 122 |
| 121 const std::string& ErrorReport::hostname() const { | 123 const std::string& ErrorReport::hostname() const { |
| 122 return cert_report_->hostname(); | 124 return cert_report_->hostname(); |
| 123 } | 125 } |
| 124 | 126 |
| 125 } // namespace certificate_reporting | 127 } // namespace certificate_reporting |
| OLD | NEW |