From e5cf66ddb238922c7118b93fc3038a6430024f48 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Thu, 10 Jan 2019 13:43:38 -0800 Subject: [PATCH] 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. --- unit/test-sae.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/unit/test-sae.c b/unit/test-sae.c index 890b901c..1756af4d 100644 --- a/unit/test-sae.c +++ b/unit/test-sae.c @@ -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);