diff options
Diffstat (limited to 'src/lib/libcrypto/ec/ec_lib.c')
-rw-r--r-- | src/lib/libcrypto/ec/ec_lib.c | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c index 1be688824d..a5cf84b78c 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.37 2021/04/20 17:17:47 tb Exp $ */ | 1 | /* $OpenBSD: ec_lib.c,v 1.38 2021/04/20 17:28:18 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 | */ |
@@ -922,12 +922,11 @@ EC_POINT_set_to_infinity(const EC_GROUP * group, EC_POINT * point) | |||
922 | return group->meth->point_set_to_infinity(group, point); | 922 | return group->meth->point_set_to_infinity(group, point); |
923 | } | 923 | } |
924 | 924 | ||
925 | 925 | int | |
926 | int | 926 | EC_POINT_set_Jprojective_coordinates(const EC_GROUP *group, EC_POINT *point, |
927 | EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, | ||
928 | const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *ctx) | 927 | const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *ctx) |
929 | { | 928 | { |
930 | if (group->meth->point_set_Jprojective_coordinates_GFp == 0) { | 929 | if (group->meth->point_set_Jprojective_coordinates == 0) { |
931 | ECerror(ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); | 930 | ECerror(ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); |
932 | return 0; | 931 | return 0; |
933 | } | 932 | } |
@@ -935,15 +934,15 @@ EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, | |||
935 | ECerror(EC_R_INCOMPATIBLE_OBJECTS); | 934 | ECerror(EC_R_INCOMPATIBLE_OBJECTS); |
936 | return 0; | 935 | return 0; |
937 | } | 936 | } |
938 | return group->meth->point_set_Jprojective_coordinates_GFp(group, point, x, y, z, ctx); | 937 | return group->meth->point_set_Jprojective_coordinates(group, point, |
938 | x, y, z, ctx); | ||
939 | } | 939 | } |
940 | 940 | ||
941 | 941 | int | |
942 | int | 942 | EC_POINT_get_Jprojective_coordinates(const EC_GROUP *group, |
943 | EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, | ||
944 | const EC_POINT *point, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx) | 943 | const EC_POINT *point, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx) |
945 | { | 944 | { |
946 | if (group->meth->point_get_Jprojective_coordinates_GFp == 0) { | 945 | if (group->meth->point_get_Jprojective_coordinates == 0) { |
947 | ECerror(ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); | 946 | ECerror(ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); |
948 | return 0; | 947 | return 0; |
949 | } | 948 | } |
@@ -951,7 +950,22 @@ EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, | |||
951 | ECerror(EC_R_INCOMPATIBLE_OBJECTS); | 950 | ECerror(EC_R_INCOMPATIBLE_OBJECTS); |
952 | return 0; | 951 | return 0; |
953 | } | 952 | } |
954 | return group->meth->point_get_Jprojective_coordinates_GFp(group, point, x, y, z, ctx); | 953 | return group->meth->point_get_Jprojective_coordinates(group, point, |
954 | x, y, z, ctx); | ||
955 | } | ||
956 | |||
957 | int | ||
958 | EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, | ||
959 | const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *ctx) | ||
960 | { | ||
961 | return EC_POINT_set_Jprojective_coordinates(group, point, x, y, z, ctx); | ||
962 | } | ||
963 | |||
964 | int | ||
965 | EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, | ||
966 | const EC_POINT *point, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx) | ||
967 | { | ||
968 | return EC_POINT_get_Jprojective_coordinates(group, point, x, y, z, ctx); | ||
955 | } | 969 | } |
956 | 970 | ||
957 | int | 971 | int |