From b60bbdf8219ec24f77b8e7e83287a5eaab014cc3 Mon Sep 17 00:00:00 2001 From: tb <> Date: Sun, 25 Jun 2023 18:52:27 +0000 Subject: Remove EC_EXTRA_DATA With the ecdh_check() and ecdsa_check() abominations gone, we can finally get rid of EC_EXTRA_DATA and EC_KEY_{get,insert}_key_method_data(). The EC_EX_DATA_*() handlers, (which fortunately have always had "'package' level visibility") join the ride to the great bit bucket in the sky. Thanks to op for making this possible. ok jsing --- src/lib/libcrypto/ec/ec_local.h | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'src/lib/libcrypto/ec/ec_local.h') diff --git a/src/lib/libcrypto/ec/ec_local.h b/src/lib/libcrypto/ec/ec_local.h index eb0d6a82a6..6913cb5683 100644 --- a/src/lib/libcrypto/ec/ec_local.h +++ b/src/lib/libcrypto/ec/ec_local.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ec_local.h,v 1.18 2023/06/25 07:50:37 tb Exp $ */ +/* $OpenBSD: ec_local.h,v 1.19 2023/06/25 18:52:27 tb Exp $ */ /* * Originally written by Bodo Moeller for the OpenSSL project. */ @@ -173,14 +173,6 @@ struct ec_method_st { BN_CTX *ctx); } /* EC_METHOD */; -typedef struct ec_extra_data_st { - struct ec_extra_data_st *next; - void *data; - void *(*dup_func)(void *); - void (*free_func)(void *); - void (*clear_free_func)(void *); -} EC_EXTRA_DATA; /* used in EC_GROUP */ - struct ec_group_st { /* * Methods and members exposed via the public API. @@ -260,26 +252,9 @@ struct ec_key_st { int references; int flags; - EC_EXTRA_DATA *method_data; CRYPTO_EX_DATA ex_data; } /* EC_KEY */; -/* Basically a 'mixin' for extra data, but available for EC_GROUPs/EC_KEYs only - * (with visibility limited to 'package' level for now). - * We use the function pointers as index for retrieval; this obviates - * global ex_data-style index tables. - */ -int EC_EX_DATA_set_data(EC_EXTRA_DATA **, void *data, - void *(*dup_func)(void *), void (*free_func)(void *), void (*clear_free_func)(void *)); -void *EC_EX_DATA_get_data(const EC_EXTRA_DATA *, - void *(*dup_func)(void *), void (*free_func)(void *), void (*clear_free_func)(void *)); -void EC_EX_DATA_free_data(EC_EXTRA_DATA **, - void *(*dup_func)(void *), void (*free_func)(void *), void (*clear_free_func)(void *)); -void EC_EX_DATA_clear_free_data(EC_EXTRA_DATA **, - void *(*dup_func)(void *), void (*free_func)(void *), void (*clear_free_func)(void *)); -void EC_EX_DATA_free_all_data(EC_EXTRA_DATA **); -void EC_EX_DATA_clear_free_all_data(EC_EXTRA_DATA **); - struct ec_point_st { const EC_METHOD *meth; -- cgit v1.2.3-55-g6feb