diff options
| author | jsing <> | 2023-03-08 04:50:27 +0000 |
|---|---|---|
| committer | jsing <> | 2023-03-08 04:50:27 +0000 |
| commit | c1e53bad96443f0f9eea47910c725fb8cb5636ac (patch) | |
| tree | 3c4980fe37e68835a8cfd79b0b18e7d38f9c023b /src/lib/libcrypto/ec/ecp_nist.c | |
| parent | ecd1f4763943bcfd15caa4b48ac41a4b1f90be7a (diff) | |
| download | openbsd-c1e53bad96443f0f9eea47910c725fb8cb5636ac.tar.gz openbsd-c1e53bad96443f0f9eea47910c725fb8cb5636ac.tar.bz2 openbsd-c1e53bad96443f0f9eea47910c725fb8cb5636ac.zip | |
Remove EC_FLAGS_DEFAULT_OCT.
The EC code has an amazing array of function pointer hooks, such that a
method can hook into almost any operation... and then there is the
EC_FLAGS_DEFAULT_OCT flag, which adds a bunch of complex code and #ifdef
so you can avoid setting three of those function pointers!
Remove EC_FLAGS_DEFAULT_OCT, the now unused flags field from EC_METHOD,
along with the various code that was wrapped in EC_FLAGS_DEFAULT_OCT,
setting the three function pointers that need to be set in each of the
EC_METHODs.
ok beck@ tb@
Diffstat (limited to 'src/lib/libcrypto/ec/ecp_nist.c')
| -rw-r--r-- | src/lib/libcrypto/ec/ecp_nist.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ec/ecp_nist.c b/src/lib/libcrypto/ec/ecp_nist.c index 3a81a0e8d9..e3c13f7c65 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.22 2023/03/07 05:45:14 jsing Exp $ */ | 1 | /* $OpenBSD: ecp_nist.c,v 1.23 2023/03/08 04:50:27 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Nils Larsch for the OpenSSL project. | 3 | * Written by Nils Larsch for the OpenSSL project. |
| 4 | */ | 4 | */ |
| @@ -168,7 +168,6 @@ ec_GFp_nist_field_sqr(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, | |||
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | static const EC_METHOD ec_GFp_nist_method = { | 170 | static const EC_METHOD ec_GFp_nist_method = { |
| 171 | .flags = EC_FLAGS_DEFAULT_OCT, | ||
| 172 | .field_type = NID_X9_62_prime_field, | 171 | .field_type = NID_X9_62_prime_field, |
| 173 | .group_init = ec_GFp_simple_group_init, | 172 | .group_init = ec_GFp_simple_group_init, |
| 174 | .group_finish = ec_GFp_simple_group_finish, | 173 | .group_finish = ec_GFp_simple_group_finish, |
| @@ -192,6 +191,10 @@ static const EC_METHOD ec_GFp_nist_method = { | |||
| 192 | ec_GFp_simple_point_set_affine_coordinates, | 191 | ec_GFp_simple_point_set_affine_coordinates, |
| 193 | .point_get_affine_coordinates = | 192 | .point_get_affine_coordinates = |
| 194 | ec_GFp_simple_point_get_affine_coordinates, | 193 | ec_GFp_simple_point_get_affine_coordinates, |
| 194 | .point_set_compressed_coordinates = | ||
| 195 | ec_GFp_simple_set_compressed_coordinates, | ||
| 196 | .point2oct = ec_GFp_simple_point2oct, | ||
| 197 | .oct2point = ec_GFp_simple_oct2point, | ||
| 195 | .add = ec_GFp_simple_add, | 198 | .add = ec_GFp_simple_add, |
| 196 | .dbl = ec_GFp_simple_dbl, | 199 | .dbl = ec_GFp_simple_dbl, |
| 197 | .invert = ec_GFp_simple_invert, | 200 | .invert = ec_GFp_simple_invert, |
