| Index: net/cert/internal/path_builder_unittest.cc
|
| diff --git a/net/cert/internal/path_builder_unittest.cc b/net/cert/internal/path_builder_unittest.cc
|
| index be5432b59d81c5e5f3ca4aadd94d5e6b97be1d47..ed26c159a67446e9a6943a17b19f6f9f0e7f168c 100644
|
| --- a/net/cert/internal/path_builder_unittest.cc
|
| +++ b/net/cert/internal/path_builder_unittest.cc
|
| @@ -218,7 +218,7 @@ TEST_F(PathBuilderMultiRootTest, SelfSignedTrustAnchorSupplementalCert) {
|
| EXPECT_FALSE(result.HasValidPath());
|
| ASSERT_EQ(2U, result.paths.size());
|
|
|
| - EXPECT_FALSE(result.paths[0]->valid);
|
| + EXPECT_FALSE(result.paths[0]->IsValid());
|
| const auto& path0 = result.paths[0]->path;
|
| ASSERT_EQ(2U, path0.certs.size());
|
| EXPECT_EQ(b_by_c_, path0.certs[0]);
|
| @@ -511,7 +511,7 @@ TEST_F(PathBuilderKeyRolloverTest, TestRolloverOnlyOldRootTrusted) {
|
| // but it will fail since newintermediate is signed by newroot.
|
| ASSERT_EQ(2U, result.paths.size());
|
| const auto& path0 = result.paths[0]->path;
|
| - EXPECT_FALSE(result.paths[0]->valid);
|
| + EXPECT_FALSE(result.paths[0]->IsValid());
|
| ASSERT_EQ(2U, path0.certs.size());
|
| EXPECT_EQ(target_, path0.certs[0]);
|
| EXPECT_EQ(newintermediate_, path0.certs[1]);
|
| @@ -522,7 +522,7 @@ TEST_F(PathBuilderKeyRolloverTest, TestRolloverOnlyOldRootTrusted) {
|
| // which will succeed.
|
| const auto& path1 = result.paths[1]->path;
|
| EXPECT_EQ(1U, result.best_result_index);
|
| - EXPECT_TRUE(result.paths[1]->valid);
|
| + EXPECT_TRUE(result.paths[1]->IsValid());
|
| ASSERT_EQ(3U, path1.certs.size());
|
| EXPECT_EQ(target_, path1.certs[0]);
|
| EXPECT_EQ(newintermediate_, path1.certs[1]);
|
| @@ -561,7 +561,7 @@ TEST_F(PathBuilderKeyRolloverTest, TestRolloverBothRootsTrusted) {
|
| // either will succeed.
|
| ASSERT_EQ(1U, result.paths.size());
|
| const auto& path = result.paths[0]->path;
|
| - EXPECT_TRUE(result.paths[0]->valid);
|
| + EXPECT_TRUE(result.paths[0]->IsValid());
|
| ASSERT_EQ(2U, path.certs.size());
|
| EXPECT_EQ(target_, path.certs[0]);
|
| if (path.certs[1] != newintermediate_) {
|
| @@ -627,7 +627,7 @@ TEST_F(PathBuilderKeyRolloverTest, TestMultipleRootMatchesOnlyOneWorks) {
|
| {
|
| // Path builder may first attempt: target <- oldintermediate <- newroot
|
| // but it will fail since oldintermediate is signed by oldroot.
|
| - EXPECT_FALSE(result.paths[0]->valid);
|
| + EXPECT_FALSE(result.paths[0]->IsValid());
|
| const auto& path = result.paths[0]->path;
|
| ASSERT_EQ(2U, path.certs.size());
|
| EXPECT_EQ(target_, path.certs[0]);
|
| @@ -639,7 +639,7 @@ TEST_F(PathBuilderKeyRolloverTest, TestMultipleRootMatchesOnlyOneWorks) {
|
| // Path builder will next attempt:
|
| // target <- old intermediate <- oldroot
|
| // which should succeed.
|
| - EXPECT_TRUE(result.paths[result.best_result_index]->valid);
|
| + EXPECT_TRUE(result.paths[result.best_result_index]->IsValid());
|
| const auto& path = result.paths[result.best_result_index]->path;
|
| ASSERT_EQ(2U, path.certs.size());
|
| EXPECT_EQ(target_, path.certs[0]);
|
| @@ -677,7 +677,7 @@ TEST_F(PathBuilderKeyRolloverTest, TestRolloverLongChain) {
|
|
|
| // Path builder will first attempt: target <- newintermediate <- oldroot
|
| // but it will fail since newintermediate is signed by newroot.
|
| - EXPECT_FALSE(result.paths[0]->valid);
|
| + EXPECT_FALSE(result.paths[0]->IsValid());
|
| const auto& path0 = result.paths[0]->path;
|
| ASSERT_EQ(2U, path0.certs.size());
|
| EXPECT_EQ(target_, path0.certs[0]);
|
| @@ -687,7 +687,7 @@ TEST_F(PathBuilderKeyRolloverTest, TestRolloverLongChain) {
|
| // Path builder will next attempt:
|
| // target <- newintermediate <- newroot <- oldroot
|
| // but it will fail since newroot is self-signed.
|
| - EXPECT_FALSE(result.paths[1]->valid);
|
| + EXPECT_FALSE(result.paths[1]->IsValid());
|
| const auto& path1 = result.paths[1]->path;
|
| ASSERT_EQ(3U, path1.certs.size());
|
| EXPECT_EQ(target_, path1.certs[0]);
|
| @@ -702,7 +702,7 @@ TEST_F(PathBuilderKeyRolloverTest, TestRolloverLongChain) {
|
| // Finally path builder will use:
|
| // target <- newintermediate <- newrootrollover <- oldroot
|
| EXPECT_EQ(2U, result.best_result_index);
|
| - EXPECT_TRUE(result.paths[2]->valid);
|
| + EXPECT_TRUE(result.paths[2]->IsValid());
|
| const auto& path2 = result.paths[2]->path;
|
| ASSERT_EQ(3U, path2.certs.size());
|
| EXPECT_EQ(target_, path2.certs[0]);
|
| @@ -778,7 +778,7 @@ TEST_F(PathBuilderKeyRolloverTest,
|
|
|
| // Newroot has same name+SPKI as newrootrollover, thus the path is valid and
|
| // only contains newroot.
|
| - EXPECT_TRUE(best_result->valid);
|
| + EXPECT_TRUE(best_result->IsValid());
|
| ASSERT_EQ(1U, best_result->path.certs.size());
|
| EXPECT_EQ(newroot_, best_result->path.certs[0]);
|
| EXPECT_EQ(newrootrollover_, best_result->path.trust_anchor->cert());
|
| @@ -828,7 +828,7 @@ TEST_F(PathBuilderKeyRolloverTest, TestDuplicateIntermediates) {
|
|
|
| // Path builder will first attempt: target <- oldintermediate <- newroot
|
| // but it will fail since oldintermediate is signed by oldroot.
|
| - EXPECT_FALSE(result.paths[0]->valid);
|
| + EXPECT_FALSE(result.paths[0]->IsValid());
|
| const auto& path0 = result.paths[0]->path;
|
|
|
| ASSERT_EQ(2U, path0.certs.size());
|
| @@ -841,7 +841,7 @@ TEST_F(PathBuilderKeyRolloverTest, TestDuplicateIntermediates) {
|
| // Path builder will next attempt: target <- newintermediate <- newroot
|
| // which will succeed.
|
| EXPECT_EQ(1U, result.best_result_index);
|
| - EXPECT_TRUE(result.paths[1]->valid);
|
| + EXPECT_TRUE(result.paths[1]->IsValid());
|
| const auto& path1 = result.paths[1]->path;
|
| ASSERT_EQ(2U, path1.certs.size());
|
| EXPECT_EQ(target_, path1.certs[0]);
|
| @@ -881,7 +881,7 @@ TEST_F(PathBuilderKeyRolloverTest, TestDuplicateIntermediateAndRoot) {
|
|
|
| // Path builder attempt: target <- oldintermediate <- newroot
|
| // but it will fail since oldintermediate is signed by oldroot.
|
| - EXPECT_FALSE(result.paths[0]->valid);
|
| + EXPECT_FALSE(result.paths[0]->IsValid());
|
| const auto& path = result.paths[0]->path;
|
| ASSERT_EQ(2U, path.certs.size());
|
| EXPECT_EQ(target_, path.certs[0]);
|
| @@ -996,7 +996,7 @@ TEST_F(PathBuilderKeyRolloverTest, TestMultipleAsyncIssuersFromSingleSource) {
|
|
|
| // Path builder first attempts: target <- oldintermediate <- newroot
|
| // but it will fail since oldintermediate is signed by oldroot.
|
| - EXPECT_FALSE(result.paths[0]->valid);
|
| + EXPECT_FALSE(result.paths[0]->IsValid());
|
| const auto& path0 = result.paths[0]->path;
|
| ASSERT_EQ(2U, path0.certs.size());
|
| EXPECT_EQ(target_, path0.certs[0]);
|
| @@ -1005,7 +1005,7 @@ TEST_F(PathBuilderKeyRolloverTest, TestMultipleAsyncIssuersFromSingleSource) {
|
|
|
| // After the second batch of async results, path builder will attempt:
|
| // target <- newintermediate <- newroot which will succeed.
|
| - EXPECT_TRUE(result.paths[1]->valid);
|
| + EXPECT_TRUE(result.paths[1]->IsValid());
|
| const auto& path1 = result.paths[1]->path;
|
| ASSERT_EQ(2U, path1.certs.size());
|
| EXPECT_EQ(target_, path1.certs[0]);
|
| @@ -1082,7 +1082,7 @@ TEST_F(PathBuilderKeyRolloverTest, TestDuplicateAsyncIntermediates) {
|
|
|
| // Path builder first attempts: target <- oldintermediate <- newroot
|
| // but it will fail since oldintermediate is signed by oldroot.
|
| - EXPECT_FALSE(result.paths[0]->valid);
|
| + EXPECT_FALSE(result.paths[0]->IsValid());
|
| const auto& path0 = result.paths[0]->path;
|
| ASSERT_EQ(2U, path0.certs.size());
|
| EXPECT_EQ(target_, path0.certs[0]);
|
| @@ -1093,7 +1093,7 @@ TEST_F(PathBuilderKeyRolloverTest, TestDuplicateAsyncIntermediates) {
|
|
|
| // After the third batch of async results, path builder will attempt:
|
| // target <- newintermediate <- newroot which will succeed.
|
| - EXPECT_TRUE(result.paths[1]->valid);
|
| + EXPECT_TRUE(result.paths[1]->IsValid());
|
| const auto& path1 = result.paths[1]->path;
|
| ASSERT_EQ(2U, path1.certs.size());
|
| EXPECT_EQ(target_, path1.certs[0]);
|
|
|