diff options
Diffstat (limited to 'src/lib/libcrypto/ec/ec2_oct.c')
-rw-r--r-- | src/lib/libcrypto/ec/ec2_oct.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/ec/ec2_oct.c b/src/lib/libcrypto/ec/ec2_oct.c index 3b8039af6e..c45d9c2219 100644 --- a/src/lib/libcrypto/ec/ec2_oct.c +++ b/src/lib/libcrypto/ec/ec2_oct.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ec2_oct.c,v 1.5 2014/07/12 16:03:37 miod Exp $ */ | 1 | /* $OpenBSD: ec2_oct.c,v 1.6 2015/02/08 22:25:03 miod Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. | 3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. |
4 | * | 4 | * |
@@ -183,7 +183,7 @@ ec_GF2m_simple_point2oct(const EC_GROUP *group, const EC_POINT *point, | |||
183 | ECerr(EC_F_EC_GF2M_SIMPLE_POINT2OCT, EC_R_INVALID_FORM); | 183 | ECerr(EC_F_EC_GF2M_SIMPLE_POINT2OCT, EC_R_INVALID_FORM); |
184 | goto err; | 184 | goto err; |
185 | } | 185 | } |
186 | if (EC_POINT_is_at_infinity(group, point)) { | 186 | if (EC_POINT_is_at_infinity(group, point) > 0) { |
187 | /* encodes to a single 0 octet */ | 187 | /* encodes to a single 0 octet */ |
188 | if (buf != NULL) { | 188 | if (buf != NULL) { |
189 | if (len < 1) { | 189 | if (len < 1) { |
@@ -363,8 +363,8 @@ ec_GF2m_simple_oct2point(const EC_GROUP *group, EC_POINT *point, | |||
363 | goto err; | 363 | goto err; |
364 | } | 364 | } |
365 | 365 | ||
366 | if (!EC_POINT_is_on_curve(group, point, ctx)) { | 366 | /* test required by X9.62 */ |
367 | /* test required by X9.62 */ | 367 | if (EC_POINT_is_on_curve(group, point, ctx) <= 0) { |
368 | ECerr(EC_F_EC_GF2M_SIMPLE_OCT2POINT, EC_R_POINT_IS_NOT_ON_CURVE); | 368 | ECerr(EC_F_EC_GF2M_SIMPLE_OCT2POINT, EC_R_POINT_IS_NOT_ON_CURVE); |
369 | goto err; | 369 | goto err; |
370 | } | 370 | } |