Skip to content

Commit

Permalink
Merge pull request #351 from joerchan/psa-invalid-signature-len
Browse files Browse the repository at this point in the history
api-tests: Fix test case using length longer than valid buffer
  • Loading branch information
jk-arm authored May 19, 2023
2 parents 463cb95 + 794b927 commit dd609f3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion api-tests/dev_apis/crypto/common/test_crypto_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,12 @@ const uint8_t signature_2[] = {
0x6F, 0xFD, 0x7E, 0xFC, 0x5D, 0x74, 0x88, 0x2B, 0xEA, 0x02, 0x64, 0x0D, 0x12, 0x76, 0x98, 0x43,
0xE7, 0xD5, 0xFF, 0x94, 0x81, 0xAD, 0x58, 0x87, 0x13, 0xB4, 0xEE, 0x98, 0x41, 0xA4, 0xDE, 0x30,
0x84, 0xC1, 0xB1, 0x04, 0x85, 0x5B, 0xCA, 0x86, 0xA4, 0xF3, 0x64, 0xE5, 0x20, 0x21, 0x1B, 0xE0,
0x55, 0x40, 0x24, 0x74, 0x95, 0x2A, 0x34, 0xF1, 0xC2, 0x79, 0x6A, 0x6D, 0x3C, 0xAB, 0xBD, 0xA0};
0x55, 0x40, 0x24, 0x74, 0x95, 0x2A, 0x34, 0xF1, 0xC2, 0x79, 0x6A, 0x6D, 0x3C, 0xAB, 0xBD, 0xA0,

/* Valid hash length is 128, add extra byte to keep valid memory for PSA
* functionional test: "TEST: 242 Test psa_verify_hash - Wrong signature size"
*/
0x00};

const uint8_t signature_2_invalid[] = {
0x62, 0xF7, 0xCB, 0xDC, 0x60, 0x2B, 0x9F, 0xC2, 0x7D, 0x96, 0x4F, 0xD1, 0xB3, 0x59, 0x52, 0x68,
Expand Down

0 comments on commit dd609f3

Please sign in to comment.