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/ec2_smpl.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/ec2_smpl.c')
| -rw-r--r-- | src/lib/libcrypto/ec/ec2_smpl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ec/ec2_smpl.c b/src/lib/libcrypto/ec/ec2_smpl.c index c7ea0d9765..f995ff8718 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.31 2023/03/07 09:27:10 jsing Exp $ */ | 1 | /* $OpenBSD: ec2_smpl.c,v 1.32 2023/03/08 04:50:27 jsing Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. | 3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. |
| 4 | * | 4 | * |
| @@ -724,7 +724,6 @@ ec_GF2m_simple_field_div(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, | |||
| 724 | } | 724 | } |
| 725 | 725 | ||
| 726 | static const EC_METHOD ec_GF2m_simple_method = { | 726 | static const EC_METHOD ec_GF2m_simple_method = { |
| 727 | .flags = EC_FLAGS_DEFAULT_OCT, | ||
| 728 | .field_type = NID_X9_62_characteristic_two_field, | 727 | .field_type = NID_X9_62_characteristic_two_field, |
| 729 | .group_init = ec_GF2m_simple_group_init, | 728 | .group_init = ec_GF2m_simple_group_init, |
| 730 | .group_finish = ec_GF2m_simple_group_finish, | 729 | .group_finish = ec_GF2m_simple_group_finish, |
| @@ -744,6 +743,10 @@ static const EC_METHOD ec_GF2m_simple_method = { | |||
| 744 | ec_GF2m_simple_point_set_affine_coordinates, | 743 | ec_GF2m_simple_point_set_affine_coordinates, |
| 745 | .point_get_affine_coordinates = | 744 | .point_get_affine_coordinates = |
| 746 | ec_GF2m_simple_point_get_affine_coordinates, | 745 | ec_GF2m_simple_point_get_affine_coordinates, |
| 746 | .point_set_compressed_coordinates = | ||
| 747 | ec_GF2m_simple_set_compressed_coordinates, | ||
| 748 | .point2oct = ec_GF2m_simple_point2oct, | ||
| 749 | .oct2point = ec_GF2m_simple_oct2point, | ||
| 747 | .add = ec_GF2m_simple_add, | 750 | .add = ec_GF2m_simple_add, |
| 748 | .dbl = ec_GF2m_simple_dbl, | 751 | .dbl = ec_GF2m_simple_dbl, |
| 749 | .invert = ec_GF2m_simple_invert, | 752 | .invert = ec_GF2m_simple_invert, |
