Always clear EC groups and points on free.
authorjsing <jsing@openbsd.org>
Wed, 8 Mar 2023 05:45:31 +0000 (05:45 +0000)
committerjsing <jsing@openbsd.org>
Wed, 8 Mar 2023 05:45:31 +0000 (05:45 +0000)
commita7854573db165b31592c3760a6e4c244b25bc76b
tree35a3e0637888dae053eb5578a152153f069741cd
parenteb0436eb61f4a79d509fc5906e055b3fc255a32a
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@
lib/libcrypto/ec/ec.h
lib/libcrypto/ec/ec2_smpl.c
lib/libcrypto/ec/ec_asn1.c
lib/libcrypto/ec/ec_lib.c
lib/libcrypto/ec/ec_local.h
lib/libcrypto/ec/ec_mult.c
lib/libcrypto/ec/ec_print.c
lib/libcrypto/ec/ecp_mont.c
lib/libcrypto/ec/ecp_nist.c
lib/libcrypto/ec/ecp_smpl.c