summaryrefslogtreecommitdiffstats
path: root/crypto/ec
diff options
context:
space:
mode:
authorBilly Brumley <bbrumley@gmail.com>2018-08-22 11:27:34 +0200
committerRichard Levitte <levitte@openssl.org>2018-09-03 20:25:41 +0200
commitbfb10b975818d1887d676d309fcc21a765611f6d (patch)
treee59a2271bcfc2308d85e4b7e50b64c511cc0377e /crypto/ec
parent[test] ECC: make sure negative tests pass for the right reasons (diff)
downloadopenssl-bfb10b975818d1887d676d309fcc21a765611f6d.tar.xz
openssl-bfb10b975818d1887d676d309fcc21a765611f6d.zip
[test] throw error from wrapper function instead of an EC_METHOD specific one
Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7028)
Diffstat (limited to 'crypto/ec')
-rw-r--r--crypto/ec/ec_lib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c
index 2204152c3c..b89e3979d9 100644
--- a/crypto/ec/ec_lib.c
+++ b/crypto/ec/ec_lib.c
@@ -757,6 +757,10 @@ int EC_POINT_get_affine_coordinates(const EC_GROUP *group,
ECerr(EC_F_EC_POINT_GET_AFFINE_COORDINATES, EC_R_INCOMPATIBLE_OBJECTS);
return 0;
}
+ if (EC_POINT_is_at_infinity(group, point)) {
+ ECerr(EC_F_EC_POINT_GET_AFFINE_COORDINATES, EC_R_POINT_AT_INFINITY);
+ return 0;
+ }
return group->meth->point_get_affine_coordinates(group, point, x, y, ctx);
}