summaryrefslogtreecommitdiff
path: root/crypto/ex_data.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix memory leak reporting.Dr. Stephen Henson2015-02-091-0/+2
| | | | | | | | | | Free up bio_err after memory leak data has been printed to it. In int_free_ex_data if ex_data is NULL there is nothing to free up so return immediately and don't reallocate it. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 9c7a780bbebc1b6d87dc38a6aa3339033911a8bb)
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-221-419/+427
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Avoid warnings with -pedantic, specifically:Dr. Stephen Henson2008-07-041-1/+1
| | | | | | Conversion between void * and function pointer. Value computed not used. Signed/unsigned argument.
* More type-checking.Ben Laurie2008-06-041-8/+8
|
* Stop warning about extra ';' outside of function.Dr. Stephen Henson2008-05-311-2/+2
|
* LHASH revamp. make depend.Ben Laurie2008-05-261-11/+15
|
* Avoid warnings.Dr. Stephen Henson2008-02-281-1/+1
|
* (oops) Apologies all, that last header-cleanup commit was from the wrongGeoff Thorpe2004-04-191-5/+1
| | | | | tree. This further reduces header interdependencies, and makes some associated cleanups.
* Relax some over-zealous constification that gave some lhash-based code noGeoff Thorpe2003-10-291-1/+1
| | | | | | | choice but to have to cast away "const" qualifiers from their prototypes. This does not remove constification restrictions from hash/compare callbacks, but allows destructor commands to be run over a tables' elements without bad casts.
* Redo type-safety fix.Ben Laurie2001-09-071-2/+1
|
* OpenSSL copyright notices ...Bodo Möller2001-09-041-0/+53
|
* Convert "max" to "mx" for variable names (brought to my attention by SteveGeoff Thorpe2001-09-021-25/+26
| | | | | | Henson). Also, reverse a previous change that used an implicit function pointer cast rather than an explicit data pointer cast in the STACK cleanup code.
* Make MD functions take EVP_MD_CTX * instead of void *, add copy() function.Ben Laurie2001-09-021-4/+3
|
* First step in fixing "ex_data" support. Warning: big commit log ...Geoff Thorpe2001-09-011-110/+456
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, this change merely addresses where ex_data indexes are stored and managed, and thus fixes the thread-safety issues that existed at that level. "Class" code (eg. RSA, DSA, etc) no longer store their own STACKS and per-class index counters - all such data is stored inside ex_data.c. So rather than passing both STACK+counter to index-management ex_data functions, a 'class_index' is instead passed to indicate the class (eg. CRYPTO_EX_INDEX_RSA). New classes can be dynamically registered on-the-fly and this is also thread-safe inside ex_data.c (though whether the caller manages the return value in a thread-safe way is not addressed). This does not change the "get/set" functions on individual "ex_data" structures, and so thread-safety at that level isn't (yet) assured. Likewise, the method of getting and storing per-class indexes has not changed, so locking may still be required at the "caller" end but is nonetheless thread-safe inside "ex_data"'s internal implementation. Typically this occurs when code implements a new method of some kind and stores its own per-class index in a global variable without locking the setting and usage of that variable. If the code in question is likely to be used in multiple threads, locking the setting and use of that index is still up to the code in question. Possible fixes to this are being sketched, but definitely require more major changes to the API itself than this change undertakes. The underlying implementation in ex_data.c has also been modularised so that alternative "ex_data" implementations (that control all access to state) can be plugged in. Eg. a loaded module can have its implementation set to that of the application loaded it - the result being that thread-safety and consistency of "ex_data" classes and indexes can be maintained in the same place rather than the loaded module using its own copy of ex_data support code and state. Due to the centralisation of "state" with this change, cleanup of all "ex_data" state can now be performed properly. Previously all allocation of ex_data state was guaranteed to leak - and MemCheck_off() had been used to avoid it flagging up the memory debugging. A new function has been added to perfrom all this cleanup, CRYPTO_cleanup_all_ex_data(). The "openssl" command(s) have been changed to use this cleanup, as have the relevant test programs. External application code may want to do so too - failure to cleanup will not induce more memory leaking than was the case before, but the memory debugging is not tricked into hiding it any more so it may "appear" where it previously did not.
* Comment correction.Bodo Möller2000-12-181-2/+4
|
* Locking issues.Bodo Möller2000-12-151-0/+13
|
* Constification of CRYPTO_get_ex_data() needed for the sake ofRichard Levitte2000-11-061-1/+1
| | | | RSA_get_ext_data().
* CRYPTO_get_ex_new_index would never return an error.Richard Levitte2000-10-161-1/+1
|
* There have been a number of complaints from a number of sources that namesRichard Levitte2000-06-011-2/+2
| | | | | | | | | like Malloc, Realloc and especially Free conflict with already existing names on some operating systems or other packages. That is reason enough to change the names of the OpenSSL memory allocation macros to something that has a better chance of being unique, like prepending them with OPENSSL_. This change includes all the name changes needed throughout all C files.
* Tidy up CRYPTO_EX_DATA structures.Dr. Stephen Henson2000-01-231-20/+20
|
* Make the perl module compile and eliminate some of the warnings.Ulf Möller1999-07-221-1/+1
| | | | | Still doesn't work (the destructor on BIO and SSL is called immediately after creating the object. Why that??)
* New functions sk_set, sk_value and sk_num to replace existing macros: this isDr. Stephen Henson1999-05-191-2/+2
| | | | to minimise the effects on existing code.
* Change #include filenames from <foo.h> to <openssl.h>.Bodo Möller1999-04-231-3/+3
| | | | | | Submitted by: Reviewed by: PR:
* Change functions to ANSI C.Ulf Möller1999-04-191-26/+8
|
* Import of old SSLeay release: SSLeay 0.9.1b (unreleased)SSLeayRalf S. Engelschall1998-12-211-3/+8
|
* Import of old SSLeay release: SSLeay 0.9.0bRalf S. Engelschall1998-12-211-0/+236