From a1c4e0ec5deaf3c6c4e8694afd67eb5a24bd0fa5 Mon Sep 17 00:00:00 2001 From: Janis Danisevskis Date: Tue, 19 Jun 2018 19:08:15 -0700 Subject: [PATCH] Relax HMAC computation check This KM4 key agreement check is causing some pain on early units that aren't completely provisioned in both locked and non-Green (unlocked) states. This doesn't impact KM3 devices (Pixel 2016/2017 etc.) Bug: 110301629 Change-Id: I5a737ac8a335863b1099c29cf3c0496adeb41e15 --- keymaster/4.0/support/Keymaster.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keymaster/4.0/support/Keymaster.cpp b/keymaster/4.0/support/Keymaster.cpp index 444298b5bb..9325cc0699 100644 --- a/keymaster/4.0/support/Keymaster.cpp +++ b/keymaster/4.0/support/Keymaster.cpp @@ -164,10 +164,10 @@ static void computeHmac(const Keymaster::KeymasterSet& keymasters, sharingCheck = curSharingCheck; firstKeymaster = false; } - CHECK(curSharingCheck == sharingCheck) - << "HMAC computation failed for " << *keymaster // - << " Expected: " << sharingCheck // - << " got: " << curSharingCheck; + if (curSharingCheck != sharingCheck) + LOG(WARNING) << "HMAC computation failed for " << *keymaster // + << " Expected: " << sharingCheck // + << " got: " << curSharingCheck; }); CHECK(rc.isOk()) << "Failed to communicate with " << *keymaster << " error: " << rc.description();