summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2023-07-25 10:00:04 +0000
committertb <>2023-07-25 10:00:04 +0000
commit602988a157776fbc867bdc728f0d59c9d4711e76 (patch)
tree18e032511e3b452337b537d0d6bd6f229debadea
parent36ab05eb184cf16db99f028bed807bdae54b787d (diff)
downloadopenbsd-602988a157776fbc867bdc728f0d59c9d4711e76.tar.gz
openbsd-602988a157776fbc867bdc728f0d59c9d4711e76.tar.bz2
openbsd-602988a157776fbc867bdc728f0d59c9d4711e76.zip
Fix a few more 0/NULL misspellings
-rw-r--r--src/lib/libcrypto/ec/ecp_smpl.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libcrypto/ec/ecp_smpl.c b/src/lib/libcrypto/ec/ecp_smpl.c
index 3388b99143..dab381721c 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.47 2023/07/25 08:10:30 tb Exp $ */ 1/* $OpenBSD: ecp_smpl.c,v 1.48 2023/07/25 10:00:04 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.
@@ -140,7 +140,7 @@ ec_GFp_simple_group_set_curve(EC_GROUP *group,
140 /* group->a */ 140 /* group->a */
141 if (!BN_nnmod(tmp_a, a, p, ctx)) 141 if (!BN_nnmod(tmp_a, a, p, ctx))
142 goto err; 142 goto err;
143 if (group->meth->field_encode) { 143 if (group->meth->field_encode != NULL) {
144 if (!group->meth->field_encode(group, &group->a, tmp_a, ctx)) 144 if (!group->meth->field_encode(group, &group->a, tmp_a, ctx))
145 goto err; 145 goto err;
146 } else if (!bn_copy(&group->a, tmp_a)) 146 } else if (!bn_copy(&group->a, tmp_a))
@@ -149,7 +149,7 @@ ec_GFp_simple_group_set_curve(EC_GROUP *group,
149 /* group->b */ 149 /* group->b */
150 if (!BN_nnmod(&group->b, b, p, ctx)) 150 if (!BN_nnmod(&group->b, b, p, ctx))
151 goto err; 151 goto err;
152 if (group->meth->field_encode) 152 if (group->meth->field_encode != NULL)
153 if (!group->meth->field_encode(group, &group->b, &group->b, ctx)) 153 if (!group->meth->field_encode(group, &group->b, &group->b, ctx))
154 goto err; 154 goto err;
155 155
@@ -341,7 +341,7 @@ ec_GFp_simple_set_Jprojective_coordinates(const EC_GROUP *group,
341 goto err; 341 goto err;
342 Z_is_one = BN_is_one(&point->Z); 342 Z_is_one = BN_is_one(&point->Z);
343 if (group->meth->field_encode != NULL) { 343 if (group->meth->field_encode != NULL) {
344 if (Z_is_one && (group->meth->field_set_to_one != 0)) { 344 if (Z_is_one && (group->meth->field_set_to_one != NULL)) {
345 if (!group->meth->field_set_to_one(group, &point->Z, ctx)) 345 if (!group->meth->field_set_to_one(group, &point->Z, ctx))
346 goto err; 346 goto err;
347 } else { 347 } else {
@@ -469,7 +469,7 @@ ec_GFp_simple_point_get_affine_coordinates(const EC_GROUP *group, const EC_POINT
469 ECerror(ERR_R_BN_LIB); 469 ECerror(ERR_R_BN_LIB);
470 goto err; 470 goto err;
471 } 471 }
472 if (group->meth->field_encode == 0) { 472 if (group->meth->field_encode == NULL) {
473 /* field_sqr works on standard representation */ 473 /* field_sqr works on standard representation */
474 if (!group->meth->field_sqr(group, Z_2, Z_1, ctx)) 474 if (!group->meth->field_sqr(group, Z_2, Z_1, ctx))
475 goto err; 475 goto err;
@@ -487,7 +487,7 @@ ec_GFp_simple_point_get_affine_coordinates(const EC_GROUP *group, const EC_POINT
487 goto err; 487 goto err;
488 } 488 }
489 if (y != NULL) { 489 if (y != NULL) {
490 if (group->meth->field_encode == 0) { 490 if (group->meth->field_encode == NULL) {
491 /* field_mul works on standard representation */ 491 /* field_mul works on standard representation */
492 if (!group->meth->field_mul(group, Z_3, Z_2, Z_1, ctx)) 492 if (!group->meth->field_mul(group, Z_3, Z_2, Z_1, ctx))
493 goto err; 493 goto err;
@@ -1162,7 +1162,7 @@ ec_GFp_simple_points_make_affine(const EC_GROUP *group, size_t num, EC_POINT *po
1162 goto err; 1162 goto err;
1163 } 1163 }
1164 } 1164 }
1165 if (group->meth->field_encode != 0) { 1165 if (group->meth->field_encode != NULL) {
1166 /* 1166 /*
1167 * in the Montgomery case, we just turned R*H (representing 1167 * in the Montgomery case, we just turned R*H (representing
1168 * H) into 1/(R*H), but we need R*(1/H) (representing 1168 * H) into 1/(R*H), but we need R*(1/H) (representing
@@ -1212,7 +1212,7 @@ ec_GFp_simple_points_make_affine(const EC_GROUP *group, size_t num, EC_POINT *po
1212 if (!group->meth->field_mul(group, &p->Y, &p->Y, tmp1, ctx)) 1212 if (!group->meth->field_mul(group, &p->Y, &p->Y, tmp1, ctx))
1213 goto err; 1213 goto err;
1214 1214
1215 if (group->meth->field_set_to_one != 0) { 1215 if (group->meth->field_set_to_one != NULL) {
1216 if (!group->meth->field_set_to_one(group, &p->Z, ctx)) 1216 if (!group->meth->field_set_to_one(group, &p->Z, ctx))
1217 goto err; 1217 goto err;
1218 } else { 1218 } else {