From: Pauli Date: Mon, 3 Feb 2020 01:41:31 +0000 (+1000) Subject: DSA: fix the DSA parameter logic in test. X-Git-Tag: openssl-3.0.0-alpha1~494 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c5d9414e096c3c269591ecaa71d95d48d19d9608;p=oweals%2Fopenssl.git DSA: fix the DSA parameter logic in test. Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/10977) --- 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)