summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec/ecp_nistp521.c
diff options
context:
space:
mode:
authormiod <>2015-02-08 22:25:03 +0000
committermiod <>2015-02-08 22:25:03 +0000
commit6f9f33882d30bbe9a307e44c69c4f3e22302b332 (patch)
tree39229584702a732ee11613b8adc170ac872553d0 /src/lib/libcrypto/ec/ecp_nistp521.c
parent9322a0e595ac66c623d245670e741aa5cc9c2aad (diff)
downloadopenbsd-6f9f33882d30bbe9a307e44c69c4f3e22302b332.tar.gz
openbsd-6f9f33882d30bbe9a307e44c69c4f3e22302b332.tar.bz2
openbsd-6f9f33882d30bbe9a307e44c69c4f3e22302b332.zip
Use `> 0' instead of `!= 0' as a successful condition for
EC_POINT_is_at_infinity() and EC_POINT_is_on_curve(), for they may return -1 should an error arise. ok doug@ jsing@
Diffstat (limited to 'src/lib/libcrypto/ec/ecp_nistp521.c')
-rw-r--r--src/lib/libcrypto/ec/ecp_nistp521.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ec/ecp_nistp521.c b/src/lib/libcrypto/ec/ecp_nistp521.c
index c9313ada8e..6382091cf9 100644
--- a/src/lib/libcrypto/ec/ecp_nistp521.c
+++ b/src/lib/libcrypto/ec/ecp_nistp521.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecp_nistp521.c,v 1.15 2014/07/12 16:03:37 miod Exp $ */ 1/* $OpenBSD: ecp_nistp521.c,v 1.16 2015/02/08 22:25:03 miod Exp $ */
2/* 2/*
3 * Written by Adam Langley (Google) for the OpenSSL project 3 * Written by Adam Langley (Google) for the OpenSSL project
4 */ 4 */
@@ -1738,7 +1738,7 @@ ec_GFp_nistp521_point_get_affine_coordinates(const EC_GROUP * group,
1738 felem z1, z2, x_in, y_in, x_out, y_out; 1738 felem z1, z2, x_in, y_in, x_out, y_out;
1739 largefelem tmp; 1739 largefelem tmp;
1740 1740
1741 if (EC_POINT_is_at_infinity(group, point)) { 1741 if (EC_POINT_is_at_infinity(group, point) > 0) {
1742 ECerr(EC_F_EC_GFP_NISTP521_POINT_GET_AFFINE_COORDINATES, 1742 ECerr(EC_F_EC_GFP_NISTP521_POINT_GET_AFFINE_COORDINATES,
1743 EC_R_POINT_AT_INFINITY); 1743 EC_R_POINT_AT_INFINITY);
1744 return 0; 1744 return 0;