diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2024-08-02 10:48:55 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2024-08-02 10:48:55 +0000 |
commit | c7db3a47257155522dad9fa01445f1ff555daee1 (patch) | |
tree | 03cecfd23822a8634e7ee804add4ffd9b0165dad /lib/libcrypto/Makefile | |
parent | 933661d9218cd87ac2f32adceba17f099cdedb2d (diff) |
Rewrite CRYPTO_EX_DATA.
CRYPTO_EX_DATA exists as a way to allow an application to attach data to
various components in libcrypto and libssl. The general idea is that there
are various "classes" (e.g. RSA) and an application can get an "index"
(which can have new/dup/free functions provided). The application can then
use the index to store a pointer to some form of data within that class,
for later retrieval.
However, even by OpenSSL standards, this is an insane API. The current
implementation allows for data to be set without calling new, indexes
can be used without allocation, new can be called without actually getting
an index and dup can be called either after new or without new (see regress
and RSA_get_ex_new_index(3)/CRYPTO_set_ex_data(3) for more details). On
top of this, the previous "overhaul" of the code was written to be
infinitely extensible.
For now, the rewrite intends to maintain the existing behaviour - once we
bed this down we can attempt to ratchet the API requirements and require
some sort of sensible sequence. The only intentional change is that there
is now a hard limit on the number of indexes that can be allocated
(previously there was none, relying only on ENOMEM).
ok tb@
Diffstat (limited to 'lib/libcrypto/Makefile')
-rw-r--r-- | lib/libcrypto/Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcrypto/Makefile b/lib/libcrypto/Makefile index ef26b0c5f5d..26e76bba2d7 100644 --- a/lib/libcrypto/Makefile +++ b/lib/libcrypto/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.200 2024/07/10 13:30:14 beck Exp $ +# $OpenBSD: Makefile,v 1.201 2024/08/02 10:48:54 jsing Exp $ LIB= crypto LIBREBUILD=y @@ -61,10 +61,10 @@ SYMBOL_LIST+= ${.CURDIR}/arch/${MACHINE_CPU}/Symbols.list # crypto/ SRCS+= cpt_err.c SRCS+= cryptlib.c +SRCS+= crypto_ex_data.c SRCS+= crypto_init.c SRCS+= crypto_lock.c SRCS+= cversion.c -SRCS+= ex_data.c SRCS+= malloc-wrapper.c SRCS+= mem_clr.c SRCS+= mem_dbg.c |