summaryrefslogtreecommitdiff
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Avoid 32 bit right shift with unsigned int in crypto/cast/cast_lcl.hinoguchi2020-01-261-2/+2
| | | | ok tb@
* tweak previous; ok tbjmc2020-01-261-3/+3
|
* typotb2020-01-261-2/+2
|
* Document the change in EVP_chacha20(3).tb2020-01-261-3/+5
| | | | Discussed with jsing
* Improve the comment explaining why the previous change matches OpenSSL'stb2020-01-261-8/+15
| | | | | | behavior. ok jsing
* When an SSL method is set, bump the max version back to that of thejsing2020-01-261-1/+10
| | | | | | | | | | incoming method if it is a client. This addresses the case where TLS_method() is used to initialise a SSL_CTX, then a TLS_client_method() is then set, resulting in TLSv1.2 being used instead of TLSv1.3. This is observable in smtpd. ok beck@
* When switching back to a legacy client or server, ensure we reset thejsing2020-01-262-2/+4
| | | | | | | | handshake function pointer. Fixes an isssue found by jca@ with OpenVPN. ok beck@ tb@
* Fix basement bug where record layer would not correctly deal withbeck2020-01-261-1/+4
| | | | | | traffic retries when not yet encrypting. ok jsing@
* Add server side support for requesting client certificates in tls 1.3beck2020-01-261-4/+173
| | | | ok jsing@
* Add client certificate support for tls 1.3beck2020-01-262-15/+149
| | | | ok jsing@
* Add back the tests that were deleted in previous but not containedtb2020-01-261-1/+9
| | | | in OpenSSL's test suite.
* Add sigalgs for server side to enable client certificate processingbeck2020-01-261-5/+34
| | | | | | | | in tls 1.3 Will be used in a follow on commit to enable tls1.3 client certificates ok jsing@
* server sigalgs test is now bogus, disable for nowbeck2020-01-261-2/+3
|
* Adjust tests to match the change in EVP_chacha20().tb2020-01-262-11/+22
| | | | Test vectors taken from OpenSSL 1.1.1d (under OpenSSL's old license).
* Move pad and verify context into tls13_lib.cbeck2020-01-264-68/+60
| | | | ok jsing@
* Adjust EVP_chacha20()'s behavior to match OpenSSL's semantics:tb2020-01-261-7/+14
| | | | | | | | | | | | | | | | | The new IV is 128 bit long and is actually the 64 bit counter followed by 64 the bit initialization vector. This is needed by an upcoming change in OpenSSH and is a breaking change for all current callers. There are language bindings for Node.js, Rust and Erlang, but none of our ports use them. Note that EVP_chacha20() was first introduced in LibreSSL on May 1, 2014 while the entirely incompatible version in OpenSSL was committed on Dec 9, 2015. Initial diff from djm and myself, further refinements by djm. Ports grepping by sthen ok jsing
* Add an underbar for consistency.tb2020-01-251-2/+2
|
* Disable cert interop tests for now.jsing2020-01-251-2/+2
| | | | | | | | The libressl TLSv1.3 client and server currently lack client certificate authentication support and this test expects all clients can auth with all servers. We can likely turn this back on in the near future.
* Actually disable cipher interop tests.jsing2020-01-251-3/+3
|
* Disable the cipher interop tests.jsing2020-01-251-3/+4
| | | | | | | | | | These make far too many assumptions about cipher suites - TLSv1.3 cipher suites can only be used with TLSv1.3 and there is tests using TLSv1.3 cipher suites with TLSv1.2 will not work. Likewise, expecting TLSv1.2 cipher suites to work with TLSv1.3 is futile. Additionally, eopenssl11 lists TLSv1.3 cipher suites with different names to libressl. Futher work will be necessary before this can be re-enabled.
* Accept both TLSv1.2 and TLSv1.3 protocols for netcat.jsing2020-01-251-4/+3
| | | | | This can potentially be improved by adding knowledge about which libraries support which versions and handle differences between clients and servers.
* Disable session regress for libressl client talking to openssl11 server.jsing2020-01-251-1/+2
| | | | This is now talking over TLSv1.3 and needs session support.
* Revert change to certificate request check from r1.45.jsing2020-01-251-3/+3
| | | | | | This code was correct, it was the entry in the table that was incorrect. ok beck@
* Only perform the downgrade check if our max version is less than TLSv1.3.jsing2020-01-251-15/+17
| | | | | | | Issue noticed by kn@ when talking to a TLSv1.3 capable mail server, but with smtpd capping max version to TLSv1.2. ok beck@
* Preserve the transcript hash for the client finished message,beck2020-01-251-2/+3
| | | | | | and correct the message type for certificate request. ok jsing@
* Support legacy message callbacks. First step for SSL_set_msg_callback(3)tb2020-01-253-3/+40
| | | | | | support. Makes openssl s_client -msg work for handshake messages. ok beck jsing
* Correct value for SSL_TLSEXT_MSG_HRR.jsing2020-01-251-2/+2
| | | | ok beck@ tb@
* Only discard the extension block for client hello and server hellojsing2020-01-251-2/+3
| | | | | | | | | messages. TLSv1.3 messages that include extensions need a length prefixed field with zero bytes, rather than no data at all. ok beck@ tb@
* Only send an RI extension for pre-TLSv1.3 versions.jsing2020-01-251-2/+2
| | | | ok beck@
* It is possible to receive a pre-TLSv1.3 alert in response to a TLSv1.3jsing2020-01-253-4/+24
| | | | | | | | | | | | client hello. Allow pre-TLSv1.3 alerts (including warnings) to be received before the server hello message. Disallow pre-TLSv1.3 alerts as soon as we know that we are using TLSv1.3. Noticed by ajacoutot@ while connecting to www.openprinting.org. ok tb@
* Correct backwards test so that we may accept a certificate requstbeck2020-01-251-3/+3
| | | | | | from the server. ok jsing@
* add a couple of XXX for future cleanuptb2020-01-251-1/+4
|
* Disable the client hello message regress test for now.jsing2020-01-251-2/+2
| | | | | | | The golden values have changed due to TLSv1.3 and will likely change more in the near future. This will be updated and re-enabled when things settle. Discussed with beck@
* Ensure that TLSv1.0 and TLSv1.1 are enabled before running SSLv2 clientjsing2020-01-251-5/+10
| | | | hello tests.
* Teach openssl s_client a bit about TLSv1.3.tb2020-01-241-2/+17
| | | | ok beck jsing
* Complete the initial TLSv1.3 implementation.jsing2020-01-243-14/+300
| | | | ok beck@ tb@
* Preserve the TLS transcript at additional points.jsing2020-01-241-9/+23
| | | | | | | | | This is needed for the TLSv1.3 server and will also be needed for client certificate authentication. Note that we preserve on receive but before recording the new handshake message, whereas we preserve on send after recording the new handshake message. ok tb@
* Permit 0 length writes, because openssl s_client is specialbeck2020-01-241-2/+2
| | | | ok jsing@
* Store the legacy session identifier from the ClientHello so we can actuallyjsing2020-01-241-1/+10
| | | | | | echo it. ok beck@ tb@
* Switch to encrypted records in the TLSv1.3 server.jsing2020-01-243-4/+78
| | | | | | | This adds code to perform key derivation and set the traffic keys once the ServerHello message has been sent, enabling encrypted records. ok beck@ tb@
* Enable SSL_ENC_FLAG_SIGALGS on TLSv1_3_enc_data.jsing2020-01-241-2/+2
| | | | | | This means that we actually try to process and use signature algorithms. ok beck@ tb@
* Add strings for SSL_aTLS1_3 and SSL_kTLS1_3 to SSL_CIPHER_description().jsing2020-01-241-1/+7
| | | | | | | Mkaes `openssl ciphers -v` print au and kx values for TLSv1.3 cipher suites. ok beck@ tb@
* Fix breakage in SSL_connect, SSL_accept, etc. by not propagatingbeck2020-01-243-13/+42
| | | | | | | | | new retry conditions from the record layer all the way up to the callers. Instead we catch them at the top of the record layer and retry the operations, unless we actually got a retry indicated from actual IO operations. ok jsing@ tb@
* Implement client hello processing in the TLSv1.3 server.jsing2020-01-233-10/+58
| | | | ok beck@
* Correct several issues in the current TLSv1.3 server code.jsing2020-01-231-6/+15
| | | | | | | | | | | | | Correct the parsing of the client hello support versions extension. This has one or more values, rather than just the single selected version. Allocate an SSL_SESSION - this is unused currently, but is needed as soon as we start parsing extensions. Also, pull the cipher suites list off correctly - this is u16 prefixed, not u8. ok beck@
* When certificate validation fails, we must send a DECRYPT_ERROR alertbeck2020-01-231-3/+6
| | | | | | according to RFC8446. ok jsing@
* Remove the ssl_get_message function pointer from SSL_METHOD_INTERNAL.jsing2020-01-236-47/+27
| | | | | | | | | ssl_get_message is essentially a switch between ssl3_get_message and dtls1_get_message, both only used by the legacy stack. Instead, use SSL_IS_DTLS() in ssl3_get_message to call the DTLS function when necessary. ok beck@ inoguchi@ tb@
* Implement sending client certificate requests for 1.3 serverbeck2020-01-231-1/+13
| | | | ok jsing@
* Correctly handle TLSv1.3 ciphers suites in ssl3_choose_cipher().jsing2020-01-234-5/+30
| | | | | | | | | | Currently, TLSv1.3 cipher suites are filtered out by the fact that they have authentication and key exchange algorithms that are not being set in ssl_set_cert_masks(). Fix this so that ssl3_choose_cipher() works for TLSv1.3, however we also now need to ensure that we filter out TLSv1.3 for non-TLSv1.3 and only select TLSv1.3 for TLSv1.3. ok beck@ tb@
* Build the encrypted extensions for the 1.3 serverbeck2020-01-231-2/+8
| | | | ok jsing@