diff options
author | tb <> | 2023-07-26 12:16:55 +0000 |
---|---|---|
committer | tb <> | 2023-07-26 12:16:55 +0000 |
commit | 7ddfedb8239257acd9515c7a6b28b9dbbbde2cc6 (patch) | |
tree | 798a471f1517cb31ae16d0657319196cef7f3c0f | |
parent | 358c3ca483c0d97eb85d267582df13747b40d549 (diff) | |
download | openbsd-7ddfedb8239257acd9515c7a6b28b9dbbbde2cc6.tar.gz openbsd-7ddfedb8239257acd9515c7a6b28b9dbbbde2cc6.tar.bz2 openbsd-7ddfedb8239257acd9515c7a6b28b9dbbbde2cc6.zip |
Garbage collect the unused order in check_discriminant()
ok jsing
-rw-r--r-- | src/lib/libcrypto/ec/ecp_smpl.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/libcrypto/ec/ecp_smpl.c b/src/lib/libcrypto/ec/ecp_smpl.c index 1a467d4f8f..0fd751a2a3 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.51 2023/07/26 12:16:13 tb Exp $ */ | 1 | /* $OpenBSD: ecp_smpl.c,v 1.52 2023/07/26 12:16:55 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. |
@@ -203,7 +203,7 @@ ec_GFp_simple_group_get_degree(const EC_GROUP *group) | |||
203 | int | 203 | int |
204 | ec_GFp_simple_group_check_discriminant(const EC_GROUP *group, BN_CTX *ctx) | 204 | ec_GFp_simple_group_check_discriminant(const EC_GROUP *group, BN_CTX *ctx) |
205 | { | 205 | { |
206 | BIGNUM *p, *a, *b, *order, *tmp_1, *tmp_2; | 206 | BIGNUM *p, *a, *b, *tmp_1, *tmp_2; |
207 | int ret = 0; | 207 | int ret = 0; |
208 | 208 | ||
209 | BN_CTX_start(ctx); | 209 | BN_CTX_start(ctx); |
@@ -218,8 +218,6 @@ ec_GFp_simple_group_check_discriminant(const EC_GROUP *group, BN_CTX *ctx) | |||
218 | goto err; | 218 | goto err; |
219 | if ((tmp_2 = BN_CTX_get(ctx)) == NULL) | 219 | if ((tmp_2 = BN_CTX_get(ctx)) == NULL) |
220 | goto err; | 220 | goto err; |
221 | if ((order = BN_CTX_get(ctx)) == NULL) | ||
222 | goto err; | ||
223 | 221 | ||
224 | if (!EC_GROUP_get_curve(group, p, a, b, ctx)) | 222 | if (!EC_GROUP_get_curve(group, p, a, b, ctx)) |
225 | goto err; | 223 | goto err; |