summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio (follow)
Commit message (Collapse)AuthorAgeFilesLines
* failed to detect asprintf() error by observing return of -1, instead thederaadt2019-06-281-6/+3
| | | | | code was inspecting the pointer (which is, sadly, undefined on error, because the current specification of asprintf is crazy sloppy)
* Add input validation to BIO_read()/BIO_write().jsing2019-04-141-4/+14
| | | | | | | | | 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@
* Add const to the argument of the following callback getters:tb2018-06-022-18/+18
| | | | | | | | 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
* Add a const qualifier to the return value of BIO_s_file().tb2018-05-302-5/+5
| | | | | tested in a bulk build by sthen ok bcook, jsing
* const qualifiers for BIO_new_mem_buf(), BIO_new_connect() andtb2018-05-124-11/+11
| | | | | | | | 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
* Add const qualifiers to the return values of BIO_s_mem() andtb2018-05-123-9/+9
| | | | | | BIO_s_datagram(). ok jsing
* const for BIO_{new,set}() and most of the BIO_{f,s}_*() family oftb2018-05-0112-47/+47
| | | | | | functions. ok beck, jsing
* Bring in compatibility for OpenSSL 1.1 style init functions.beck2018-03-171-1/+3
| | | | | | | | | 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@
* Make BIO_meth_get_write() public. Omission spotted by schwarze.tb2018-03-171-1/+2
| | | | ok jsing
* Provide BIO_up_ref().jsing2018-02-222-2/+10
|
* whitespace nittb2018-02-201-2/+2
|
* Provide BIO_meth_{g,s}et_callback_ctrl()tb2018-02-202-2/+22
| | | | with & ok jsing
* Provide BIO_meth_get_{create,ctrl,destroy,gets,puts,read}()tb2018-02-202-2/+50
| | | | ok jsing
* Zap an 'int' that snuck in.tb2018-02-201-3/+2
| | | | ok jsing
* Provide BIO_{g,s}et_shutdown().tb2018-02-202-2/+16
| | | | ok jsing
* Provide BIO_get_new_index().jsing2018-02-202-2/+23
| | | | Based on BoringSSL.
* Provide BIO_meth_set_gets().tb2018-02-182-2/+10
| | | | ok jsing
* Provide BIO_{g,s}et_data() and BIO_set_init().tb2018-02-182-2/+23
| | | | ok jsing
* Provide BIO_meth_{free,new}() and BIO_meth_set_{create,crtl,destroy}()tb2018-02-172-1/+94
| | | | | | and BIO_meth_set_{puts,read,write}(). ok jsing
* Restore the old behavior when a port number without a host name isbluhm2018-02-071-10/+12
| | | | | | 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@
* Do not call freeaddrinfo() with a NULL parameter.bluhm2018-02-061-2/+3
| | | | OK jsing@
* No original OpenSSL code remains in this file. Relicensebeck2017-04-301-54/+13
|
* Make BIO_get_host_ip just yet another getaddrinfo wrapperbeck2017-04-301-27/+20
|
* Rework BIO_accept to be more like modern code.beck2017-04-301-54/+19
| | | | ok jsing@
* Microsoft Windows hates BIO_get_accept_socket in portable. Fix it tobeck2017-04-301-115/+35
| | | | | | not be awful or have any claims on supporting ipv6 when it does so very badly ok jsing@
* trailing ; on end of macro definition is wrong; ok guentherderaadt2017-04-061-4/+4
|
* Send the function codes from the error functions to the bit bucket,beck2017-01-2910-115/+75
| | | | | | as was done earlier in libssl. Thanks inoguchi@ for noticing libssl had more reacharounds into this. ok jsing@ inoguchi@
* Delete completely useless crap and just use getaddrinfo. Fix man pagebeck2016-12-201-44/+7
| | | | | | | 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@
* remove NULL-checks before free()mmcc2015-12-231-5/+3
|
* Pull in <sys/types.h> to get ssize_t or <stdint.h> to get uint32_t, instead ofmiod2015-10-301-1/+2
| | | | | relying upon previously included headers to do this, to enhance portability; from Pascal Cuoq, libressl github pull request #52
* Correct #if/else logic in BIO's dgram_ctrl.doug2015-07-201-3/+3
| | | | | | | | | 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@
* Drop stupid (int) casts for the arguments of malloc() and friends. This ismiod2015-07-192-6/+6
| | | | | not 16-bit MS-DOS anymore. ok bcook@ tedu@
* Fix Coverity 72742 - ret is overwritten immediately after this.beck2015-07-191-2/+1
| | | | ok doug@
* Dead code, Coverity 78798beck2015-07-181-3/+1
| | | | ok bcook@ doug@
* Fix warning on vax due to old gcc.doug2015-06-201-4/+4
| | | | | | | Old gcc warns when parameters have the same names as functions. Noticed by deraadt@. ok deraadt@ jsing@
* Do not need to buf[0] = 0 before strlcpy(buf, ...deraadt2015-04-231-2/+1
|
* Fix indentation that incorrectly implies a different control flow.doug2015-03-211-2/+2
| | | | | | | | | | | | | 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@
* If you do not support POSIX I/O then you're not tall enough to ride...jsing2015-02-121-8/+1
| | | | ok tedu@
* Remove more IMPLEMENT_STACK_OF noops that have been hiding for the lastjsing2015-02-101-3/+1
| | | | 15 years.
* Jettison SCTP support in BIO dgram.jsing2015-02-092-1052/+2
| | | | | | | | 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@
* Delete a lot of #if 0 code in libressl.doug2015-02-071-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | | 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@
* Fix a memory leak in bss_dgram.doug2015-01-121-3/+13
| | | | | | | | 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@
* Fix incorrect OPENSSL_assert() usage.doug2015-01-031-24/+53
| | | | | | | | 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@
* Use platform-defined method of printing a pointer.bcook2014-12-081-2/+2
| | | | | | Casting a pointer to an unsigned long discards bits on an LLP64 system. ok deraadt@
* Move Windows OS-specific functions to make porting easier.bcook2014-12-032-24/+89
| | | | | | | | | 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@
* We're not supporting 16-bit Windows, remove cast.bcook2014-12-031-3/+2
| | | | ok jsing@ deraadt@
* remove superflous gettimeofday wrapper.bcook2014-11-261-9/+2
| | | | ok beck@ tedu@ miod@ guenther@ doug@ deraadt@
* memset like a normal human.bcook2014-11-261-10/+10
| | | | ok beck@ tedu@ miod@
* normalize set/getsockopt usage.bcook2014-11-263-45/+27
| | | | | | | | | | 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@
* Linux has had IP_MTU since 2005, don't force it.bcook2014-11-261-8/+4
| | | | ok beck@ miod@ tedu@ deraadt@