summaryrefslogtreecommitdiff
path: root/test/evp_pkey_provided_test.c
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2022-05-28 23:53:19 +0800
committerTodd Short <todd.short@me.com>2022-06-02 10:36:56 -0400
commitd016758706d0a7a104ff09db94448aeec1b38193 (patch)
treea4f3f26de4f8e40587c8fb90568193d0af735116 /test/evp_pkey_provided_test.c
parent92d0d7ea9be40909ee79fb8861641a61eead2431 (diff)
downloadopenssl-new-d016758706d0a7a104ff09db94448aeec1b38193.tar.gz
Fix the checks of EVP_PKEY_pairwise_check
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> (Merged from https://github.com/openssl/openssl/pull/18424)
Diffstat (limited to 'test/evp_pkey_provided_test.c')
-rw-r--r--test/evp_pkey_provided_test.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/evp_pkey_provided_test.c b/test/evp_pkey_provided_test.c
index 7af5796113..563e0ad2ed 100644
--- a/test/evp_pkey_provided_test.c
+++ b/test/evp_pkey_provided_test.c
@@ -399,7 +399,7 @@ static int test_fromdata_rsa(void)
if (!TEST_int_gt(EVP_PKEY_check(key_ctx), 0)
|| !TEST_true(EVP_PKEY_public_check(key_ctx))
|| !TEST_true(EVP_PKEY_private_check(key_ctx))
- || !TEST_true(EVP_PKEY_pairwise_check(key_ctx)))
+ || !TEST_int_gt(EVP_PKEY_pairwise_check(key_ctx), 0))
goto err;
/* EVP_PKEY_copy_parameters() should fail for RSA */
@@ -663,7 +663,7 @@ static int test_fromdata_dh_named_group(void)
if (!TEST_int_gt(EVP_PKEY_check(key_ctx), 0)
|| !TEST_true(EVP_PKEY_public_check(key_ctx))
|| !TEST_true(EVP_PKEY_private_check(key_ctx))
- || !TEST_true(EVP_PKEY_pairwise_check(key_ctx)))
+ || !TEST_int_gt(EVP_PKEY_pairwise_check(key_ctx), 0))
goto err;
EVP_PKEY_CTX_free(key_ctx);
key_ctx = NULL;
@@ -844,7 +844,7 @@ static int test_fromdata_dh_fips186_4(void)
if (!TEST_int_gt(EVP_PKEY_check(key_ctx), 0)
|| !TEST_true(EVP_PKEY_public_check(key_ctx))
|| !TEST_true(EVP_PKEY_private_check(key_ctx))
- || !TEST_true(EVP_PKEY_pairwise_check(key_ctx)))
+ || !TEST_int_gt(EVP_PKEY_pairwise_check(key_ctx), 0))
goto err;
EVP_PKEY_CTX_free(key_ctx);
key_ctx = NULL;
@@ -1609,7 +1609,7 @@ static int test_fromdata_dsa_fips186_4(void)
if (!TEST_int_gt(EVP_PKEY_check(key_ctx), 0)
|| !TEST_true(EVP_PKEY_public_check(key_ctx))
|| !TEST_true(EVP_PKEY_private_check(key_ctx))
- || !TEST_true(EVP_PKEY_pairwise_check(key_ctx)))
+ || !TEST_int_gt(EVP_PKEY_pairwise_check(key_ctx), 0))
goto err;
EVP_PKEY_CTX_free(key_ctx);
key_ctx = NULL;
@@ -1663,7 +1663,7 @@ static int test_check_dsa(void)
|| !TEST_int_le(EVP_PKEY_check(ctx), 0)
|| !TEST_false(EVP_PKEY_public_check(ctx))
|| !TEST_false(EVP_PKEY_private_check(ctx))
- || !TEST_false(EVP_PKEY_pairwise_check(ctx)))
+ || !TEST_int_le(EVP_PKEY_pairwise_check(ctx), 0))
goto err;
ret = 1;