From 2fcd4b6bc36d3dfa65d486a300780c1fc052fa04 Mon Sep 17 00:00:00 2001 From: Tri Vo Date: Thu, 9 Mar 2023 13:23:05 -0800 Subject: [PATCH] Update challenge size check aosp/2480181 changed minimum challenge size to 16. Bug: 272392463 Test: VtsHalRemotelyProvisionedComponentTargetTest Change-Id: I420f230651192e8fd67aab2ceff916a9c8b6db92 --- security/keymint/support/remote_prov_utils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/keymint/support/remote_prov_utils.cpp b/security/keymint/support/remote_prov_utils.cpp index 9620b6a2aa..491b757302 100644 --- a/security/keymint/support/remote_prov_utils.cpp +++ b/security/keymint/support/remote_prov_utils.cpp @@ -805,8 +805,8 @@ ErrMsgOr parseAndValidateAuthenticatedRequestSignedPayload( return "Challenge must be a Bstr."; } - if (challenge.size() < 32 || challenge.size() > 64) { - return "Challenge size must be between 32 and 64 bytes inclusive. " + if (challenge.size() < 16 || challenge.size() > 64) { + return "Challenge size must be between 16 and 64 bytes inclusive. " "However, challenge is " + std::to_string(challenge.size()) + " bytes long."; }