summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/reallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-05-18Add client certificate test in appstest.shinoguchi1-2/+89
2020-05-18Rename variables for key, csr, pass, certinoguchi1-85/+85
2020-05-17Send alerts back correctly when handling key shares, includingbeck1-8/+19
sending back illegal parameter if our phh key share request type is not 0 or 1. ok jsing@ tb@
2020-05-17Free handshake message correctly, noticed by tb@beck1-2/+2
ok tb@ jsing@
2020-05-17As done everywhere else, use a local version of MINIMUM() and avoidderaadt5-21/+21
conflict against a potential define min() from some other scope.
2020-05-17Send a decode error alert if a server provides an empty certificate list.jsing1-2/+2
According to RFC 8446 section 4.4.2.4, a client receiving an empty certificate list must abort the handshake with a decode error alert. ok beck@ inoguchi@ tb@ ('it rarely is the alert you'd expect it to be...')
2020-05-17Add GOST certificate test in appstest.shinoguchi1-26/+107
Enabled by -g option, and default to disabled (RSA certificate is used)
2020-05-17Suppress display output and reduce s_time to 1 sec in appstest.shinoguchi1-28/+38
2020-05-17Fix server client test with TLSv1.3 in appstest.shinoguchi1-20/+27
2020-05-16Return TLS13_IO_WANT_POLLIN after processing post-handshake messages.jsing1-2/+2
After post-handshake handshake messages have been processed, we need to return TLS13_IO_WANT_POLLIN rather than TLS13_IO_WANT_RETRY. The latter will cause us to try to read another TLS record, when there may not be any data available - this will then block in the case of a blocking read. This reverts part of r1.25. Issue noticed by inoguchi@ ok beck@ tb@
2020-05-16Ensure that a TLSv1.3 server has provided a certificate.jsing1-1/+9
The RFC requires that a server always provide a certificate for authentication. Ensure that this is the case, rather than proceeding and attempting validation. In the case where validation was disabled and the server returned an empty certificate list, this would have previously resulted in a NULL pointer deference. Issue reported by otto@ ok inoguchi@ tb@
2020-05-16Add TLS13_ERR_NO_CERTIFICATE.jsing2-3/+7
This was missed in previous tls13_server.c commit. ok inoguchi@ tb@
2020-05-16Avoid sending an empty certificate list from the TLSv1.3 server.jsing1-5/+8
A TLSv1.3 server must always send a certificate - return an error and abort the handshake if none is available. ok inoguchi@ tb@
2020-05-16document PKCS7_set_type(3);schwarze3-3/+123
OK beck@, who was amused by the "darkly comic value of reading" it
2020-05-15Factor out session reuse test and verification testinoguchi1-56/+74
2020-05-15Factor out the test for all available ciphers and add TLSv1.3 caseinoguchi1-46/+61
2020-05-15Add ECDSA certificate test in appstest.shinoguchi1-8/+71
Enabled by -e option, and default to disabled (RSA certificate is used)
2020-05-14go fmt whitespace nittb1-3/+3
2020-05-14reinstate an error check that was commented out while waiting for armtb1-5/+4
packages to appear
2020-05-14move a #define after the last #include linetb1-3/+3
2020-05-14Skip protocol version message check in appstest.shinoguchi1-10/+15
- OpenSSL1.1.1 with TLSv1.3 does not call SSL_SESSION_print() until NewSessionTicket arrival - Shorten function name
2020-05-14Factor out the protocol version test in appstest.shinoguchi1-49/+26
OTHER_OPENSSL default to eopenssl11
2020-05-13Add TLS versioning tests.jsing1-2/+96
This ensures that a TLSv1.0, TLSv1.1, TLSv1.2 or TLSv1.3 client can talk with an appropriately configured server and vice versa.
2020-05-13Fix pesky whitespace.jsing1-2/+2
2020-05-13Remove a no longer relevant XXX comment.jsing1-3/+1
2020-05-13Switch back to the legacy stack where the maximum is less than TLSv1.3.jsing1-2/+2
This allows a server configured to only support TLSv1.2 and earlier, to correctly handle connections from a TLSv1.3 capable client. Issue reported by pvk@ ok inoguchi@ tb@
2020-05-13Switch the legacy version to TLS1_2_VERSION when processing server hello.jsing1-2/+2
Switch the legacy version when processing the server hello, rather than when the client hello has been sent. This ensures that we accept a response from the server that has a record version other than TLS1_2_VERSION, as is the case where the server is negotiating TLSv1.0 or TLSv1.1. Issue spotted by inoguchi@ ok inoguchi@ tb@
2020-05-13Add description for -tls1_3 and -no_tls1_3 options to openssl(1) s_serverinoguchi1-6/+8
ok jsing@ tb@
2020-05-13Add -tls1_3 and -no_tls1_3 options to openssl(1) s_serverinoguchi1-6/+28
- Add -tls1_3 and -no_tls1_3 to openssl(1) s_server - Stop using version pinned methods, instead setting the min and max protocol versions ok jsing@ tb@
2020-05-12there should only be one i in gratuitoustb1-3/+3
2020-05-11Revise regress for TLSv1.3 server being enabled.jsing4-14/+17
2020-05-11Enable the TLSv1.3 server.jsing1-1/+5
ok beck@ tb@
2020-05-11Use tls_legacy_server_method() for SSLv2 record tests.jsing2-5/+7
2020-05-11Revise regress now that record overflows are propagated.jsing1-2/+2
2020-05-11Propagate record overflows to the record layer and alert.jsing3-6/+8
ok beck@ tb@
2020-05-11Add record version checks.jsing3-18/+28
When legacy version is below TLSv1.2 ensure that the record version is SSL3/TLS, however when the legacy version is set to TLSv1.2 require this specifically. ok beck@ tb@
2020-05-11Set the record layer legacy version from the TLSv1.3 server.jsing1-1/+5
This will be used to handle record version checks. ok tb@
2020-05-11Provide an alert sent record layer callback.jsing4-8/+29
Use this to push an error on to the SSL error stack so that we report the details of the alert that we sent, rather than failing with an unknown error. ok tb@
2020-05-11Move the record layer callbacks into a struct.jsing3-35/+33
This makes the code more readable, requires less code churn when adding a new callback and is likely to avoid bugs due to function argument ordering. ok beck@ inoguchi@ tb@
2020-05-11Use ssl_get_new_session() in the TLSv1.3 server.jsing1-4/+3
This correctly handles session being non-NULL and sets up a few more things, including ssl_version. Also stop setting the ssl_version to the server_version, as this is only used on the client side. ok tb@
2020-05-10Make openssl X509 handle the failure case return code from X509_time_cmp.beck1-5/+16
While we are in here also make it notice if time values in a certificate are bogus, and say so in the output. ok bcook@ jsing@
2020-05-10Send dummy ChangeCipherSpec messages from the TLSv1.3 servertb3-3/+41
If the client has requested middle box compatibility mode by sending a non-empty legacy_session_id, the server must send a dummy CCS right after its first handshake message. This means right after ServerHello or HelloRetryRequest. Two important improvements over the backed-out diffr: make sure that First: client and server can send their dummy CCS at the correct moment (right before the next flight or right after the current flight). Second: as jsing noted, we also need to deal with the corner case that tls13_send_dummy_ccs() can return TLS13_IO_WANT_POLLOUT. with/ok jsing
2020-05-10Honour SSL_VERIFY_FAIL_IF_NO_PEER_CERT in the TLSv1.3 server.jsing3-8/+16
ok beck@
2020-05-10Provide alert defines for TLSv1.3 and use in the TLSv1.3 code.jsing7-65/+97
Rather than using a mess of SSL_AL_*, SSL_AD_*, SSL3_AD_* and TLS1_AD_* defines, provide our own TLS13_ALERT_* defines and use those. This also provides the alerts that are new to TLSv1.3. ok beck@
2020-05-10Conditionalize sleep-before-retry in server code to only be done whenbeck1-3/+5
debug is on. otherwise, just retry. Fixes problems this creates in testing. ok jsing@ tb@
2020-05-10Provide an easy way to get debug information from TLSv1.3 handshakes.jsing2-3/+61
This makes it easier to debug TLSv1.3 handshake failures. "Yes please!" tb@, ok beck@
2020-05-10Use size_t for OCSP response length.jsing8-27/+35
The OCSP response length is currently an integer, which is overloaded with -1 meaning "unset". Use a size_t for the OCSP response length and infer unset from the OCSP response being NULL. This makes code more readable, simpler and less error prone. ok beck@
2020-05-10Only reset TLS extension state when parsing client hello or server hello.jsing1-5/+7
With TLSv1.3 we end up parsing extensions from more than just these two messages. This can result in variables (like the selected alpn) being freed when things still need them. ok tb@
2020-05-10Correct tlsext_ocsp_resplen check.jsing1-2/+2
This variable is currently overloaded - a value of -1 means that it is "unset" and any other value is a length. ok tb@
2020-05-09Back out server side CCS sending. It breaks TLSv1.3 client communicationtb3-34/+3
with TLSv1.2 servers, since it makes clients send their dummy CCS too early... There's an obvious but dirty bandaid which I can't bring myself to applying - this business is already disgusting enough. Issue found the hard way by sthen