X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;ds=sidebyside;f=test_curves.c;h=1ee15b0fab706e665f53258a5ac1f4799b18d463;hb=b9935fbf77164cf491fb12df74f7a85e877813cd;hp=ba1da89292d954f3d15fdfa56fb85315cb153bb8;hpb=61afc2c3334e7e69598715548401078f350c45d1;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;