aboutsummaryrefslogtreecommitdiffstats
path: root/ssl/bio_ssl.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix BIO_pop for SSL BIOsMatt Caswell2016-07-291-10/+2
| | | | | | | | | | | | | | | The BIO_pop implementation assumes that the rbio still equals the next BIO in the chain. While this would normally be the case, it is possible that it could have been changed directly by the application. It also does not properly cater for the scenario where the buffering BIO is still in place for the write BIO. Most of the existing BIO_pop code for SSL BIOs can be replaced by a single call to SSL_set_bio(). This is equivalent to the existing code but additionally handles the scenario where the rbio has been changed or the buffering BIO is still in place. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Fix BIO_push ref counting for SSL BIOMatt Caswell2016-07-291-1/+5
| | | | | | | | | When pushing a BIO onto an SSL BIO we set the rbio and wbio for the SSL object to be the BIO that has been pushed. Therefore we need to up the ref count for that BIO. The existing code was uping the ref count on the wrong BIO. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Copyright consolidation 01/10Rich Salz2016-05-171-54/+6
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Fix BIO_CTRL_DUP for an SSL BIOMatt Caswell2016-04-271-4/+5
| | | | | | | The variables in the BIO weren't being duplicated properly. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Make BIO opaqueMatt Caswell2016-03-291-58/+62
| | | | | | | | Move the the BIO_METHOD and BIO structures into internal header files, provide appropriate accessor methods and update all internal code to use the new accessors where appropriate. Reviewed-by: Richard Levitte <levitte@openssl.org>
* RT4660: BIO_METHODs should be const.David Benjamin2016-03-211-2/+2
| | | | | | | BIO_new, etc., don't need a non-const BIO_METHOD. This allows all the built-in method tables to live in .rodata. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Convert CRYPTO_LOCK_BIO to new multi-threading APIAlessandro Ghedini2016-03-081-3/+3
| | | | | Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* 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>
* Handle SSL_ERROR_WANT_X509_LOOKUPDr. Stephen Henson2015-09-201-0/+4
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add and use OPENSSL_zallocRich Salz2015-09-021-2/+1
| | | | | | | | | There are many places (nearly 50) where we malloc and then memset. Add an OPENSSL_zalloc routine to encapsulate that. (Missed one conversion; thanks Richard) Also fixes GH328 Reviewed-by: Richard Levitte <levitte@openssl.org>
* memset, memcpy, sizeof consistency fixesRich Salz2015-05-051-1/+1
| | | | | | | | Just as with the OPENSSL_malloc calls, consistently use sizeof(*ptr) for memset and memcpy. Remove needless casts for those functions. For memset, replace alternative forms of zero with 0. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Use safer sizeof variant in mallocRich Salz2015-05-041-2/+1
| | | | | | | | | | | | | 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>
* free null cleanup finaleRich Salz2015-05-011-2/+1
| | | | | | Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
* remove malloc castsRich Salz2015-04-281-1/+1
| | | | | | | Following ANSI C rules, remove the casts from calls to OPENSSL_malloc and OPENSSL_realloc. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Code style: space after 'if'Viktor Dukhovni2015-04-161-2/+2
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* free NULL cleanup 10Rich Salz2015-04-111-3/+2
| | | | | | | | | | Avoid checking for NULL before calling free functions. This gets ssl.*free: ssl_sess_cert_free ssl_free ssl_excert_free ssl_cert_free SSL_free SSL_SRP_CTX_free SSL_SESSION_free SSL_CTX_free SSL_CTX_SRP_CTX_free SSL_CONF_CTX_free Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Resolve swallowed returns codesMatt Caswell2015-03-251-1/+2
| | | | | | | | | | The recent updates to libssl to enforce stricter return code checking, left a small number of instances behind where return codes were being swallowed (typically because the function they were being called from was declared as void). This commit fixes those instances to handle the return codes more appropriately. Reviewed-by: Richard Levitte <levitte@openssl.org>
* free NULL cleanupRich Salz2015-03-251-6/+3
| | | | | | | This commit handles BIO_ACCEPT_free BIO_CB_FREE BIO_CONNECT_free BIO_free BIO_free_all BIO_vfree Reviewed-by: Matt Caswell <matt@openssl.org>
* Fix missing return value checksMatt Caswell2015-03-231-1/+4
| | | | | | | | Ensure that all functions have their return values checked where appropriate. This covers all functions defined and called from within libssl. Reviewed-by: Richard Levitte <levitte@openssl.org>
* dead code cleanup: #if 0 in sslRich Salz2015-02-061-12/+0
| | | | | | | | I left many "#if 0" lines, usually because I thought we would probably want to revisit them later, or because they provided some useful internal documentation tips. Reviewed-by: Andy Polyakov <appro@openssl.org>
* Make libssl opaque. Move all structures that were previously protected byMatt Caswell2015-01-311-1/+1
| | | | | | OPENSSL_NO_SSL_INTERN into internal header files. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-221-500/+482
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* OPENSSL_NO_SOCK fixes.Andy Polyakov2012-04-161-0/+2
| | | | | PR: 2791 Submitted by: Ben Noordhuis
* PR: 2529Dr. Stephen Henson2011-05-251-0/+4
| | | | | | | | Submitted by: Marcus Meissner <meissner@suse.de> Reviewed by: steve Call ssl_new() to reallocate SSL BIO internals if we want to replace the existing internal SSL structure.
* Update from 1.0.0-stableDr. Stephen Henson2009-06-251-9/+11
|
* fix problems found by coverity: remove useless codeNils Larsch2006-03-151-1/+0
|
* Fix various incorrect error function codes.Bodo Möller2005-04-261-1/+1
| | | | ("perl util/ck_errf.pl */*.c */*/*.c" still reports many more.)
* Make kerberos ciphersuite code compile again.Dr. Stephen Henson2005-04-201-2/+2
| | | | Avoid more shadow warnings.
* Give everything prototypes (well, everything that's actually used).Ben Laurie2005-03-311-2/+2
|
* Make it possible to disable OCSP, the speed application, and the use of sockets.Richard Levitte2003-02-141-0/+2
| | | | PR: 358
* A few small bugs with BIO popping.Richard Levitte2003-01-301-0/+4
| | | | PR: 364
* Prototype info function.Ben Laurie2002-01-121-1/+3
|
* Make non blocking I/O work for accept BIOs.Dr. Stephen Henson2000-10-121-0/+4
|
* Fixes for Win32 build.Dr. Stephen Henson2000-06-211-2/+2
| | | | | | | | | | | | | | | | | This is mostly a work around for the old VC++ problem that it treats func() as func(void). Various prototypes had been added to 'compare' function pointers that triggered this. This could be fixed by removing the prototype, adding function pointer casts to every call or changing the passed function to use the expected arguments. I mostly did the latter. The mkdef.pl script was modified to remove the typesafe functions which no longer exist. Oh and some functions called OPENSSL_freeLibrary() were changed back to FreeLibrary(), wonder how that happened :-)
* 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.
* Get rid of more non-ANSI declarations.Ulf Möller2000-05-151-8/+8
|
* Move the registration of callback functions to special functionsRichard Levitte2000-02-201-10/+30
| | | | | | | | | | designed for that. This removes the potential error to mix data and function pointers. Please note that I'm a little unsure how incorrect calls to the old ctrl functions should be handled, in som cases. I currently return 0 and that's it, but it may be more correct to generate a genuine error in those cases.
* Compaq C 6.2 for VMS will complain when we want to convertRichard Levitte2000-01-181-1/+12
| | | | | | | | | | non-function pointers to function pointers and vice versa. The current solution is to have unions that describe the conversion we want to do, and gives us the ability to extract the type of data we want. The current solution is a quick fix, and can probably be made in a more general or elegant way.
* Remove NOPROTO definitions and error code comments.Ulf Möller1999-04-261-10/+0
|
* Change #include filenames from <foo.h> to <openssl.h>.Bodo Möller1999-04-231-4/+4
| | | | | | Submitted by: Reviewed by: PR:
* Change functions to ANSI C.Ulf Möller1999-04-191-32/+12
|
* Import of old SSLeay release: SSLeay 0.9.0bRalf S. Engelschall1998-12-211-48/+201
|
* Import of old SSLeay release: SSLeay 0.8.1bRalf S. Engelschall1998-12-211-0/+432