Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2fcd4b6b authored by Tri Vo's avatar Tri Vo
Browse files

Update challenge size check

aosp/2480181 changed minimum challenge size to 16.

Bug: 272392463
Test: VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I420f230651192e8fd67aab2ceff916a9c8b6db92
parent 3eed07ea
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -805,8 +805,8 @@ ErrMsgOr<bytevec> 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.";
    }