aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/lhash/lhash.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove /* foo.c */ commentsRich Salz2016-01-261-1/+0
| | | | | | | | | | | | This was done by the following find . -name '*.[ch]' | /tmp/pl where /tmp/pl is the following three-line script: print unless $. == 1 && m@/\* .*\.[ch] \*/@; close ARGV if eof; # Close file to reset $. And then some hand-editing of other files. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Inline LHASH_OFDr. Stephen Henson2016-01-111-0/+15
| | | | | | | | | | | Make LHASH_OF use static inline functions. Add new lh_get_down_load and lh_set_down_load functions and their typesafe inline equivalents. Make lh_error a function instead of a macro. Reviewed-by: Rich Salz <rsalz@openssl.org>
* remove 0 assignments.Rich Salz2015-09-031-23/+3
| | | | | | | After openssl_zalloc, cleanup more "set to 0/NULL" assignments. Many are from github feedback. Reviewed-by: Tim Hudson <tjh@openssl.org>
* RT3999: Remove sub-component version stringsRich Salz2015-08-101-2/+0
| | | | | | Especially since after the #ifdef cleanups this is not useful. Reviewed-by: Matt Caswell <matt@openssl.org>
* Use safer sizeof variant in mallocRich Salz2015-05-041-3/+3
| | | | | | | | | | | | | For a local variable: TYPE *p; Allocations like this are "risky": p = OPENSSL_malloc(sizeof(TYPE)); if the type of p changes, and the malloc call isn't updated, you could get memory corruption. Instead do this: p = OPENSSL_malloc(sizeof(*p)); Also fixed a few memset() calls that I noticed while doing this. Reviewed-by: Richard Levitte <levitte@openssl.org>
* remove malloc castsRich Salz2015-04-281-9/+6
| | | | | | | Following ANSI C rules, remove the casts from calls to OPENSSL_malloc and OPENSSL_realloc. Reviewed-by: Richard Levitte <levitte@openssl.org>
* OPENSSL_NO_xxx cleanup: many removalsRich Salz2015-01-271-9/+0
| | | | | | | | | | | | The following compile options (#ifdef's) are removed: OPENSSL_NO_BIO OPENSSL_NO_BUFFER OPENSSL_NO_CHAIN_VERIFY OPENSSL_NO_EVP OPENSSL_NO_FIPS_ERR OPENSSL_NO_HASH_COMP OPENSSL_NO_LHASH OPENSSL_NO_OBJECT OPENSSL_NO_SPEED OPENSSL_NO_STACK OPENSSL_NO_X509 OPENSSL_NO_X509_VERIFY This diff is big because of updating the indents on preprocessor lines. Reviewed-by: Richard Levitte <levitte@openssl.org>
* More comment realignmentmaster-post-reformatMatt Caswell2015-01-221-3/+3
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-221-345/+327
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Further comment changes for reformat (master)Matt Caswell2015-01-221-1/+1
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* mark all block comments that need format preserving so thatTim Hudson2014-12-301-1/+2
| | | | | | | indent will not alter them when reformatting comments Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* Revert lhash patch for PR#2124Dr. Stephen Henson2009-12-091-29/+4
|
* PR: 2124Dr. Stephen Henson2009-12-091-4/+29
| | | | | | Submitted by: Jan Pechanec <Jan.Pechanec@Sun.COM> Check for memory allocation failures.
* LHASH revamp. make depend.Ben Laurie2008-05-261-18/+20
|
* Constify version strings and some structures.Dr. Stephen Henson2007-01-211-1/+1
|
* New functions to enumerate digests and ciphers.Dr. Stephen Henson2006-07-091-0/+3
|
* some const fixes and cleanupNils Larsch2005-04-051-7/+7
|
* Give everything prototypes (well, everything that's actually used).Ben Laurie2005-03-311-1/+1
|
* 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.
* Correct const-ness.Ben Laurie2001-07-081-2/+2
|
* Use 0 instead of NULL, at least for function casts, since there areRichard Levitte2001-02-201-2/+2
| | | | | variants of stdio.h that define NULL in such a way that it's "unsafe" to use for function pointer casting.
* Make all configuration macros available for application by makingRichard Levitte2001-02-191-3/+3
| | | | | | | | | | | | sure they are available in opensslconf.h, by giving them names starting with "OPENSSL_" to avoid conflicts with other packages and by making sure e_os2.h will cover all platform-specific cases together with opensslconf.h. I've checked fairly well that nothing breaks with this (apart from external software that will adapt if they have used something like NO_KRB5), but I can't guarantee it completely, so a review of this change would be a good thing.
* This adds macros to implement (and/or declare) type-safe wrapper functionsGeoff Thorpe2001-01-091-14/+16
| | | | | | | | | | | | around the callbacks required in the LHASH code for the "doall" functions. Also - fix the evil function pointer casting in the two lh_doall functions by deferring to a static utility function. Previously lh_doall() was invoking lh_doall_arg() by casting the callback to the 2-parameter prototype and passing in a NULL argument. This appears to have been working thus far but it's not a hot idea. If the extra level of indirection becomes a performance hit, we can just provide two virtually identical implementations for each variant later on.
* Constification of the data of a hash table. This means the callbackRichard Levitte2000-12-131-12/+12
| | | | | | | functions need to be constified, and therefore meant a number of easy changes a little everywhere. Now, if someone could explain to me why OBJ_dup() cheats...
* First step in tidying up the LHASH code. The callback prototypes (andGeoff Thorpe2000-12-011-8/+15
| | | | | | | | | | | | | | | | casts) used in the lhash code are about as horrible and evil as they can be. For starters, the callback prototypes contain empty parameter lists. Yuck. This first change defines clearer prototypes - including "typedef"'d function pointer types to use as "hash" and "compare" callbacks, as well as the callbacks passed to the lh_doall and lh_doall_arg iteration functions. Now at least more explicit (and clear) casting is required in all of the dependant code - and that should be included in this commit. The next step will be to hunt down and obliterate some of the function pointer casting being used when it's not necessary - a particularly evil variant exists in the implementation of lh_doall.
* Constification of LHASH. Contributed by "Paul D. Smith" <psmith@gnu.org>Richard Levitte2000-11-071-1/+1
| | | | | I didn't apply all his patches yet, since I have some hesitance about unconstifying. To be pondered.
* There have been a number of complaints from a number of sources that namesRichard Levitte2000-06-011-10/+10
| | | | | | | | | 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.
* Eliminate memory leaks in mem_dbg.c.Bodo Möller2000-03-181-15/+4
|
* Generate correct error reasons strings for SYSerr.Bodo Möller2000-03-041-1/+1
|
* ispell (and minor modifications)Ulf Möller2000-02-031-2/+2
|
* Seek out and destroy another evil cast.Ulf Möller2000-01-301-4/+4
|
* Source code cleanups: Use void * rather than char * in lhash,Ulf Möller2000-01-301-16/+12
| | | | eliminate some of the -Wcast-qual warnings (debug-ben-strict target)
* Remove NOPROTO definitions and error code comments.Ulf Möller1999-04-261-11/+0
|
* Change #include filenames from <foo.h> to <openssl.h>.Bodo Möller1999-04-231-2/+2
| | | | | | Submitted by: Reviewed by: PR:
* Change functions to ANSI C.Ulf Möller1999-04-191-31/+11
|
* Massive constification.Ben Laurie1999-04-171-2/+2
|
* Fix security hole.Ben Laurie1999-03-221-2/+2
|
* Oops. Missing NULL frees.Ben Laurie1999-01-171-0/+3
|
* Fix version stuff:Ralf S. Engelschall1998-12-311-1/+1
| | | | | | | | | | | 1. The already released version was 0.9.1c and not 0.9.1b 2. The next release should be 0.9.2 and not 0.9.1d, because first the changes are already too large, second we should avoid any more 0.9.1x confusions and third, the Apache version semantics of VERSION.REVISION.PATCHLEVEL for the version string is reasonable (and here .2 is already just a patchlevel and not major change). tVS: ----------------------------------------------------------------------
* *** empty log message ***OpenSSL_0_9_1cRalf S. Engelschall1998-12-231-1/+1
|
* Switch version string to SSLeay/OpenSSLRalf S. Engelschall1998-12-231-1/+1
|
* Various cleanups and fixed by Marc and Ralf to start the OpenTLS projectRalf S. Engelschall1998-12-221-1/+1
|
* Import of old SSLeay release: SSLeay 0.9.1b (unreleased)Ralf S. Engelschall1998-12-211-11/+26
|
* Import of old SSLeay release: SSLeay 0.9.0bRalf S. Engelschall1998-12-211-2/+2
|
* Import of old SSLeay release: SSLeay 0.8.1bRalf S. Engelschall1998-12-211-0/+489