summaryrefslogtreecommitdiff
path: root/lib/libcrypto/bio
AgeCommit message (Collapse)Author
2019-06-28failed to detect asprintf() error by observing return of -1, instead theTheo de Raadt
code was inspecting the pointer (which is, sadly, undefined on error, because the current specification of asprintf is crazy sloppy)
2019-04-14Add input validation to BIO_read()/BIO_write().Joel Sing
Some bread/bwrite functions implement this themselves, while others do not. This makes it consistent across all BIO implementations. Addresses an issue that Guido Vranken found with his fuzzer. ok tb@
2018-06-02Add const to the argument of the following callback getters:Theo Buehler
BIO_meth_get_callback_ctrl, BIO_meth_get_create, BIO_meth_get_ctrl, BIO_meth_get_destroy, BIO_meth_get_gets, BIO_meth_get_puts, BIO_meth_get_read, and BIO_meth_get_write. ok jsing
2018-05-30Add a const qualifier to the return value of BIO_s_file().Theo Buehler
tested in a bulk build by sthen ok bcook, jsing
2018-05-12const qualifiers for BIO_new_mem_buf(), BIO_new_connect() andTheo Buehler
BIO_new_accept(). The one for BIO_new_mem_buf() is a bit ugly since it needs to cast away the newly added const qualifier, as in OpenSSL commit 8ab31975bac. ok jsing
2018-05-12Add const qualifiers to the return values of BIO_s_mem() andTheo Buehler
BIO_s_datagram(). ok jsing
2018-05-01const for BIO_{new,set}() and most of the BIO_{f,s}_*() family ofTheo Buehler
functions. ok beck, jsing
2018-03-17Bring in compatibility for OpenSSL 1.1 style init functions.Bob Beck
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@
2018-03-17Make BIO_meth_get_write() public. Omission spotted by schwarze.Theo Buehler
ok jsing
2018-02-22Provide BIO_up_ref().Joel Sing
2018-02-20whitespace nitTheo Buehler
2018-02-20Provide BIO_meth_{g,s}et_callback_ctrl()Theo Buehler
with & ok jsing
2018-02-20Provide BIO_meth_get_{create,ctrl,destroy,gets,puts,read}()Theo Buehler
ok jsing
2018-02-20Zap an 'int' that snuck in.Theo Buehler
ok jsing
2018-02-20Provide BIO_{g,s}et_shutdown().Theo Buehler
ok jsing
2018-02-20Provide BIO_get_new_index().Joel Sing
Based on BoringSSL.
2018-02-18Provide BIO_meth_set_gets().Theo Buehler
ok jsing
2018-02-18Provide BIO_{g,s}et_data() and BIO_set_init().Theo Buehler
ok jsing
2018-02-17Provide BIO_meth_{free,new}() and BIO_meth_set_{create,crtl,destroy}()Theo Buehler
and BIO_meth_set_{puts,read,write}(). ok jsing
2018-02-07Restore the old behavior when a port number without a host name isAlexander Bluhm
passed to BIO_get_accept_socket(). This is part of the API and it fixes "openssl ocsp -port 12345" in server mode. from markus@; OK jsing@ beck@
2018-02-06Do not call freeaddrinfo() with a NULL parameter.Alexander Bluhm
OK jsing@
2017-04-30No original OpenSSL code remains in this file. RelicenseBob Beck
2017-04-30Make BIO_get_host_ip just yet another getaddrinfo wrapperBob Beck
2017-04-30Rework BIO_accept to be more like modern code.Bob Beck
ok jsing@
2017-04-30Microsoft Windows hates BIO_get_accept_socket in portable. Fix it toBob Beck
not be awful or have any claims on supporting ipv6 when it does so very badly ok jsing@
2017-04-06trailing ; on end of macro definition is wrong; ok guentherTheo de Raadt
2017-01-29Send the function codes from the error functions to the bit bucket,Bob Beck
as was done earlier in libssl. Thanks inoguchi@ for noticing libssl had more reacharounds into this. ok jsing@ inoguchi@
2016-12-20Delete completely useless crap and just use getaddrinfo. Fix man pageBob Beck
while we're at it. Note for the nostalgic, since "wais" is still an alias in /etc/services it will continue to work.. ok deraadt@ millert@ krw@
2015-12-23remove NULL-checks before free()Michael McConville
2015-10-30Pull in <sys/types.h> to get ssize_t or <stdint.h> to get uint32_t, instead ofMiod Vallat
relying upon previously included headers to do this, to enhance portability; from Pascal Cuoq, libressl github pull request #52
2015-07-20Correct #if/else logic in BIO's dgram_ctrl.Doug Hogan
Coverity issue 72741 noticed that ret is being overwritten before use. The actual issue is that the #if/else logic is guarding the wrong lines. Besides impacting ret, this also made the case's break logic wrong because it was in the wrong location. ok bcook@ beck@
2015-07-19Drop stupid (int) casts for the arguments of malloc() and friends. This isMiod Vallat
not 16-bit MS-DOS anymore. ok bcook@ tedu@
2015-07-19Fix Coverity 72742 - ret is overwritten immediately after this.Bob Beck
ok doug@
2015-07-18Dead code, Coverity 78798Bob Beck
ok bcook@ doug@
2015-06-20Fix warning on vax due to old gcc.Doug Hogan
Old gcc warns when parameters have the same names as functions. Noticed by deraadt@. ok deraadt@ jsing@
2015-04-23Do not need to buf[0] = 0 before strlcpy(buf, ...Theo de Raadt
2015-03-21Fix indentation that incorrectly implies a different control flow.Doug Hogan
The actual control flow is intentional while the indenting is incorrect. This is intended to be a cosmetic change. Verified that each of these was part of a KNF commit that wasn't intending to change behavior. Also, double checked against the history of changes in OpenSSL and BoringSSL. Addresses Coverity CIDs: 78842, 78859, 78863. ok tedu@
2015-02-12If you do not support POSIX I/O then you're not tall enough to ride...Joel Sing
ok tedu@
2015-02-10Remove more IMPLEMENT_STACK_OF noops that have been hiding for the lastJoel Sing
15 years.
2015-02-09Jettison SCTP support in BIO dgram.Joel Sing
OpenBSD does not have SCTP support and it sees little use in the wild. OPENSSL_NO_SCTP is already specified via opensslfeatures.h, hence this is a code removal only and symbols should remain unchanged. ok beck@ miod@ tedu@
2015-02-07Delete a lot of #if 0 code in libressl.Doug Hogan
There are a few instances where #if 1 is removed but the code remains. Based on the following OpenSSL commits. Some of the commits weren't strictly deletions so they are going to be split up into separate commits. 6f91b017bbb7140f816721141ac156d1b828a6b3 3d47c1d331fdc7574d2275cda1a630ccdb624b08 dfb56425b68314b2b57e17c82c1df42e7a015132 c8fa2356a00cbaada8963f739e5570298311a060 f16a64d11f55c01f56baa62ebf1dec7f8fe718cb 9ccc00ef6ea65567622e40c49aca43f2c6d79cdb 02a938c953b3e1ced71d9a832de1618f907eb96d 75d0ebef2aef7a2c77b27575b8da898e22f3ccd5 d6fbb194095312f4722c81c9362dbd0de66cb656 6f1a93ad111c7dfe36a09a976c4c009079b19ea1 1a5adcfb5edfe23908b350f8757df405b0f5f71f 8de24b792743d11e1d5a0dcd336a49368750c577 a2b18e657ea1a932d125154f4e13ab2258796d90 8e964419603d2478dfb391c66e7ccb2dcc9776b4 32dfde107636ac9bc62a5b3233fe2a54dbc27008 input + ok jsing@, miod@, tedu@
2015-01-12Fix a memory leak in bss_dgram.Doug Hogan
Free data->saved_message.data. Based on OpenSSL commit: 41cd41c4416f545a18ead37e09e437c75fa07c95 except this version sets a->ptr to NULL to avoid accidental reuse and handles malloc failing. ok beck@, input + ok miod@
2015-01-03Fix incorrect OPENSSL_assert() usage.Doug Hogan
Instead of asserting, return an error code for I/O errors. This is based on OpenSSL commit 2521fcd8527008ceb3e4748f95b0ed4e2d70cfef. Added checks for two calloc()s while I'm here. ok miod@
2014-12-08Use platform-defined method of printing a pointer.Brent Cook
Casting a pointer to an unsigned long discards bits on an LLP64 system. ok deraadt@
2014-12-03Move Windows OS-specific functions to make porting easier.Brent Cook
Several functions that need to be redefined for a Windows port are right in the middle of other code that is relatively portable. This patch isolates the functions that need Windows-specific implementations so they can be built conditionally in the portable tree. ok jsing@ deraadt@
2014-12-03We're not supporting 16-bit Windows, remove cast.Brent Cook
ok jsing@ deraadt@
2014-11-26remove superflous gettimeofday wrapper.Brent Cook
ok beck@ tedu@ miod@ guenther@ doug@ deraadt@
2014-11-26memset like a normal human.Brent Cook
ok beck@ tedu@ miod@
2014-11-26normalize set/getsockopt usage.Brent Cook
Remove the remaining random casts on optval. Fixups for this can be handled by the portability layer all in once place. Remove remaining fake socklen_t unions, though beck@ points out that this also removes support for socklen_t changing its length at runtime. RIP. ok tedu@ beck@ miod@ deraadt@
2014-11-26Linux has had IP_MTU since 2005, don't force it.Brent Cook
ok beck@ miod@ tedu@ deraadt@