EC_POINT_is_on_curve does not return a boolean
authorMatt Caswell <matt@openssl.org>
Thu, 4 Jun 2015 13:22:00 +0000 (14:22 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 10 Jun 2015 09:51:17 +0000 (10:51 +0100)
commitd163a2cc46709ba31e91887c65d32743913d3db3
tree1eb3d2ac78f18f5f2c53cf988bdb66c329ea1fe7
parent72df35acf268e21adfe5b90b89f90e35e9db29bf
EC_POINT_is_on_curve does not return a boolean

The function EC_POINT_is_on_curve does not return a boolean value.
It returns 1 if the point is on the curve, 0 if it is not, and -1
on error. Many usages within OpenSSL were incorrectly using this
function and therefore not correctly handling error conditions.

With thanks to the Open Crypto Audit Project for reporting this issue.

Reviewed-by: Kurt Roeckx <kurt@openssl.org>
(cherry picked from commit 68886be7e2cd395a759fcd41d2cede461b68843d)
crypto/ec/ec2_oct.c
crypto/ec/ec_check.c
crypto/ec/ec_key.c
crypto/ec/ec_lib.c
crypto/ec/ecp_oct.c
crypto/ec/ectest.c