summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/reallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2017-11-24Use clock_gettime and getrusage to compute real and user time.jca1-16/+33
Better handling of clock jumps, from Scott Cheloa.
2017-11-04Revert recent changes to unbreak ports/net/sambajca1-2/+8
While it is not clear (to me) why that ports ends up with corrupted shared libs, reverting those changes fixes the issue and should allow us to close p2k17 more smoothly. Discussed with a bunch, ok ajacoutot@ guenther@
2017-11-02's' should include 'f'; from Jacqueline Jolicoeurotto1-2/+2
2017-11-02openssl s_time -connect host:port needs dns promise for pledge(2) otherwise itmestre1-2/+2
will SIGABRT Bug found by Scott Cheloha <scottcheloha at gmail.com> OK deraadt@
2017-10-28Change pthread_cleanup_{push,pop} to macros that store the cleanup infoguenther1-8/+2
on the stack instead of mallocing the list and move the APIs from libpthread to libc so that they can be used inside libc. Note: the standard was explicitly written to permit/support this "macro with unmatched brace" style and it's what basically everyone else already does. We xor the info with random cookies with a random magic to detect/trip-up overwrites. Major bump to both libc and libpthread due to the API move. ok mpi@
2017-10-24Use a smaller buffer size too peek the receive data. The contentbluhm1-5/+4
is discarded anyway, the plen variable is a leftover from the -j jumbo option. reported by Nan Xiao; OK deraadt@
2017-10-19Restore a return that was inadvertently removed from freezero() in r1.234,jsing1-1/+2
which results in an internal double free when internal functions are not in use. ok otto@
2017-10-17add missing HISTORY; based on CVS logs and release announcementsschwarze1-2/+7
2017-10-15Add a regression test for ldexp(3).visa3-2/+82
2017-10-12Rename ssl3_client_hello() to ssl3_send_client_hello() for consistency.jsing2-5/+5
2017-10-12Fold dtls1_accept() into ssl_accept(), removing a lot of duplicated code.jsing4-556/+143
With review/feedback from inoguchi@
2017-10-12Drop prototypes for ssl23_*() functions, which no longer exist.jsing1-11/+1
2017-10-12Add STANDARDS: denis@ spotted that it was missing.schwarze1-2/+19
OK deraadt@ jca@ jmc@
2017-10-11Update regress now that ssl_cipher_list_to_bytes() takes a CBB.jsing1-3/+9
Based on a diff from doug@
2017-10-11Convert ssl3_client_hello() to CBB.jsing4-93/+64
As part of this, change ssl_cipher_list_to_bytes() to take a CBB argument, rather than a pointer/length. Some additional clean up/renames while here. Based on a diff from doug@
2017-10-11Fully convert ssl3_send_server_hello() to CBB.jsing3-53/+19
Based on a diff from doug@
2017-10-10Revise regress now that ssl_bytes_to_cipher_list() takes a CBS.jsing1-20/+10
2017-10-10Make ssl_bytes_to_cipher_list() take a CBS, rather than a pointer andjsing3-29/+19
length, since the caller has already been converted to CBS. A small amount of additional clean up whilst here.
2017-10-10((remove) (some) (unnecessary) (parentheses))jsing1-4/+4
Part of a diff from doug@
2017-10-10Merge dtls1_connect() into ssl3_connect(), removing a large amount ofjsing4-459/+117
duplicated code. For now this is essentially adds a diff of the two functions with 'if (SSL_IS_DTLS(s))' - further clean up and improvement will follow. ok inoguchi@
2017-10-08Reduce non-functional differences between dtls1_accept() andjsing1-34/+42
ssl3_accept() - synchronise comments, whitespace, line wrapping, etc.
2017-10-08Reduce non-functional differences between dtls1_connect() andjsing1-32/+38
ssl3_connect() - synchronise comments, whitespace, line wrapping, etc.
2017-10-08Fix some style/whitespace/indentation issues in ssl3_accept().jsing1-25/+14
2017-10-08Fix some style/whitespace/indentation issues in ssl3_connect().jsing1-10/+9
2017-10-08Convert ssl3_send_change_cipher_spec() to use CBB and make it handle DTLS,jsing6-57/+52
which allows us to drop dtls1_send_change_cipher_spec() entirely. ok inoguchi@
2017-10-08hyphenate DER/PEM-encoded, for consistency;jmc2-9/+9
2017-10-07Document tls_peer_cert_chain_pem().jsing1-2/+13
ok beck@
2017-10-07Fix cast-pasto's in commentsguenther1-3/+3
2017-10-05do not return f() where f is a void function; loop var type fixotto1-4/+5
2017-10-05Use dprintf instead of snprintf/writeotto1-82/+36
2017-09-26bump version in advance of final releasebcook1-3/+3
2017-09-26bump wo 2.6.2libressl-v2.6.2bcook1-3/+3
2017-09-25If tls_config_parse_protocols() is called with a NULL pointer, return thejsing1-1/+4
default protocols instead of crashing - this makes the behaviour more useful and mirrors what we already do in tls_config_set_ciphers() et al.
2017-09-25Annotate some API-side memory leaks for future resolution.jsing1-1/+3
2017-09-25Fix various issues in the OCSP extension parsing code:jsing1-20/+14
- When parsing the OCSP extension we can have multiple responder IDs - pull these out correctly. - Stop using CBS_stow() - it's unnecessary since we just need access to the data and length (which we can get via CBS_data() and CBS_len()). - Use a temporary pointer when calling d2i_*() functions, since it will increment the pointer by the number of bytes it consumed when decoding. The original code incorrectly passes the pointer allocated via CBS_stow() (using malloc()) to a d2i_*() function and then calls free() on the now incremented pointer, most likely resulting in a crash. This issue was reported by Robert Swiecki who found the issue using honggfuzz. ok beck@
2017-09-25When building the OCSP extension, only add the length prefixed extensionsjsing1-6/+6
after we finish building the responder ID list. Otherwise adding to the responder ID list fails. ok beck@
2017-09-23Make delayed free non-optional and make F do an extensive double free check.otto1-21/+26
ok tb@ tedu@
2017-09-20Keep track of which keypair is in use by a TLS context.jsing4-14/+25
This fixes a bug where by a TLS server with SNI would always only return the OCSP staple for the default keypair, rather than returning the OCSP staple associated with the keypair that was selected via SNI. Issue reported by William Graeber and confirmed by Andreas Bartelt. Fix tested by William Graeber and Andreas Bartelt - thanks!
2017-09-20Slightly restructure tls_ocsp_verify_cb() to make it more like libtls code.jsing1-6/+7
2017-09-20Provide a useful error if there are no OCSP URLs in the peer certificate.jsing1-1/+4
2017-09-20Fix indentation.jsing1-1/+1
2017-09-12mapalign returns MAP_FAILED for failuer; from George Koehlerotto1-2/+2
2017-09-11check double free before canary for chunks; ok millert@otto1-5/+5
2017-09-05New POSIX xlocale implementation written from scratch.libressl-v2.6.1schwarze11-96/+396
Complete in the sense that all POSIX *locale(3) and *_l(3) functions are included, but in OpenBSD, we of course only really care about LC_CTYPE and we only support ASCII and UTF-8. With important help from kettenis@, guenther@, and jca@. Repeated testing in ports bulk builds by naddy@. Additional testing by jca@, sebastia@, dcoppa@, and others. OK kettenis@ dcoppa@, and guenther@ on an earlier version. Riding guenther@'s libc/librthread major bump.
2017-09-05Move mutex, condvar, and thread-specific data routes, pthread_once, andguenther2-11/+182
pthread_exit from libpthread to libc, along with low-level bits to support them. Major bump to both libc and libpthread. Requested by libressl team. Ports testing by naddy@ ok kettenis@
2017-09-03Checking sizeof size_t by SIZE_MAX instead of _LP64inoguchi1-7/+7
ok bcook@
2017-09-02delete pointless .Tn ASCII found by jca@ with mandoc -Tlintschwarze1-5/+4
2017-08-31Remove OPENSSL_NO_NEXTPROTONEG - some software creates conflictingjsing1-1/+0
prototypes if we have both OPENSSL_NO_NEXTPROTONEG and the prototypes defined.
2017-08-31Mention strtok_r in STANDARDSjca1-2/+6
POSIX 2001 instead of POSIX.1c suggested by millert@ and jmc@, ok jmc@
2017-08-30Move the full extension building into tlsext_{client,server}hello_build(),jsing2-47/+26
leaving ssl_add_{client,server}hello_tlsext() as pointer to CBB wrappers. ok doug@