summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/malloc.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2017-02-08Avoid double close(2) in netcat. After every call to readwrite()bluhm1-13/+5
there is already a close(2), so do not do it in readwrite(). OK beck@
2017-02-08Due to non-blocking sockets, tls_handshake() could wait in a busybluhm1-21/+42
loop. Use an additional poll(2) during the handshake and also respect the -w timeout option there. From Shuo Chen; OK beck@
2017-02-07Revert previous; the implementation is incorrect since it assumes that thejsing2-20/+7
provided error code matches the error that is currently on the top of the error stack.
2017-02-07Remove unused variable in C source to make the test compile and pass.bluhm1-1/+0
2017-02-07Add file and line to the LibreSSL error strings sine we are no longer inbeck2-7/+20
1989, VMS, or MS/DOS and we all run Brobdingnagian C compilers that have can now be counted on to achieve this level of sophistication nearly everywhere. ok jsing@
2017-02-07Change SSLerror() back to taking two args, with the first one being an SSL *.beck25-573/+841
Make a table of "function codes" which maps the internal state of the SSL * to something like a useful name so in a typical error in the connection you know in what sort of place in the handshake things happened. (instead of by arcane function name). Add SSLerrorx() for when we don't have an SSL * ok jsing@ after us both being prodded by bluhm@ to make it not terrible
2017-02-05Define values for SSL_CTRL_SET_GROUPS{,_LIST} and wire them up to thejsing2-15/+19
SSL_{,CTX_}ctrl() functions. As crazy as it is, some software appears to call the control functions directly rather than using the macros (or functions) provided by the library. Discussed with beck@ and sthen@
2017-02-05Kill leak introduced with refactorbeck1-3/+6
ok jsing@
2017-02-05Support IPv6 proxy addressesjca1-10/+24
ok beck@
2017-02-03Don't use <sys/param.h> from userland without cause. Sort <sys/*>guenther1-3/+4
before other includes per style(9) while we're here. ok florian@ bcook@ jsing@ beck@
2017-02-02fix a comment and rm some dead code as a result of the previous diffotto1-8/+5
2017-02-01netinet/in.h should be included, and freebsd and some othersbeck2-2/+6
don't have EAI_NODATA, so make this easier for people from bernard spill
2017-02-01Let realloc handle and produce moved pointers for allocations betweenlibressl-v2.5.1otto1-20/+37
half a page and a page. ok jmatthew@ tb@
2017-01-31tweak previous;jmc2-12/+8
2017-01-31Add tls_config_[add|set]keypair_ocsp functions so that ocsp staples may bebeck6-58/+209
added associated to a keypair used for SNI, and are usable for more than just the "main" certificate. Modify httpd to use this. Bump libtls minor. ok jsing@
2017-01-31Disable client-initiated renegotiation for libtls servers.jsing1-1/+3
ok beck@ reyk@
2017-01-31Provide an SSL_OP_NO_CLIENT_RENEGOTIATION option that disallowsjsing2-2/+12
client-initiated renegotiation. The current default behaviour remains unchanged. ok beck@ reyk@
2017-01-31LibreSSL : regress for carry bug in mulx4x_mont and sqr8x_montinoguchi1-1/+78
This regress bntest.c patch is originally from master branch of OpenSSL. - dca2e0e test/bntest.c: regression test for CVE-2016-7055. - 3e7a496 test/bntest.c: regression test for carry bug in bn_sqr8x_internal. These tests were added for these commit. - 2fac86d bn/asm/x86_64-mont.pl: fix for CVE-2016-7055 (Low severity). - 3f4bcf5 bn/asm/x86_64-mont5.pl: fix carry bug in bn_sqr8x_internal. ok beck@
2017-01-31LibreSSL : Truncated packet could crash via OOB readinoguchi2-3/+10
This patch is originally from master branch of OpenSSL. - 2198b3a crypto/evp: harden AEAD ciphers. - 8e20499 crypto/evp: harden RC4_MD5 cipher. ok tom@
2017-01-31Document functions returning standard moduli for DH key exchange.schwarze2-1/+136
jsing@ confirmed that these are public and worth documenting.
2017-01-30tweak previous;jmc3-11/+11
2017-01-30Document BN_set_flags(3) and BN_get_flags(3).schwarze6-13/+159
jsing@ confirmed that these macros are public and worth documenting.
2017-01-29Seriously warn against calling BN_init(3), BN_MONT_CTX_init(3),schwarze3-12/+75
and BN_RECP_CTX_init(3). They are not only deprecated but so dangerous that they are almost unusable. I found these scary traps while reading the code in order to document BN_set_flags(3). While here, delete ERR_get_error(3) from SEE ALSO.
2017-01-29Marko Kreen contributed significantly to the ocsp stuff for libtlsbeck1-2/+3
2017-01-29Move the ocsp staple to being part of the keypair structure internally,beck3-14/+32
so that it does not send back bogus staples when SNI is in use. (Further change is required to be able to use staples on all keypairs and not just the main one) ok jsing@
2017-01-29Send the function codes from the error functions to the bit bucket,beck275-3892/+2400
as was done earlier in libssl. Thanks inoguchi@ for noticing libssl had more reacharounds into this. ok jsing@ inoguchi@
2017-01-29Put comment back in the right place.jsing1-9/+9
2017-01-29Avoid clearing the mac_packet flag in the wrong place.jsing1-2/+1
In many cases we got away with this, however if a server sends multiple handshake messages in the same record only the first message would be added to the MAC. Should fix breakage reported by various people.
2017-01-28add HISTORY and AUTHORSschwarze12-24/+256
2017-01-27Fix Copyright notices; ok beck@ jsing@ tedu@schwarze11-28/+43
2017-01-27More s/OSCP/OCSP/ typostom2-2/+2
ok jmc@
2017-01-26oscp -> ocsp;jmc3-7/+7
from holger mikolon, plus one more in nc;
2017-01-26fix Dt;jmc1-3/+3
2017-01-26Use a flag to track when we need to call SSL_shutdown(). This avoids anjsing4-5/+11
issue where by calling tls_close() on a TLS context that has not attempted a handshake, results in an unexpected failure. Reported by Vinay Sajip. ok beck@
2017-01-26Bump TLS_API due to new features being added earlier this week.jsing1-2/+2
2017-01-26Bump libtls minor due to symbol additions earlier this week.jsing1-1/+1
2017-01-26knfbeck1-6/+11
2017-01-26Convert ssl3_get_client_hello() to CBS.jsing1-76/+71
ok beck@
2017-01-26Finish the fallout of the SSLerr->SSLerror cleanup to get rid of the uglybeck18-653/+335
line wraps that resulted
2017-01-26Hide SSLerr() under #ifndef LIBRESSL_INTERNAL since we shouldn't bebeck1-2/+4
using it anymore ok jsing@
2017-01-26Send the error function codes to rot in the depths of hell where they belongbeck24-798/+572
We leave a single funciton code (0xFFF) to say "SSL_internal" so the public API will not break, and we replace all internal use of the two argument SSL_err() with the internal only SSL_error() that only takes a reason code. ok jsing@
2017-01-26Merge the single two line function from ssl_err2.c into ssl_err.c.jsing3-76/+12
ok beck@
2017-01-26english is hard.beck1-2/+2
2017-01-26Limit the number of sequential empty records that we will processbeck4-7/+30
before yielding, and fail if we exceed a maximum. loosely based on what boring and openssl are doing ok jsing@
2017-01-26Refactor the code to generate a WANT_READ into a function, as we arebeck1-18/+20
using it more and more to avoid spins. ok jsing@
2017-01-26Remove most of SSL3_ENC_METHOD - we can just inline the function callsjsing11-135/+63
and defines since they are the same everywhere. ok beck@
2017-01-26Move relatively new version range code from ssl_lib.c into a separatejsing3-158/+175
ssl_versions.c file. ok beck@
2017-01-26Rename s3_{both,clnt,pkt_srvr}.c to have an ssl_ prefix since they are nojsing5-6/+6
longer SSLv3 code. ok beck@
2017-01-26Merge the client/server version negotiation into the existing (currentlyjsing16-1229/+395
fixed version) client/server code. ok beck@
2017-01-26Document ERR_load_BN_strings(3).schwarze1-11/+47
jsing@ confirmed that this function is public and worth documenting. This page needs much more work, it is outrageously incomplete and unclear. For example, it remains unexplained what error strings are, what "registering" means and what the benefit for the application is, what happens if it is not done, or what happens if an error occurs after calling ERR_free_strings(3). I tried to read the code, but it is so contorted that i postponed that work. For example, it looks like there are hooks for applications to replace the functions used for registering strings by other, application-supplied functions, and, of course, there are many levels of macro and function wrappers. For now, i only documented the most obvious BUGS.