From c39bd55acadd3c1b9cc66e84a9ac1bac3b895f48 Mon Sep 17 00:00:00 2001 From: Ethan Looney Date: Tue, 30 Jun 2020 09:32:10 -0700 Subject: [PATCH] Removed comment, deleted redundent WC_RNG initialization and fixed indentation --- tests/api.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/api.c b/tests/api.c index 642bf9162..74ae6f4b8 100644 --- a/tests/api.c +++ b/tests/api.c @@ -16193,7 +16193,7 @@ static int test_wc_curve448_make_key (void) /* * Testing test_wc_curve448_shared_secret_ex */ -static int test_wc_curve448_shared_secret_ex (void) //ethan-3 +static int test_wc_curve448_shared_secret_ex (void) { int ret = 0; #if defined(HAVE_CURVE448) @@ -16210,16 +16210,12 @@ static int test_wc_curve448_shared_secret_ex (void) //ethan-3 ret = wc_InitRng(&rng); if (ret == 0){ ret = wc_curve448_make_key(&rng, CURVE448_KEY_SIZE, &private_key); - } - if (wc_FreeRng(&rng) && ret == 0) { - ret = WOLFSSL_FATAL_ERROR; - } + } } if (ret == 0){ ret = wc_curve448_init(&public_key); } if (ret == 0) { - ret = wc_InitRng(&rng); if (ret == 0){ ret = wc_curve448_make_key(&rng, CURVE448_KEY_SIZE, &public_key); } @@ -16281,8 +16277,6 @@ static int test_wc_curve448_shared_secret_ex (void) //ethan-3 #endif return ret; } /*END test_wc_curve448_shared_secret_ex*/ - - /* * Testing test_wc_curve448_export_public_ex */ @@ -16530,7 +16524,7 @@ static int test_wc_curve448_export_key_raw (void) printf(testingFmt, "wc_curve448_export_key_raw()"); - ret = wc_curve448_init(&key); + ret = wc_curve448_init(&key); if (ret == 0) { ret = wc_InitRng(&rng); }