diff options
Diffstat (limited to 'src/lib/libcrypto/ec/ecp_oct.c')
-rw-r--r-- | src/lib/libcrypto/ec/ecp_oct.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/ec/ecp_oct.c b/src/lib/libcrypto/ec/ecp_oct.c index d2402ee0d8..abc31e6382 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.5 2014/07/12 16:03:37 miod Exp $ */ | 1 | /* $OpenBSD: ecp_oct.c,v 1.6 2015/02/08 22:25:03 miod 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. |
@@ -211,7 +211,7 @@ ec_GFp_simple_point2oct(const EC_GROUP * group, const EC_POINT * point, point_co | |||
211 | ECerr(EC_F_EC_GFP_SIMPLE_POINT2OCT, EC_R_INVALID_FORM); | 211 | ECerr(EC_F_EC_GFP_SIMPLE_POINT2OCT, EC_R_INVALID_FORM); |
212 | goto err; | 212 | goto err; |
213 | } | 213 | } |
214 | if (EC_POINT_is_at_infinity(group, point)) { | 214 | if (EC_POINT_is_at_infinity(group, point) > 0) { |
215 | /* encodes to a single 0 octet */ | 215 | /* encodes to a single 0 octet */ |
216 | if (buf != NULL) { | 216 | if (buf != NULL) { |
217 | if (len < 1) { | 217 | if (len < 1) { |
@@ -379,8 +379,8 @@ ec_GFp_simple_oct2point(const EC_GROUP * group, EC_POINT * point, | |||
379 | goto err; | 379 | goto err; |
380 | } | 380 | } |
381 | 381 | ||
382 | if (!EC_POINT_is_on_curve(group, point, ctx)) { /* test required by | 382 | /* test required by X9.62 */ |
383 | * X9.62 */ | 383 | if (EC_POINT_is_on_curve(group, point, ctx) <= 0) { |
384 | ECerr(EC_F_EC_GFP_SIMPLE_OCT2POINT, EC_R_POINT_IS_NOT_ON_CURVE); | 384 | ECerr(EC_F_EC_GFP_SIMPLE_OCT2POINT, EC_R_POINT_IS_NOT_ON_CURVE); |
385 | goto err; | 385 | goto err; |
386 | } | 386 | } |