| Index: net/cert/cert_verify_proc.cc
|
| diff --git a/net/cert/cert_verify_proc.cc b/net/cert/cert_verify_proc.cc
|
| index 8fdd93cbb1bb0c4720273867ee9c9de3fb723ed6..6895bc6023b49353d475805325ac28feb47e47e0 100644
|
| --- a/net/cert/cert_verify_proc.cc
|
| +++ b/net/cert/cert_verify_proc.cc
|
| @@ -693,12 +693,23 @@ bool CertVerifyProc::HasTooLongValidity(const X509Certificate& cert) {
|
| if (exploded_expiry.day_of_month > exploded_start.day_of_month)
|
| ++month_diff;
|
|
|
| - static const base::Time time_2012_07_01 =
|
| - base::Time::FromUTCExploded({2012, 7, 0, 1, 0, 0, 0, 0});
|
| - static const base::Time time_2015_04_01 =
|
| - base::Time::FromUTCExploded({2015, 4, 0, 1, 0, 0, 0, 0});
|
| - static const base::Time time_2019_07_01 =
|
| - base::Time::FromUTCExploded({2019, 7, 0, 1, 0, 0, 0, 0});
|
| + static base::Time time_2012_07_01;
|
| + if (!base::Time::FromUTCExploded({2012, 7, 0, 1, 0, 0, 0, 0},
|
| + &time_2012_07_01)) {
|
| + return false;
|
| + }
|
| +
|
| + static base::Time time_2015_04_01;
|
| + if (!base::Time::FromUTCExploded({2015, 4, 0, 1, 0, 0, 0, 0},
|
| + &time_2015_04_01)) {
|
| + return false;
|
| + }
|
| +
|
| + static base::Time time_2019_07_01;
|
| + if (!base::Time::FromUTCExploded({2019, 7, 0, 1, 0, 0, 0, 0},
|
| + &time_2019_07_01)) {
|
| + return false;
|
| + }
|
|
|
| // For certificates issued before the BRs took effect.
|
| if (start < time_2012_07_01 && (month_diff > 120 || expiry > time_2019_07_01))
|
|
|