diff options
author | Pauli <paul.dale@oracle.com> | 2020-02-03 11:41:31 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-02-12 08:52:41 +1000 |
commit | c5d9414e096c3c269591ecaa71d95d48d19d9608 (patch) | |
tree | bbc072e78e354e9297ba09e072f7da57d05a3ee4 /test | |
parent | 97b50f67f212589661c9f1edd5285822c6cc642b (diff) |
DSA: fix the DSA parameter logic in test.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10977)
Diffstat (limited to 'test')
-rw-r--r-- | test/evp_extra_test.c | 11 |
1 files 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) |