diff options
Diffstat (limited to 'src/lib/libcrypto/ec/ec2_smpl.c')
| -rw-r--r-- | src/lib/libcrypto/ec/ec2_smpl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/ec/ec2_smpl.c b/src/lib/libcrypto/ec/ec2_smpl.c index b6c06a45a2..b4d7f5db2e 100644 --- a/src/lib/libcrypto/ec/ec2_smpl.c +++ b/src/lib/libcrypto/ec/ec2_smpl.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec2_smpl.c,v 1.26 2022/11/24 01:24:37 jsing Exp $ */ | 1 | /* $OpenBSD: ec2_smpl.c,v 1.27 2022/11/24 01:30:01 jsing Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. | 3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. |
| 4 | * | 4 | * |
| @@ -186,9 +186,9 @@ ec_GF2m_simple_group_copy(EC_GROUP *dest, const EC_GROUP *src) | |||
| 186 | dest->poly[3] = src->poly[3]; | 186 | dest->poly[3] = src->poly[3]; |
| 187 | dest->poly[4] = src->poly[4]; | 187 | dest->poly[4] = src->poly[4]; |
| 188 | dest->poly[5] = src->poly[5]; | 188 | dest->poly[5] = src->poly[5]; |
| 189 | if (bn_expand(&dest->a, dest->poly[0]) == NULL) | 189 | if (!bn_expand(&dest->a, dest->poly[0])) |
| 190 | return 0; | 190 | return 0; |
| 191 | if (bn_expand(&dest->b, dest->poly[0]) == NULL) | 191 | if (!bn_expand(&dest->b, dest->poly[0])) |
| 192 | return 0; | 192 | return 0; |
| 193 | for (i = dest->a.top; i < dest->a.dmax; i++) | 193 | for (i = dest->a.top; i < dest->a.dmax; i++) |
| 194 | dest->a.d[i] = 0; | 194 | dest->a.d[i] = 0; |
| @@ -216,7 +216,7 @@ ec_GF2m_simple_group_set_curve(EC_GROUP *group, | |||
| 216 | /* group->a */ | 216 | /* group->a */ |
| 217 | if (!BN_GF2m_mod_arr(&group->a, a, group->poly)) | 217 | if (!BN_GF2m_mod_arr(&group->a, a, group->poly)) |
| 218 | goto err; | 218 | goto err; |
| 219 | if (bn_expand(&group->a, group->poly[0]) == NULL) | 219 | if (!bn_expand(&group->a, group->poly[0])) |
| 220 | goto err; | 220 | goto err; |
| 221 | for (i = group->a.top; i < group->a.dmax; i++) | 221 | for (i = group->a.top; i < group->a.dmax; i++) |
| 222 | group->a.d[i] = 0; | 222 | group->a.d[i] = 0; |
| @@ -224,7 +224,7 @@ ec_GF2m_simple_group_set_curve(EC_GROUP *group, | |||
| 224 | /* group->b */ | 224 | /* group->b */ |
| 225 | if (!BN_GF2m_mod_arr(&group->b, b, group->poly)) | 225 | if (!BN_GF2m_mod_arr(&group->b, b, group->poly)) |
| 226 | goto err; | 226 | goto err; |
| 227 | if (bn_expand(&group->b, group->poly[0]) == NULL) | 227 | if (!bn_expand(&group->b, group->poly[0])) |
| 228 | goto err; | 228 | goto err; |
| 229 | for (i = group->b.top; i < group->b.dmax; i++) | 229 | for (i = group->b.top; i < group->b.dmax; i++) |
| 230 | group->b.d[i] = 0; | 230 | group->b.d[i] = 0; |
