summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/reallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-01-20include stdint.h over sys/types.hbcook1-2/+2
ok deraadt@ tedu@
2019-01-20Add some internal consistency checks to the handshake state handling.jsing1-9/+23
Fix the tls13_handshake_advance_state_machine() return value, which inadvertantly got flipped in an earlier commit. Also move this function to a more suitable location. ok tb@
2019-01-20TLS 1.3 clients always need to send the supported groups extension.jsing1-4/+5
A couple of cleanup/style tweaks while here. ok tb@
2019-01-20Add an explicit flag to indicate a successful handshake insteadtb1-8/+6
of overloading/abusing action->sender. ok jsing
2019-01-20Fix BN_is_prime_* calls in openssl(1), the API returns -1 on error.tb1-4/+8
Found thanks to BoringSSL's commit 53409ee3d7595ed37da472bc73b010cd2c8a5ffd by David Benjamin. ok djm, jsing
2019-01-20Fix BN_is_prime_* calls in libcrypto, the API returns -1 on error.tb3-18/+35
From BoringSSL's commit 53409ee3d7595ed37da472bc73b010cd2c8a5ffd by David Benjamin. ok djm, jsing
2019-01-19change the default digest used byjsg2-4/+4
openssl x509 -fingerprint openssl crl -fingerprint from sha1 to sha256 ok jsing@
2019-01-19spelling;jmc1-2/+2
2019-01-19In evp.h rev. 1.71, tb@ added EVP_ENCODE_CTX_new(3) andschwarze1-4/+38
EVP_ENCODE_CTX_free(3). Docomuent them, in part using text from OpenSSL that was still published under a free license.
2019-01-19Sort HDRS/SRCS lists and use one line per source file for maintainability.jsing1-16/+44
ok tb@
2019-01-19Add handshake message type checking and special case certificate requests.jsing1-1/+30
Check that the handshake message type received matches that required by the state machine. However, thanks to poor state design in the TLSv1.3 RFC, there is no way to know if you're going to receive a certificate request message or not, hence we have to special case it and teach the receive handler how to handle this situation. Discussed at length with beck@ and tb@ during the hackathon. ok tb@
2019-01-19Tweak return value handling in the TLSv1.3 handshake code.jsing2-44/+47
The I/O paths are from the tls13_handshake_send_action() and tls13_handshake_recv_action() functions - both of these need to propagate I/O conditions (EOF, failure, want poll in, want poll out) up the stack, so we need to capture and return values <= 0. Use an I/O condition to indicate successful handshake completion. Also, the various send/recv functions are currently unimplemented, so return 0 (failure) rather than 1 (success). ok tb@
2019-01-19Hook record regress.jsing1-1/+3
2019-01-19Add regress for TLSv1.3 record handling.jsing2-0/+533
2019-01-19Provide a TLS record handling implementation.jsing3-2/+220
This is a self-contained struct and set of functions that knows how to decode and read a TLS record from data supplied via a read callback, and send itself via a write callback. This will soon be used to build the TLSv1.3 record layer handling code. ok beck@ tb@
2019-01-19bump minors after symbol additiontb3-3/+3
2019-01-19provide EVP_ENCODE_CTX_{new,free}().tb3-2/+18
ok jsing
2019-01-19$OpenBSD$tb2-0/+2
2019-01-19Partial port of EC_KEY_METHOD from OpenSSL 1.1.tb3-12/+12
Pass const method to EC_KEY_METHOD_get_*() to get rid of an XXX. from markus
2019-01-19Partial port of EC_KEY_METHOD from OpenSSL 1.1.tb9-63/+213
This commit adds missing API for ECDH/ECDSA_verify. from markus
2019-01-19Partial port of EC_KEY_METHOD from OpenSSL 1.1.tb16-56/+659
This commit adds init/free, support for signing, setting and getting the method, engine support as well as extra data. from markus
2019-01-18switch the default algorithm for the dgst command from MD5 to SHA256naddy2-6/+6
ok deraadt@
2019-01-18Add -iter and -pbkdf2 to the usage synopsis.naddy1-15/+17
Reorder option descriptions so -iter and -pbkdf2 show up alphabetically. Add missing argument name for -iter. ok jmc@
2019-01-18initialize offset value so this passesbeck1-0/+1
ok jsing@
2019-01-18copyrightbeck1-1/+2
2019-01-18bump copyright years appopriatelybeck1-3/+3
2019-01-18Add client side of supported versions and keyshare extensions with basic regressbeck5-5/+454
ok jsing@
2019-01-18Improve the description of locale dependency:schwarze2-14/+20
* mention LC_COLLATE; * clarify that all these functions are infested, including the *_l() versions; * avoid ENVIRONMENT, these functions don't inspect it; * and point to the C library functions that change the locale. OK millert@
2019-01-18Replace the vague, incorrect, and confusing BUGS sections with CAVEATSschwarze3-12/+33
clearly stating which arguments have to be avoided, and mention the header files defining the constants required for the checks. Feedback and OK guenther@, OK bluhm@.
2019-01-18tweak previous;jmc1-7/+7
2019-01-18Expose some symbols in a new tls13_handshake.h for regression testing.tb3-99/+93
Update the handshake state tables and flag names according to the design decisions and naming conventions in the hackroom. Garbage collect some things that turn out not to belong here. ok jsing
2019-01-18Removed unused struct members.jsing1-2/+0
2019-01-18Add the -iter and -pbkdf2 argumenst to encbeck1-2/+11
2019-01-18Change the default digest type to sha256, and add support forbeck1-5/+44
pbkdf2 with OpenSSL compatible flags ok jsing@
2019-01-18Remove this copy, we have decided we can do this in placebeck3-1633/+2
ok jsing@
2019-01-18Add support for RFC 8446 section 4.2 enforcing which extensions maybeck1-8/+43
appear with which messages. ok jsing@
2019-01-18Update regress following TLS extension renaming.jsing2-379/+378
2019-01-18Rename TLS extension handling to use less "hello".jsing4-220/+228
When the TLS extension code was rewritten, TLS extensions could only exist in ClientHello and ServerHello messages - as such, they were named in pairs of *_clienthello_{needs,build} which would be called by the client and *_clienthello_parse. Likewise for *_serverhello_{needs,build} which would be called by a server and *_serverhello_parse, which would be called by a client. Enter TLSv1.3 - TLS extensions can now exist in one of seven messages, with only certain types being allowed to appear in each, meaning the naming scheme no longer works. Instead, rename them to indicate the caller rather than the message type - this effectively means: clienthello_needs -> client_needs clienthello_build -> client_build clienthello_parse -> server_parse serverhello_needs -> server_needs serverhello_build -> server_build serverhello_parse -> client_parse ok beck@ tb@
2019-01-17Add regress for extensible buffer code.jsing3-1/+169
2019-01-17Get rid of is_serverhello in preparation for other messagesbeck1-13/+24
ok jsing@ tb@
2019-01-17Provide an extensible buffer implementation that uses a read callback.jsing3-3/+148
The read callback returns a TLS13_IO_* value on EOF, failure, want pollin or want pollout, or a positive value indicating the number of bytes read. This will be used by upcoming TLSv1.3 handshake message and record processing code, both of which need the ability to read a fixed size header, before extending the buffer to the number of bytes specified in the header. ok beck@ tb@
2019-01-17Add support to enforce restrictions on where extensions can appearbeck2-12/+38
as per RFC8446 section 4.2. Recognized extensions that appear in an incorrect message must abort the handshake. ok jsing@
2019-01-17Add a direct copy of the exension parsing code to be modified for tls13.beck3-2/+1596
At the moment this is mechanical, with the functions renamed. This will be refactored for tls13. ok jsing@
2019-01-16For all functions known to be infected by LC_NUMERIC, add shortschwarze2-4/+22
CAVEATS pointing to the new CAVEATS section in setlocale(3). Make those in wprintf(3) and wscanf(3) more concise since duplicate information is a bad idea. Incompleteness of information originally pointed out by millert@. OK millert@
2019-01-14There are cases where a program doing dns requests wants to set theotto1-2/+4
Checking Disabled flag. Introduce a RES flag to do so. ok krw@ deraadt@ eric@
2019-01-10Move default numer of pools in the multi-threaded case to 8. Various testsotto1-2/+2
by me and others indicate that it is the optimum.
2019-01-10Make the "not my pool" searching loop a tiny bit smarter, whileotto2-22/+39
making the number of pools variable. Do not document the malloc conf settings atm, don't know yet if they will stay. Thanks to all the testers. ok deraadt@
2019-01-10Revert back previous commit and stop including strings.hmestre2-9/+7
Use memset(3) instead of bzero(3) since POSIX recommends using the former and because it's also more portable (conforms to ANSI C standard) OK tedu@ tb@
2019-01-09Include strings.h for bzero in usr.bin/ncinoguchi2-2/+4
bzero is defined in strings.h. ok deraadt@
2019-01-02correct article;jmc2-6/+6