diff --git a/tests/api.c b/tests/api.c index e97a3eff8..16d885012 100644 --- a/tests/api.c +++ b/tests/api.c @@ -1656,6 +1656,9 @@ static void test_wolfSSL_DH_get0_pqg(void) #endif printf(testingFmt, "test_wolfSSL_DH_get0_pqg"); + dh = wolfSSL_DH_new(); + AssertNotNull(dh); + /* invalid parameters test */ DH_get0_pqg(NULL, &p, &q, &g); DH_get0_pqg(dh, NULL, &q, &g); @@ -1663,9 +1666,6 @@ static void test_wolfSSL_DH_get0_pqg(void) DH_get0_pqg(dh, NULL, NULL, NULL); AssertTrue(1); - dh = wolfSSL_DH_new(); - AssertNotNull(dh); - DH_get0_pqg(dh, &p, &q, &g); AssertPtrEq(p, NULL); AssertPtrEq(q, NULL);