From b03e1716d17e9653ae8fea32cead609adcf84251 Mon Sep 17 00:00:00 2001 From: tb <> Date: Tue, 5 Nov 2024 08:56:57 +0000 Subject: EC_POINT_is_at_infinity() returns a boolean This may have been different at some point in the past, but it may also have been a confusion with EC_POINT_is_on_curve() which, like any great API with a name implying a boolean return, actually has three possible return values. ok jsing --- src/lib/libcrypto/ec/ec_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/libcrypto/ec/ec_lib.c') diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c index 0d28df59ba..15e5055f34 100644 --- a/src/lib/libcrypto/ec/ec_lib.c +++ b/src/lib/libcrypto/ec/ec_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ec_lib.c,v 1.78 2024/11/04 13:19:08 tb Exp $ */ +/* $OpenBSD: ec_lib.c,v 1.79 2024/11/05 08:56:57 tb Exp $ */ /* * Originally written by Bodo Moeller for the OpenSSL project. */ @@ -650,7 +650,7 @@ EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx_in) } if (!EC_POINT_mul(group, point, order, NULL, NULL, ctx)) goto err; - if (EC_POINT_is_at_infinity(group, point) <= 0) { + if (!EC_POINT_is_at_infinity(group, point)) { ECerror(EC_R_INVALID_GROUP_ORDER); goto err; } -- cgit v1.2.3-55-g6feb