diff options
author | jsing <> | 2023-03-08 05:45:31 +0000 |
---|---|---|
committer | jsing <> | 2023-03-08 05:45:31 +0000 |
commit | f59a5e932baaa204327818534b8c93267c20bed0 (patch) | |
tree | 96a3d2dbc6ef11df6851b53d3d2e1c46dd7f2328 /src/lib/libcrypto/ec/ecp_nist.c | |
parent | 49f24f2af100d1cc94534c31f0db0ac8072ee4ac (diff) | |
download | openbsd-f59a5e932baaa204327818534b8c93267c20bed0.tar.gz openbsd-f59a5e932baaa204327818534b8c93267c20bed0.tar.bz2 openbsd-f59a5e932baaa204327818534b8c93267c20bed0.zip |
Always clear EC groups and points on free.
Rather than sometimes clearing, turn the free functions into ones that
always clear (as we've done elsewhere). Turn the EC_GROUP_clear_free() and
EC_POINT_clear_free() functions into wrappers that call the *_free()
version. Do similar for the EC_METHOD implementations, removing the
group_clear_finish() and point_clear_finish() hooks in the process.
ok tb@
Diffstat (limited to 'src/lib/libcrypto/ec/ecp_nist.c')
-rw-r--r-- | src/lib/libcrypto/ec/ecp_nist.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ec/ecp_nist.c b/src/lib/libcrypto/ec/ecp_nist.c index e3c13f7c65..b8fb5dc90f 100644 --- a/src/lib/libcrypto/ec/ecp_nist.c +++ b/src/lib/libcrypto/ec/ecp_nist.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ecp_nist.c,v 1.23 2023/03/08 04:50:27 jsing Exp $ */ | 1 | /* $OpenBSD: ecp_nist.c,v 1.24 2023/03/08 05:45:31 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Nils Larsch for the OpenSSL project. | 3 | * Written by Nils Larsch for the OpenSSL project. |
4 | */ | 4 | */ |
@@ -171,7 +171,6 @@ static const EC_METHOD ec_GFp_nist_method = { | |||
171 | .field_type = NID_X9_62_prime_field, | 171 | .field_type = NID_X9_62_prime_field, |
172 | .group_init = ec_GFp_simple_group_init, | 172 | .group_init = ec_GFp_simple_group_init, |
173 | .group_finish = ec_GFp_simple_group_finish, | 173 | .group_finish = ec_GFp_simple_group_finish, |
174 | .group_clear_finish = ec_GFp_simple_group_clear_finish, | ||
175 | .group_copy = ec_GFp_nist_group_copy, | 174 | .group_copy = ec_GFp_nist_group_copy, |
176 | .group_set_curve = ec_GFp_nist_group_set_curve, | 175 | .group_set_curve = ec_GFp_nist_group_set_curve, |
177 | .group_get_curve = ec_GFp_simple_group_get_curve, | 176 | .group_get_curve = ec_GFp_simple_group_get_curve, |
@@ -180,7 +179,6 @@ static const EC_METHOD ec_GFp_nist_method = { | |||
180 | .group_check_discriminant = ec_GFp_simple_group_check_discriminant, | 179 | .group_check_discriminant = ec_GFp_simple_group_check_discriminant, |
181 | .point_init = ec_GFp_simple_point_init, | 180 | .point_init = ec_GFp_simple_point_init, |
182 | .point_finish = ec_GFp_simple_point_finish, | 181 | .point_finish = ec_GFp_simple_point_finish, |
183 | .point_clear_finish = ec_GFp_simple_point_clear_finish, | ||
184 | .point_copy = ec_GFp_simple_point_copy, | 182 | .point_copy = ec_GFp_simple_point_copy, |
185 | .point_set_to_infinity = ec_GFp_simple_point_set_to_infinity, | 183 | .point_set_to_infinity = ec_GFp_simple_point_set_to_infinity, |
186 | .point_set_Jprojective_coordinates = | 184 | .point_set_Jprojective_coordinates = |