Skip to content

Commit

Permalink
Challenge validation. challenge cannot be more than 64 bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
subrahmanyaman committed Oct 5, 2022
1 parent 1e23ede commit af1da5f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ public void processUpdateChallenge(APDU apdu) throws Exception {
// Store the challenge in the data table.
short challenge = KMArray.cast(arr).get((short) 0);
short challengeLen = KMByteBlob.cast(challenge).length();
if (challengeLen < 32 || challengeLen > 64) {
if (challengeLen > 64) {
KMException.throwIt(KMError.INVALID_INPUT_LENGTH);
}
short dataEntryIndex = createEntry(CHALLENGE, challengeLen);
Expand Down

0 comments on commit af1da5f

Please sign in to comment.