| Index: net/cert/internal/verify_certificate_chain_pkits_unittest.cc
|
| diff --git a/net/cert/internal/verify_certificate_chain_pkits_unittest.cc b/net/cert/internal/verify_certificate_chain_pkits_unittest.cc
|
| index 52a5ff88a0de067c77f4e05ea559aeff2060745a..e8279104d2f76c207a47c3f1e23061c41537427d 100644
|
| --- a/net/cert/internal/verify_certificate_chain_pkits_unittest.cc
|
| +++ b/net/cert/internal/verify_certificate_chain_pkits_unittest.cc
|
| @@ -57,14 +57,15 @@ class VerifyCertificateChainPkitsTestDelegate {
|
| // PKITS lists chains from trust anchor to target, VerifyCertificateChain
|
| // takes them starting with the target and not including the trust anchor.
|
| std::vector<scoped_refptr<net::ParsedCertificate>> input_chain;
|
| - CertErrors errors;
|
| + CertErrors parsing_errors;
|
| for (auto i = cert_ders.rbegin(); i != cert_ders.rend(); ++i) {
|
| if (!net::ParsedCertificate::CreateAndAddToVector(
|
| bssl::UniquePtr<CRYPTO_BUFFER>(
|
| CRYPTO_BUFFER_new(reinterpret_cast<const uint8_t*>(i->data()),
|
| i->size(), nullptr)),
|
| - {}, &input_chain, &errors)) {
|
| - ADD_FAILURE() << "Cert failed to parse:\n" << errors.ToDebugString();
|
| + {}, &input_chain, &parsing_errors)) {
|
| + ADD_FAILURE() << "Cert failed to parse:\n"
|
| + << parsing_errors.ToDebugString();
|
| return false;
|
| }
|
| }
|
| @@ -78,13 +79,12 @@ class VerifyCertificateChainPkitsTestDelegate {
|
| // Run all tests at the time the PKITS was published.
|
| der::GeneralizedTime time = {2011, 4, 15, 0, 0, 0};
|
|
|
| + CertPathErrors path_errors;
|
| bool result = VerifyCertificateChain(input_chain, trust_anchor.get(),
|
| - &signature_policy, time, &errors);
|
| + &signature_policy, time, &path_errors);
|
|
|
| // TODO(crbug.com/634443): Test errors on failure?
|
| - if (!result)
|
| - EXPECT_FALSE(errors.empty());
|
| -
|
| + EXPECT_EQ(result, !path_errors.ContainsHighSeverityErrors());
|
| return result;
|
| }
|
| };
|
|
|