3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 04:32:37 +01:00

unit: fix test-sae to use a valid peer point

Now that the peer element is validated we must send valid point data.
This should have been done in the beginning anyways, but since the
point data was not previously validated this test still passed.

Since this particular unit test is really testing timeouts we can just
use the commit buffer for other tests since it contains a valid scalar
and point.
This commit is contained in:
James Prestwood 2019-01-10 13:43:38 -08:00 committed by Denis Kenzior
parent 73dd0602fd
commit e5cf66ddb2

View File

@ -194,15 +194,9 @@ static void test_confirm_timeout(const void *arg)
{
struct test_data *td = l_new(struct test_data, 1);
struct sae_sm *sm = test_initialize(td);
uint8_t commit[102];
int i;
l_put_le16(1, commit);
l_put_le16(0, commit + 2);
l_put_le16(19, commit + 4);
memset(commit + 6, 0xde, 96);
sae_rx_packet(sm, aa, commit, sizeof(commit));
sae_rx_packet(sm, aa, aa_commit, sizeof(aa_commit));
assert(td->confirm_success);