summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec/ec_local.h
diff options
context:
space:
mode:
authortb <>2023-06-25 18:52:27 +0000
committertb <>2023-06-25 18:52:27 +0000
commit70d8987d04d28fe256835167778ab28f3e6bdd3c (patch)
tree0df2834b9d3887c87ec022222f74c206da81e21c /src/lib/libcrypto/ec/ec_local.h
parent1f1e97550126828f07750399c2a4acd3af28df1b (diff)
downloadopenbsd-70d8987d04d28fe256835167778ab28f3e6bdd3c.tar.gz
openbsd-70d8987d04d28fe256835167778ab28f3e6bdd3c.tar.bz2
openbsd-70d8987d04d28fe256835167778ab28f3e6bdd3c.zip
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
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/ec/ec_local.h27
1 files changed, 1 insertions, 26 deletions
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 @@
1/* $OpenBSD: ec_local.h,v 1.18 2023/06/25 07:50:37 tb Exp $ */ 1/* $OpenBSD: ec_local.h,v 1.19 2023/06/25 18:52:27 tb Exp $ */
2/* 2/*
3 * Originally written by Bodo Moeller for the OpenSSL project. 3 * Originally written by Bodo Moeller for the OpenSSL project.
4 */ 4 */
@@ -173,14 +173,6 @@ struct ec_method_st {
173 BN_CTX *ctx); 173 BN_CTX *ctx);
174} /* EC_METHOD */; 174} /* EC_METHOD */;
175 175
176typedef struct ec_extra_data_st {
177 struct ec_extra_data_st *next;
178 void *data;
179 void *(*dup_func)(void *);
180 void (*free_func)(void *);
181 void (*clear_free_func)(void *);
182} EC_EXTRA_DATA; /* used in EC_GROUP */
183
184struct ec_group_st { 176struct ec_group_st {
185 /* 177 /*
186 * Methods and members exposed via the public API. 178 * Methods and members exposed via the public API.
@@ -260,26 +252,9 @@ struct ec_key_st {
260 int references; 252 int references;
261 int flags; 253 int flags;
262 254
263 EC_EXTRA_DATA *method_data;
264 CRYPTO_EX_DATA ex_data; 255 CRYPTO_EX_DATA ex_data;
265} /* EC_KEY */; 256} /* EC_KEY */;
266 257
267/* Basically a 'mixin' for extra data, but available for EC_GROUPs/EC_KEYs only
268 * (with visibility limited to 'package' level for now).
269 * We use the function pointers as index for retrieval; this obviates
270 * global ex_data-style index tables.
271 */
272int EC_EX_DATA_set_data(EC_EXTRA_DATA **, void *data,
273 void *(*dup_func)(void *), void (*free_func)(void *), void (*clear_free_func)(void *));
274void *EC_EX_DATA_get_data(const EC_EXTRA_DATA *,
275 void *(*dup_func)(void *), void (*free_func)(void *), void (*clear_free_func)(void *));
276void EC_EX_DATA_free_data(EC_EXTRA_DATA **,
277 void *(*dup_func)(void *), void (*free_func)(void *), void (*clear_free_func)(void *));
278void EC_EX_DATA_clear_free_data(EC_EXTRA_DATA **,
279 void *(*dup_func)(void *), void (*free_func)(void *), void (*clear_free_func)(void *));
280void EC_EX_DATA_free_all_data(EC_EXTRA_DATA **);
281void EC_EX_DATA_clear_free_all_data(EC_EXTRA_DATA **);
282
283struct ec_point_st { 258struct ec_point_st {
284 const EC_METHOD *meth; 259 const EC_METHOD *meth;
285 260