summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec/ec_key.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_key.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_key.c')
-rw-r--r--src/lib/libcrypto/ec/ec_key.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ec/ec_key.c b/src/lib/libcrypto/ec/ec_key.c
index 38a5582ba0..21c22823f9 100644
--- a/src/lib/libcrypto/ec/ec_key.c
+++ b/src/lib/libcrypto/ec/ec_key.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_key.c,v 1.41 2024/10/22 12:02:43 tb Exp $ */ 1/* $OpenBSD: ec_key.c,v 1.42 2024/11/05 08:56:57 tb Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project. 3 * Written by Nils Larsch for the OpenSSL project.
4 */ 4 */
@@ -287,7 +287,7 @@ EC_KEY_check_key(const EC_KEY *eckey)
287 goto err; 287 goto err;
288 } 288 }
289 289
290 if (EC_POINT_is_at_infinity(eckey->group, eckey->pub_key) > 0) { 290 if (EC_POINT_is_at_infinity(eckey->group, eckey->pub_key)) {
291 ECerror(EC_R_POINT_AT_INFINITY); 291 ECerror(EC_R_POINT_AT_INFINITY);
292 goto err; 292 goto err;
293 } 293 }
@@ -313,7 +313,7 @@ EC_KEY_check_key(const EC_KEY *eckey)
313 ECerror(ERR_R_EC_LIB); 313 ECerror(ERR_R_EC_LIB);
314 goto err; 314 goto err;
315 } 315 }
316 if (EC_POINT_is_at_infinity(eckey->group, point) <= 0) { 316 if (!EC_POINT_is_at_infinity(eckey->group, point)) {
317 ECerror(EC_R_WRONG_ORDER); 317 ECerror(EC_R_WRONG_ORDER);
318 goto err; 318 goto err;
319 } 319 }