unit-tests: Use longer input for ECDSA tests
wolfSSL 5.9.1 starts to enforce a minimum (and maximum) length for the hash when signing. Since we'll always require SHA-1, use 20 bytes as input in the tests to succeed with SIGN_ECDSA_WITH_NULL.
This commit is contained in:
@@ -40,7 +40,9 @@ static struct {
|
||||
*/
|
||||
static void test_good_sig(private_key_t *privkey, public_key_t *pubkey)
|
||||
{
|
||||
chunk_t sig, data = chunk_from_chars(0x01,0x02,0x03,0xFD,0xFE,0xFF);
|
||||
chunk_t sig, data = chunk_from_chars(0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x00,
|
||||
0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00,
|
||||
0xFC,0xFD,0xFE,0xFF);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < countof(schemes); i++)
|
||||
@@ -103,7 +105,9 @@ static chunk_t invalid_sigs[] = {
|
||||
*/
|
||||
static void test_bad_sigs(public_key_t *pubkey)
|
||||
{
|
||||
chunk_t data = chunk_from_chars(0x01,0x02,0x03,0xFD,0xFE,0xFF);
|
||||
chunk_t data = chunk_from_chars(0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x00,
|
||||
0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00,
|
||||
0xFC,0xFD,0xFE,0xFF);
|
||||
int s, i;
|
||||
|
||||
for (s = 0; s < countof(schemes); s++)
|
||||
|
||||
Reference in New Issue
Block a user