From b60583c3b12864e69f10dc01046d898d85b2083a Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Mon, 22 May 2023 17:41:04 +0000 Subject: [PATCH] Log errors in verifyChallengeInternal() It is unexpected for verifyChallengeInternal() to fail, since the Gatekeeper enrollment of the synthetic password (more specifically, the Gatekeeper password derived from the synthetic password) should always be valid. Therefore, ensure that an error message is logged in all failure cases. Bug: 282947979 Change-Id: Ic8d0134bc4f3e0979bf500ffb5a99f2522251d39 --- .../android/server/locksettings/SyntheticPasswordManager.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java b/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java index 65e7a00ad13f7..85953c46c2ae9 100644 --- a/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java +++ b/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java @@ -1567,8 +1567,10 @@ class SyntheticPasswordManager { } return result; } else if (responseCode == GateKeeperResponse.RESPONSE_RETRY) { + Slog.e(TAG, "Gatekeeper verification of synthetic password failed with RESPONSE_RETRY"); return VerifyCredentialResponse.fromTimeout(response.getTimeout()); } else { + Slog.e(TAG, "Gatekeeper verification of synthetic password failed with RESPONSE_ERROR"); return VerifyCredentialResponse.ERROR; } }