From 53370be4f7d09b47c6a833c3ff0104dda7a87034 Mon Sep 17 00:00:00 2001 From: tb <> Date: Thu, 24 Nov 2022 16:35:32 +0000 Subject: Merge the second y_bit check into the first one where it belongs suggested by jsing --- src/lib/libcrypto/ec/ecp_oct.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/ec/ecp_oct.c b/src/lib/libcrypto/ec/ecp_oct.c index 5e3484e2bc..354ae5489d 100644 --- a/src/lib/libcrypto/ec/ecp_oct.c +++ b/src/lib/libcrypto/ec/ecp_oct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ecp_oct.c,v 1.17 2022/11/24 16:34:13 tb Exp $ */ +/* $OpenBSD: ecp_oct.c,v 1.18 2022/11/24 16:35:32 tb Exp $ */ /* Includes code written by Lenka Fibikova * for the OpenSSL project. * Includes code written by Bodo Moeller for the OpenSSL project. @@ -167,10 +167,10 @@ ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *group, } if (!BN_usub(y, &group->field, y)) goto err; - } - if (y_bit != BN_is_odd(y)) { - ECerror(ERR_R_INTERNAL_ERROR); - goto err; + if (y_bit != BN_is_odd(y)) { + ECerror(ERR_R_INTERNAL_ERROR); + goto err; + } } if (!EC_POINT_set_affine_coordinates(group, point, x, y, ctx)) goto err; -- cgit v1.2.3-55-g6feb