summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2023-07-26 11:58:34 +0000
committertb <>2023-07-26 11:58:34 +0000
commit90340319d5c3aaa4aafab37d65055a6f43025434 (patch)
treeda1c09367b667124f7ca0e80a9fd490b35779bd9
parentdf2992cf4d9c142739cbf358748187592c1679de (diff)
downloadopenbsd-90340319d5c3aaa4aafab37d65055a6f43025434.tar.gz
openbsd-90340319d5c3aaa4aafab37d65055a6f43025434.tar.bz2
openbsd-90340319d5c3aaa4aafab37d65055a6f43025434.zip
Use EC_POINT_set_to_infinity() rather than inlining it
-rw-r--r--src/lib/libcrypto/ec/ecp_smpl.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/libcrypto/ec/ecp_smpl.c b/src/lib/libcrypto/ec/ecp_smpl.c
index dab381721c..d270d495b8 100644
--- a/src/lib/libcrypto/ec/ecp_smpl.c
+++ b/src/lib/libcrypto/ec/ecp_smpl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecp_smpl.c,v 1.48 2023/07/25 10:00:04 tb Exp $ */ 1/* $OpenBSD: ecp_smpl.c,v 1.49 2023/07/26 11:58:34 tb Exp $ */
2/* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> 2/* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de>
3 * for the OpenSSL project. 3 * for the OpenSSL project.
4 * Includes code written by Bodo Moeller for the OpenSSL project. 4 * Includes code written by Bodo Moeller for the OpenSSL project.
@@ -704,11 +704,9 @@ ec_GFp_simple_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_CTX
704 BIGNUM *n0, *n1, *n2, *n3; 704 BIGNUM *n0, *n1, *n2, *n3;
705 int ret = 0; 705 int ret = 0;
706 706
707 if (EC_POINT_is_at_infinity(group, a) > 0) { 707 if (EC_POINT_is_at_infinity(group, a) > 0)
708 BN_zero(&r->Z); 708 return EC_POINT_set_to_infinity(group, r);
709 r->Z_is_one = 0; 709
710 return 1;
711 }
712 field_mul = group->meth->field_mul; 710 field_mul = group->meth->field_mul;
713 field_sqr = group->meth->field_sqr; 711 field_sqr = group->meth->field_sqr;
714 p = &group->field; 712 p = &group->field;