From 9c0a45795f4f2cd099b673afa7063f48d1ca2f6c Mon Sep 17 00:00:00 2001 From: Garret Kelly Date: Mon, 24 Jun 2019 18:31:38 -0400 Subject: [PATCH] Increase leniency of attestation record timestamps The TEE keymaster has been seen to be almost a minute out of sync with the host clock during attestation. Increase the leniency window to two minutes. Bug: 134408892 Bug: 134408367 Test: VtsHalKeymasterV4_0TargetTest Change-Id: Ic256a939dcd7e7b108099cfcf237cacde8dde059 --- keymaster/4.0/vts/functional/KeymasterHidlTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keymaster/4.0/vts/functional/KeymasterHidlTest.cpp b/keymaster/4.0/vts/functional/KeymasterHidlTest.cpp index a7b6c981f4..3af1df32d3 100644 --- a/keymaster/4.0/vts/functional/KeymasterHidlTest.cpp +++ b/keymaster/4.0/vts/functional/KeymasterHidlTest.cpp @@ -216,8 +216,8 @@ void KeymasterHidlTest::CheckCreationDateTime( std::chrono::system_clock::now(); std::chrono::time_point reported_time{ std::chrono::milliseconds(sw_enforced[i].f.dateTime)}; - // The test is flaky for EC keys, so a buffer time of 1 second will be added. - EXPECT_LE(creation - 1s, reported_time); + // The test is flaky for EC keys, so a buffer time of 120 seconds will be added. + EXPECT_LE(creation - 120s, reported_time); EXPECT_LE(reported_time, now + 1s); } }