summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec/ec_lib.c
diff options
context:
space:
mode:
authortb <>2024-11-05 08:56:57 +0000
committertb <>2024-11-05 08:56:57 +0000
commitb03e1716d17e9653ae8fea32cead609adcf84251 (patch)
tree6cbf18ca727c5566b8ecfa0e0565758aff77e14d /src/lib/libcrypto/ec/ec_lib.c
parent12f0b7f7c165293139ae84e7743ac35e9daec51f (diff)
downloadopenbsd-b03e1716d17e9653ae8fea32cead609adcf84251.tar.gz
openbsd-b03e1716d17e9653ae8fea32cead609adcf84251.tar.bz2
openbsd-b03e1716d17e9653ae8fea32cead609adcf84251.zip
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
Diffstat (limited to 'src/lib/libcrypto/ec/ec_lib.c')
-rw-r--r--src/lib/libcrypto/ec/ec_lib.c4
1 files changed, 2 insertions, 2 deletions
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 @@
1/* $OpenBSD: ec_lib.c,v 1.78 2024/11/04 13:19:08 tb Exp $ */ 1/* $OpenBSD: ec_lib.c,v 1.79 2024/11/05 08:56:57 tb Exp $ */
2/* 2/*
3 * Originally written by Bodo Moeller for the OpenSSL project. 3 * Originally written by Bodo Moeller for the OpenSSL project.
4 */ 4 */
@@ -650,7 +650,7 @@ EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx_in)
650 } 650 }
651 if (!EC_POINT_mul(group, point, order, NULL, NULL, ctx)) 651 if (!EC_POINT_mul(group, point, order, NULL, NULL, ctx))
652 goto err; 652 goto err;
653 if (EC_POINT_is_at_infinity(group, point) <= 0) { 653 if (!EC_POINT_is_at_infinity(group, point)) {
654 ECerror(EC_R_INVALID_GROUP_ORDER); 654 ECerror(EC_R_INVALID_GROUP_ORDER);
655 goto err; 655 goto err;
656 } 656 }