X-Git-Url: http://www.wagner.pp.ru/gitweb/?a=blobdiff_plain;f=test_curves.c;fp=test_curves.c;h=1ee15b0fab706e665f53258a5ac1f4799b18d463;hb=e73b5da38fe3e541d076093f7dd96fd2f8f527cc;hp=ba1da89292d954f3d15fdfa56fb85315cb153bb8;hpb=2b79bbba6aed4e69b1d2d0c04da00f121c69799d;p=openssl-gost%2Fengine.git diff --git a/test_curves.c b/test_curves.c index ba1da89..1ee15b0 100644 --- a/test_curves.c +++ b/test_curves.c @@ -182,8 +182,8 @@ static int parameter_test(struct test_curve *tc) const BIGNUM *order; T(order = EC_GROUP_get0_order(group)); T(!BN_is_zero(order)); - print_bn("m", order); - T(!BN_is_zero(order)); + print_bn("q", order); + T(BN_is_odd(order)); EC_POINT *point; T((point = EC_POINT_new(group))); T(EC_POINT_mul(group, point, NULL, generator, order, ctx)); @@ -204,10 +204,7 @@ static int parameter_test(struct test_curve *tc) /* Cofactor is 1 or 4 */ const BIGNUM *c; T(c = EC_GROUP_get0_cofactor(group)); - if (BN_is_odd(order)) - T(BN_is_word(c, 1)); - else - T(BN_is_word(c, 4)); + T(BN_is_word(c, 1) || BN_is_word(c, 4)); TEST_ASSERT(0); return test;