summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ex_data.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Rewrite CRYPTO_EX_DATA.jsing2024-08-021-637/+0
| | | | | | | | | | | | | | | | | | | | | | | | | 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@
* Make ex_data implementations internaltb2023-07-281-34/+22
| | | | | | | | | | | | | To state the obvious: library suffers from way too much extensibility. In theory, applications can implement their own ex_data implementation. In practice, none did. A glance at ex_data.c might give an idea as to why. Make this internal so this particular turd can be replaced with something slightly saner. Also sync up the CRYPTO_EX_INDEX_* defines with OpenSSL - at least the parts we support. ok jsing
* Hide symbols in crypto.hbeck2023-07-081-1/+11
| | | | ok jsing@
* Fix CRYPTO_get_ex_new_index() to return 1 or highertb2023-06-161-2/+2
| | | | | | | | | | Mixing SSL_{get,set}_ex_data() and and SSL_{get,set}_app_data() in the same application causes problems since they both place their data at the same spot. From Marc Aldorasi ok jsing
* Bring in compatibility for OpenSSL 1.1 style init functions.beck2018-03-171-1/+4
| | | | | | | | | This adds OPENSSL_init_crypto and OPENSSL_init_ssl, as well thread safety modifications for the existing LibreSSL init functions. The initialization routines are called automatically by the normal entry points into the library, as in newer OpenSSL ok jsing@, nits by tb@ and deraadt@
* Send the function codes from the error functions to the bit bucket,beck2017-01-291-11/+9
| | | | | | as was done earlier in libssl. Thanks inoguchi@ for noticing libssl had more reacharounds into this. ok jsing@ inoguchi@
* Remove more IMPLEMENT_STACK_OF noops that have been hiding for the lastjsing2015-02-101-3/+1
| | | | 15 years.
* Only import cryptlib.h in the four source files that actually need it.jsing2014-07-111-2/+2
| | | | | | | | Remove the openssl public includes from cryptlib.h and add a small number of includes into the source files that actually need them. While here, also sort/group/tidy the includes. ok beck@ miod@
* tags as requested by miod and teduderaadt2014-06-121-1/+1
|
* malloc() result does not need a cast.deraadt2014-06-071-2/+2
| | | | ok miod
* convert 53 malloc(a*b) to reallocarray(NULL, a, b). that is 53deraadt2014-05-291-3/+3
| | | | | | | | | potential integer overflows easily changed into an allocation return of NULL, with errno nicely set if need be. checks for an allocations returning NULL are commonplace, or if the object is dereferenced (quite normal) will result in a nice fault which can be detected & repaired properly. ok tedu
* if (x) free(x) -> free(x); semantic patch generated with coccinelle, carefullymiod2014-05-221-6/+3
| | | | eyeballed before applying. Contributed by Cyril Roelandt on tech@
* More KNF.jsing2014-04-201-24/+31
|
* some KNF cleanup following the scriptderaadt2014-04-171-6/+6
|
* Change library to use intrinsic memory allocation functions instead ofbeck2014-04-171-12/+12
| | | | | | | | OPENSSL_foo wrappers. This changes: OPENSSL_malloc->malloc OPENSSL_free->free OPENSSL_relloc->realloc OPENSSL_freeFunc->free
* First pass at applying KNF to the OpenSSL code, which almost makes itjsing2014-04-151-220/+220
| | | | | readable. This pass is whitespace only and can readily be verified using tr and md5.
* resolve conflicts, fix local changesdjm2010-10-011-19/+23
|
* resolve conflictsdjm2008-09-061-7/+3
|
* OpenSSL 0.9.7 stable 2002 05 08 mergebeck2002-05-151-101/+514
|
* openssl-engine-0.9.6a mergebeck2001-06-221-1/+1
|
* openssl-engine-0.9.6 mergebeck2000-12-151-2/+2
|
* OpenSSL 0.9.5 mergebeck2000-03-191-20/+20
| | | | | | *warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2 if you are using the ssl26 packages for ssh and other things to work you will need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs
* OpenSSL 0.9.4 mergebeck1999-09-291-35/+22
|
* Import of SSLeay-0.9.0b with RSA and IDEA stubbed + OpenBSD buildryker1998-10-051-0/+236
functionality for shared libs. Note that routines such as sslv2_init and friends that use RSA will not work due to lack of RSA in this library. Needs documentation and help from ports for easy upgrade to full functionality where legally possible.