From c5d9414e096c3c269591ecaa71d95d48d19d9608 Mon Sep 17 00:00:00 2001 From: Pauli Date: Mon, 3 Feb 2020 11:41:31 +1000 Subject: [PATCH] DSA: fix the DSA parameter logic in test. Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/10977) --- test/evp_extra_test.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/evp_extra_test.c b/test/evp_extra_test.c index 024ef6ad17..5d3847e92f 100644 --- a/test/evp_extra_test.c +++ b/test/evp_extra_test.c @@ -1263,11 +1263,14 @@ static int test_EVP_PKEY_CTX_get_set_params(void) || !TEST_ptr(p) || !TEST_ptr(q) || !TEST_ptr(g) - || !TEST_ptr(pub) - || !DSA_set0_pqg(dsa, p, q, g) - || !DSA_set0_key(dsa, pub, priv)) + || !DSA_set0_pqg(dsa, p, q, g)) goto err; - p = q = g = pub = priv = NULL; + p = q = g = NULL; + if (!TEST_ptr(pub) + || !TEST_ptr(priv) + || !DSA_set0_key(dsa, pub, priv)) + goto err; + pub = priv = NULL; pkey = EVP_PKEY_new(); if (!TEST_ptr(pkey) -- 2.25.1