Skip to content

Commit

Permalink
Merge pull request #228 from subrahmanyaman/Javacard_KeyMint_200_master
Browse files Browse the repository at this point in the history
Set upper limit for RKP challenge
  • Loading branch information
mdwivedi authored Oct 6, 2022
2 parents 9b85833 + af1da5f commit 1c31b18
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 1c31b18

Please sign in to comment.