[openssl] master update
nic.tuv at gmail.com
nic.tuv at gmail.com
Mon Sep 9 11:47:07 UTC 2019
The branch master has been updated
via bfed4fc8367b55e630c70cc038887ddf9b090dd6 (commit)
via 65936a56461fe09e8c81bca45122af5adcfabb00 (commit)
from 3f37050e33c47b246b530ef01f0b0bda9126581c (commit)
- Log -----------------------------------------------------------------
commit bfed4fc8367b55e630c70cc038887ddf9b090dd6
Author: Nicola Tuveri <nic.tuv at gmail.com>
Date: Mon Sep 9 04:00:37 2019 +0300
Uniform TEST_*() check usage in test/ectest.c
- Replace a `TEST_true()` with `!TEST_false()` to avoid reporting
confusing errors
- We tend to use `if (!TEST_foo() || !TEST_bar())` and it's a bit
confusing to switch to `if(!(TEST_foo() && TEST_bar()))`: replace it
with the more common style
Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger at hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/9813)
commit 65936a56461fe09e8c81bca45122af5adcfabb00
Author: Nicola Tuveri <nic.tuv at gmail.com>
Date: Mon Sep 9 03:52:00 2019 +0300
Fix spacing nit in test/ectest.c
Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger at hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/9813)
-----------------------------------------------------------------------
Summary of changes:
test/ectest.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/test/ectest.c b/test/ectest.c
index e0081c8866..4f3bfb7569 100644
--- a/test/ectest.c
+++ b/test/ectest.c
@@ -1679,8 +1679,8 @@ static int check_named_curve_test(int id)
group_cofactor))
|| !TEST_int_eq(EC_GROUP_check_named_curve(gtest, 0, NULL), 0)
/* The order is not an optional field, so this should fail */
- || TEST_true(EC_GROUP_set_generator(gtest, group_gen, NULL,
- group_cofactor))
+ || !TEST_false(EC_GROUP_set_generator(gtest, group_gen, NULL,
+ group_cofactor))
|| !TEST_true(EC_GROUP_set_generator(gtest, group_gen, group_order,
other_cofactor))
|| !TEST_int_eq(EC_GROUP_check_named_curve(gtest, 0, NULL), 0)
@@ -2137,7 +2137,7 @@ static int cardinality_test(int n)
BIGNUM *g1_p = NULL, *g1_a = NULL, *g1_b = NULL, *g1_x = NULL, *g1_y = NULL,
*g1_order = NULL, *g1_cf = NULL, *g2_cf = NULL;
- TEST_info("Curve %s cardinality test", OBJ_nid2sn(nid));
+ TEST_info("Curve %s cardinality test", OBJ_nid2sn(nid));
if (!TEST_ptr(ctx = BN_CTX_new())
|| !TEST_ptr(g1 = EC_GROUP_new_by_curve_name(nid))
@@ -2214,17 +2214,17 @@ static int check_ec_key_field_public_range_test(int id)
BIGNUM *x = NULL, *y = NULL;
EC_KEY *key = NULL;
- if (!(TEST_ptr(x = BN_new())
- && TEST_ptr(y = BN_new())
- && TEST_ptr(key = EC_KEY_new_by_curve_name(curves[id].nid))
- && TEST_ptr(group = EC_KEY_get0_group(key))
- && TEST_ptr(meth = EC_GROUP_method_of(group))
- && TEST_ptr(field = EC_GROUP_get0_field(group))
- && TEST_int_gt(EC_KEY_generate_key(key), 0)
- && TEST_int_gt(EC_KEY_check_key(key), 0)
- && TEST_ptr(pub = EC_KEY_get0_public_key(key))
- && TEST_int_gt(EC_POINT_get_affine_coordinates(group, pub, x, y,
- NULL), 0)))
+ if (!TEST_ptr(x = BN_new())
+ || !TEST_ptr(y = BN_new())
+ || !TEST_ptr(key = EC_KEY_new_by_curve_name(curves[id].nid))
+ || !TEST_ptr(group = EC_KEY_get0_group(key))
+ || !TEST_ptr(meth = EC_GROUP_method_of(group))
+ || !TEST_ptr(field = EC_GROUP_get0_field(group))
+ || !TEST_int_gt(EC_KEY_generate_key(key), 0)
+ || !TEST_int_gt(EC_KEY_check_key(key), 0)
+ || !TEST_ptr(pub = EC_KEY_get0_public_key(key))
+ || !TEST_int_gt(EC_POINT_get_affine_coordinates(group, pub, x, y,
+ NULL), 0))
goto err;
/*
More information about the openssl-commits
mailing list