summaryrefslogtreecommitdiff
path: root/crypto/stack/stack.c
Commit message (Collapse)AuthorAgeFilesLines
* Type-safe OBJ_bsearch_ex.ben2008-10-141-18/+10
|
* More type-checking.ben2008-06-041-34/+35
|
* Constify version strings and some structures.steve2007-01-211-1/+1
|
* Oops!steve2004-10-041-1/+1
|
* Fix race condition when CRL checking is enabled.steve2004-10-041-0/+7
|
* Extend the index parameter checking from sk_value to sk_set(). Also tidy upgeoff2004-04-211-3/+2
| | | | | | some similar code elsewhere. Thanks to Francesco Petruzzi for bringing this to my attention.
* Avoid undefined results when the parameter is out of range.geoff2004-04-021-1/+1
|
* Include objects.h to get a correct declaration of OBJ_bsearch_ex(),levitte2003-04-291-1/+2
| | | | not to mention the OBJ_BSEARCH_* macros.
* Add an extended variant of sk_find() which returns a non-NULL pointerlevitte2003-04-291-13/+13
| | | | even if an exact match wasn't found.
* Fix a memory leak in 'sk_dup' in the case a realloc() fails. Also, tidy upgeoff2001-05-311-5/+7
| | | | a bit of weird code in sk_new.
* Make sk_sort tolearate a NULL argument.steve2001-01-281-1/+1
|
* Some platforms define NULL as ((void *)0). Unfortunately, a void*levitte2000-09-171-1/+1
| | | | | can't be used as a function pointer according the the standards. Use a 0 instead and there will be no trouble.
* Safe stack reorganisation in terms of function casts.steve2000-06-161-0/+5
| | | | | | | | | | | | After some messing around this seems to work but needs a few more tests. Working out the syntax for sk_set_cmp_func() (cast it to a function that itself returns a function pointer) was painful :-( Needs some testing to see what other compilers think of this syntax. Also needs similar stuff for ASN1_SET_OF etc etc.
* Harmonize indentation.bodo2000-06-081-13/+13
|
* There have been a number of complaints from a number of sources that nameslevitte2000-06-011-7/+7
| | | | | | | | | 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.
* This is the first of two commits (didn't want to dump them all into thegeoff2000-06-011-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | same one). However, the first will temporarily break things until the second comes through. :-) The safestack.h handling was mapping compare callbacks that externally are of the type (int (*)(type **,type **)) into the underlying callback type used by stack.[ch], which is (int (*)(void *,void *)). After some degree of digging, it appears that the callback type in the underlying stack code should use double pointers too - when the compare operations are invoked (from sk_find and sk_sort), they are being used by bsearch and qsort to compare two pointers to pointers. This change corrects the prototyping (by only casting to the (void*,void*) form at the moment it is needed by bsearch and qsort) and makes the mapping in safestack.h more transparent. It also changes from "void*" to "char*" to stay in keeping with stack.[ch]'s assumed base type of "char". Also - the "const" situation was that safestack.h was throwing away "const"s, and to compound the problem - a close examination of stack.c showed that (const char **) is not really achieving what it is supposed to when the callback is being invoked, what is needed is (const char * const *). So the underlying stack.[ch] and the mapping macros in safestack.h have all been altered to correct this. What will follow are the vast quantities of "const" corrections required in stack-dependant code that was being let "slip" through when safestack.h was discarding "const"s. These now all come up as compiler warnings.
* sk_value was also suffering from de-const-ification.geoff2000-05-311-1/+1
| | | | Also, add in a couple of missing declarations in pkcs7 code.
* All the little functions created by the IMPLEMENT_STACK_OF() macro willgeoff2000-05-311-1/+1
| | | | | | | | | | | cast their type-specific STACK into a real STACK and call the underlying sk_*** function. The problem is that if the STACK_OF(..) parameter being passed in has a "const *" qualifier, it is discarded by the cast. I'm currently implementing a fix for this but in the mean-time, this is one case I noticed (a few type-specific sk_**_num() functions pass in const type-specific stacks). If there are other errors in the code where consts are being discarded, we will similarly not notice them. yuck.
* Get rid of more non-ANSI declarations.ulf2000-05-151-11/+10
|
* ispell (and minor modifications)ulf2000-02-031-1/+1
|
* Seek out and destroy another evil cast.ulf2000-01-301-3/+3
|
* Another safe stack.ben1999-05-301-6/+14
|
* New functions sk_set, sk_value and sk_num to replace existing macros: this issteve1999-05-191-0/+17
| | | | to minimise the effects on existing code.
* Add PKCS#12 documentation and new option in x509 to add certificate extensions.steve1999-04-271-1/+4
|
* Remove NOPROTO definitions and error code comments.ulf1999-04-261-5/+0
|
* Change #include filenames from <foo.h> to <openssl.h>.bodo1999-04-231-1/+1
| | | | | | Submitted by: Reviewed by: PR:
* Change functions to ANSI C.ulf1999-04-191-37/+14
|
* Massive constification.ben1999-04-171-1/+1
|
* Fix security hole.ben1999-03-221-1/+1
|
* Add functions to add certs to stacks, used for CA file/path stuff in servers.ben1999-02-281-1/+5
|
* Fix version stuff:rse1998-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: ----------------------------------------------------------------------
* Fix for sk_insert bug: it never worked properly.stephen1998-12-311-1/+1
| | | | | Allow explicit tag asn macros to handle indefinite length constructed stuff: without this certain "certificates" can't be read in.
* *** empty log message ***OpenSSL_0_9_1crse1998-12-231-1/+1
|
* Switch version string to SSLeay/OpenSSLrse1998-12-231-1/+1
|
* Various cleanups and fixed by Marc and Ralf to start the OpenTLS projectrse1998-12-221-5/+13
|
* Initial revisionrse1998-12-211-0/+299