diff options
-rw-r--r-- | src/lib/libcrypto/ec/ec_lib.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c index 5ad535f7ec..2a99f8d490 100644 --- a/src/lib/libcrypto/ec/ec_lib.c +++ b/src/lib/libcrypto/ec/ec_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ec_lib.c,v 1.47 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: ec_lib.c,v 1.48 2023/02/07 09:00:48 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Originally written by Bodo Moeller for the OpenSSL project. | 3 | * Originally written by Bodo Moeller for the OpenSSL project. |
4 | */ | 4 | */ |
@@ -949,8 +949,14 @@ EC_POINT_set_Jprojective_coordinates(const EC_GROUP *group, EC_POINT *point, | |||
949 | ECerror(EC_R_INCOMPATIBLE_OBJECTS); | 949 | ECerror(EC_R_INCOMPATIBLE_OBJECTS); |
950 | return 0; | 950 | return 0; |
951 | } | 951 | } |
952 | return group->meth->point_set_Jprojective_coordinates(group, point, | 952 | if (!group->meth->point_set_Jprojective_coordinates(group, point, |
953 | x, y, z, ctx); | 953 | x, y, z, ctx)) |
954 | return 0; | ||
955 | if (EC_POINT_is_on_curve(group, point, ctx) <= 0) { | ||
956 | ECerror(EC_R_POINT_IS_NOT_ON_CURVE); | ||
957 | return 0; | ||
958 | } | ||
959 | return 1; | ||
954 | } | 960 | } |
955 | 961 | ||
956 | int | 962 | int |