summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/drand48.c
diff options
context:
space:
mode:
authorjsing <>2024-08-02 10:48:54 +0000
committerjsing <>2024-08-02 10:48:54 +0000
commitffa17714e966833766f8f0403ac8e178f26fbbed (patch)
tree8d588376ef1f79f315be375339e9c5ea6e59bd83 /src/lib/libc/stdlib/drand48.c
parentea51d67aadf6bac6328d485fa936685da3bbba4f (diff)
downloadopenbsd-ffa17714e966833766f8f0403ac8e178f26fbbed.tar.gz
openbsd-ffa17714e966833766f8f0403ac8e178f26fbbed.tar.bz2
openbsd-ffa17714e966833766f8f0403ac8e178f26fbbed.zip
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 'src/lib/libc/stdlib/drand48.c')
0 files changed, 0 insertions, 0 deletions