summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPW Hu <jlu.hpw@foxmail.com>2021-11-01 15:08:51 +0800
committerTomas Mraz <tomas@openssl.org>2021-11-02 12:01:34 +0100
commit1585f190290187c2601489f11b6907a8fa2e1109 (patch)
tree9781d807a23a0678ba3402951aa7a3bd32f00e77 /test
parent0b5a0043f9c09a7afff7ae18559ee984226ea25b (diff)
Fix incorrect return check of BN_bn2nativepad
Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16943) (cherry picked from commit 944fcfc69d16dfd20decdd9cd105436f0043dbe0)
Diffstat (limited to 'test')
-rw-r--r--test/keymgmt_internal_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/keymgmt_internal_test.c b/test/keymgmt_internal_test.c
index 40fc464bc2..dd0de2f599 100644
--- a/test/keymgmt_internal_test.c
+++ b/test/keymgmt_internal_test.c
@@ -88,7 +88,7 @@ static int get_ulong_via_BN(const OSSL_PARAM *p, unsigned long *goal)
int ret = 1; /* Ever so hopeful */
if (!TEST_true(OSSL_PARAM_get_BN(p, &n))
- || !TEST_true(BN_bn2nativepad(n, (unsigned char *)goal, sizeof(*goal))))
+ || !TEST_int_ge(BN_bn2nativepad(n, (unsigned char *)goal, sizeof(*goal)), 0))
ret = 0;
BN_free(n);
return ret;