diff options
author | tb <> | 2022-11-24 16:35:32 +0000 |
---|---|---|
committer | tb <> | 2022-11-24 16:35:32 +0000 |
commit | 53370be4f7d09b47c6a833c3ff0104dda7a87034 (patch) | |
tree | 2c395c9cb25aa09b253f6b405a84423c873421d0 | |
parent | be4769d0741d6847bc2d339bb9e31e8f01498e2c (diff) | |
download | openbsd-53370be4f7d09b47c6a833c3ff0104dda7a87034.tar.gz openbsd-53370be4f7d09b47c6a833c3ff0104dda7a87034.tar.bz2 openbsd-53370be4f7d09b47c6a833c3ff0104dda7a87034.zip |
Merge the second y_bit check into the first one where it belongs
suggested by jsing
-rw-r--r-- | src/lib/libcrypto/ec/ecp_oct.c | 10 |
1 files changed, 5 insertions, 5 deletions
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 @@ | |||
1 | /* $OpenBSD: ecp_oct.c,v 1.17 2022/11/24 16:34:13 tb Exp $ */ | 1 | /* $OpenBSD: ecp_oct.c,v 1.18 2022/11/24 16:35:32 tb Exp $ */ |
2 | /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> | 2 | /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> |
3 | * for the OpenSSL project. | 3 | * for the OpenSSL project. |
4 | * Includes code written by Bodo Moeller for the OpenSSL project. | 4 | * Includes code written by Bodo Moeller for the OpenSSL project. |
@@ -167,10 +167,10 @@ ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *group, | |||
167 | } | 167 | } |
168 | if (!BN_usub(y, &group->field, y)) | 168 | if (!BN_usub(y, &group->field, y)) |
169 | goto err; | 169 | goto err; |
170 | } | 170 | if (y_bit != BN_is_odd(y)) { |
171 | if (y_bit != BN_is_odd(y)) { | 171 | ECerror(ERR_R_INTERNAL_ERROR); |
172 | ECerror(ERR_R_INTERNAL_ERROR); | 172 | goto err; |
173 | goto err; | 173 | } |
174 | } | 174 | } |
175 | if (!EC_POINT_set_affine_coordinates(group, point, x, y, ctx)) | 175 | if (!EC_POINT_set_affine_coordinates(group, point, x, y, ctx)) |
176 | goto err; | 176 | goto err; |