| Index: components/cast_certificate/cast_cert_validator_unittest.cc
|
| diff --git a/components/cast_certificate/cast_cert_validator_unittest.cc b/components/cast_certificate/cast_cert_validator_unittest.cc
|
| index 275e18a7b173a0ca1472d232d2904ed200f1ac07..e363a1d47c859bbf0f6b1646689cb7ff6fabc6f0 100644
|
| --- a/components/cast_certificate/cast_cert_validator_unittest.cc
|
| +++ b/components/cast_certificate/cast_cert_validator_unittest.cc
|
| @@ -39,15 +39,14 @@
|
| const std::string& expected_common_name,
|
| CastDeviceCertPolicy expected_policy,
|
| const std::string& certs_file_name,
|
| - const base::Time& time,
|
| + const base::Time::Exploded& time,
|
| const std::string& optional_signed_data_file_name) {
|
| auto certs =
|
| cast_certificate::testing::ReadCertificateChainFromFile(certs_file_name);
|
|
|
| std::unique_ptr<CertVerificationContext> context;
|
| CastDeviceCertPolicy policy;
|
| - bool result = VerifyDeviceCert(certs, time, &context, &policy, nullptr,
|
| - CRLPolicy::CRL_OPTIONAL);
|
| + bool result = VerifyDeviceCert(certs, time, &context, &policy);
|
|
|
| if (expected_result == RESULT_FAIL) {
|
| ASSERT_FALSE(result);
|
| @@ -90,26 +89,24 @@
|
| }
|
|
|
| // Creates a time in UTC at midnight.
|
| -base::Time CreateDate(int year, int month, int day) {
|
| +base::Time::Exploded CreateDate(int year, int month, int day) {
|
| base::Time::Exploded time = {0};
|
| time.year = year;
|
| time.month = month;
|
| time.day_of_month = day;
|
| - base::Time result;
|
| - EXPECT_TRUE(base::Time::FromUTCExploded(time, &result));
|
| - return result;
|
| + return time;
|
| }
|
|
|
| // Returns 2016-04-01 00:00:00 UTC.
|
| //
|
| // This is a time when most of the test certificate paths are
|
| // valid.
|
| -base::Time AprilFirst2016() {
|
| +base::Time::Exploded AprilFirst2016() {
|
| return CreateDate(2016, 4, 1);
|
| }
|
|
|
| // Returns 2015-01-01 00:00:00 UTC.
|
| -base::Time JanuaryFirst2015() {
|
| +base::Time::Exploded JanuaryFirst2015() {
|
| return CreateDate(2015, 1, 1);
|
| }
|
|
|
| @@ -117,7 +114,7 @@
|
| //
|
| // This is so far in the future that the test chains in this unit-test
|
| // should all be invalid.
|
| -base::Time MarchFirst2040() {
|
| +base::Time::Exploded MarchFirst2040() {
|
| return CreateDate(2040, 3, 1);
|
| }
|
|
|
|
|