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:
Tobias Brunner
2026-04-09 09:53:36 +02:00
parent b9d9f8ad95
commit 99e9db478d
+6 -2
View File
@@ -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++)