EC_POINT_is_on_curve is documented to return -1 on error, 0 if it's not
on the curve, and 1 if it is on the curve.

However, this breaks the standard idiom if(!EC_POINT_is_on_curve()) {
return BAD_KEY; }, because it requires an additional test for an error
condition.

I don't know what the best outcome would be in this situation.

-Kyle H

On 7/11/2014 12:34 AM, balaji marisetti wrote:
> Hi All,
>
> I have a doubt. Shouldn't the `EC_POINT_...` methods be returning -1
> instead of 0 on error conditions?
>
> Thanks,
> Balaji M
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> Development Mailing List                       openssl-dev@openssl.org
> Automated List Manager                           majord...@openssl.org


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to