diff options
author | alk3pInjection <webmaster@raspii.tech> | 2023-07-04 20:04:45 +0800 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2023-07-04 20:04:45 +0800 |
commit | e1390d22fae12df2784992b3ba238af8e90eaecc (patch) | |
tree | 52dfbc4cd9931c722b210f063c144fe97a706af5 /identity/aidl/vts/Util.cpp | |
parent | b3f20c2aa61e4a6e07e8c06cf3623f1666620e1f (diff) | |
parent | 7c8943fde12ec5fb0f9629746c65e8b1bc78d1b4 (diff) |
Merge tag 'LA.QSSI.13.0.r1-10700-qssi.0' into tachibana-mr1tachibana-mr1
"LA.QSSI.13.0.r1-10700-qssi.0"
Change-Id: I11f0f2cb764e800ff1fd298c5a6443b98cf9a8a3
Diffstat (limited to 'identity/aidl/vts/Util.cpp')
-rw-r--r-- | identity/aidl/vts/Util.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/identity/aidl/vts/Util.cpp b/identity/aidl/vts/Util.cpp index f3d7c30548..4f5c121f95 100644 --- a/identity/aidl/vts/Util.cpp +++ b/identity/aidl/vts/Util.cpp @@ -523,8 +523,24 @@ void verifyAuthKeyCertificate(const vector<uint8_t>& authKeyCertChain) { int64_t allowDriftSecs = 10; EXPECT_LE(-allowDriftSecs, diffSecs); EXPECT_GE(allowDriftSecs, diffSecs); - constexpr uint64_t kSecsInOneYear = 365 * 24 * 60 * 60; - EXPECT_EQ(notBefore + kSecsInOneYear, notAfter); + + // The AIDL spec used to call for "one year in the future (365 + // days)" but was updated to say "current time and 31536000 + // seconds in the future (approximately 365 days)" to clarify that + // this was the original intention. + // + // However a number of implementations interpreted this as a + // "literal year" which started causing problems in March 2023 + // because 2024 is a leap year. Since the extra day doesn't really + // matter (the validity period is specified in the MSO anyway and + // that's what RPs use), we allow both interpretations. + // + // For simplicity, we just require that that notAfter is after + // 31536000 and which also covers the case if there's a leap-day + // and possible leap-seconds. + // + constexpr uint64_t kSecsIn365Days = 365 * 24 * 60 * 60; + EXPECT_LE(notBefore + kSecsIn365Days, notAfter); } vector<RequestNamespace> buildRequestNamespaces(const vector<TestEntryData> entries) { |