Matt Caswell [Fri, 10 Mar 2017 13:54:32 +0000 (13:54 +0000)]
Add a test to check that if a PSK extension is not last then we fail
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2896)
Matt Caswell [Fri, 10 Mar 2017 13:53:53 +0000 (13:53 +0000)]
Check that the PSK extension is last
We need to check that the PSK extension in a ClientHello is the last one.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2896)
Bernd Edlinger [Wed, 22 Feb 2017 07:14:07 +0000 (08:14 +0100)]
Fixup previous merge.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2703)
Richard Levitte [Thu, 9 Mar 2017 18:08:03 +0000 (19:08 +0100)]
Make it possible to select or deselect test groups by number
Examples of possible expressions (adapt to your platform):
make test TESTS=-99
make test TESTS=10
make test TESTS=-9?
make test TESTS=-[89]0
make test TESTS=[89]0
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2887)
Pauli [Wed, 8 Mar 2017 23:42:25 +0000 (09:42 +1000)]
Make the output of enc -ciphers identical even if run several times in a session.
This amounts to moving the column counter so it isn't a function local static variable and reinitialising it each time.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2884)
Jon Spillett [Wed, 1 Mar 2017 04:22:21 +0000 (14:22 +1000)]
Exit the loop on failure
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2805)
Todd Short [Wed, 8 Mar 2017 18:49:44 +0000 (13:49 -0500)]
Add some TLS13 values to s_client/s_server
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2882)
Pauli [Wed, 8 Mar 2017 01:18:55 +0000 (11:18 +1000)]
Limit the output of the enc -ciphers command to just the ciphers enc can
process. This means no AEAD ciphers and no XTS mode.
Update the test script that uses this output to test cipher suites to not
filter out the now missing cipher modes.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2876)
Roberto Guimaraes [Sun, 26 Feb 2017 23:47:40 +0000 (15:47 -0800)]
this change will prevent undefined behavior when src and dst are equal (memcpy), effectively allowing setting length only in both functions.
CLA: trivial
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2750)
Matt Caswell [Tue, 7 Mar 2017 09:58:27 +0000 (09:58 +0000)]
Fix no-comp
The value of SSL3_RT_MAX_ENCRYPTED_LENGTH normally includes the compression
overhead (even if no compression is negotiated for a connection). Except in
a build where no-comp is used the value of SSL3_RT_MAX_ENCRYPTED_LENGTH does
not include the compression overhead.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2872)
Matt Caswell [Tue, 7 Mar 2017 16:21:38 +0000 (16:21 +0000)]
Fix the number of tests to skip if TLSv1.3 is disabled
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2875)
Matt Caswell [Tue, 7 Mar 2017 12:03:10 +0000 (12:03 +0000)]
Add a test for records not on the record boundary
Test that we check that key change messages appear on a record boundary.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2875)
Matt Caswell [Tue, 7 Mar 2017 10:21:58 +0000 (10:21 +0000)]
Check TLSv1.3 ServerHello, Finished and KeyUpdates are on record boundary
In TLSv1.3 the above messages signal a key change. The spec requires that
the end of these messages must align with a record boundary. We can detect
this by checking for decrypted but as yet unread record data sitting in
OpenSSL buffers at the point where we process the messages.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2875)
Matt Caswell [Fri, 3 Mar 2017 12:41:39 +0000 (12:41 +0000)]
Provide a function to test whether we have unread records pending
Also updates SSL_has_pending() to use it. This actually fixes a bug in
SSL_has_pending() which is supposed to return 1 if we have any processed
or unprocessed data sitting in OpenSSL buffers. However it failed to return
1 if we had processed non-application data pending.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2875)
Pauli [Mon, 6 Mar 2017 22:45:48 +0000 (08:45 +1000)]
Remove doc reference to non-existant GCM example
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2866)
Rich Salz [Thu, 16 Feb 2017 16:13:47 +0000 (11:13 -0500)]
Get pointer type right in BIO_ssl_shutdown()
Also, restore 1.0.2 behavior of looping over all BIO's in the chain.
Thanks to Joseph Bester for finding this and suggesting a fix to the
crash.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2651)
Andy Polyakov [Sun, 5 Mar 2017 19:38:36 +0000 (20:38 +0100)]
crypto/x86_64cpuid.pl: move extended feature detection upwards.
Exteneded feature flags were not pulled on AMD processors, as result a
number of extensions were effectively masked on Ryzen. It should have
been reported for Excavator since it implements AVX2 extension, but
apparently nobody noticed or cared...
Reviewed-by: Rich Salz <rsalz@openssl.org>
Andy Polyakov [Sat, 4 Mar 2017 22:11:16 +0000 (23:11 +0100)]
test: add chacha_internal_test.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Pauli [Tue, 7 Mar 2017 00:12:05 +0000 (10:12 +1000)]
Increase the password buffer size to APP_PASS_LEN.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2868)
Richard Levitte [Mon, 6 Mar 2017 20:17:32 +0000 (21:17 +0100)]
Unix Makefile: Have manual generation use the same perl script as Windows and VMS
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2863)
Richard Levitte [Mon, 6 Mar 2017 20:16:35 +0000 (21:16 +0100)]
util/process_docs.pl: make it possible to add a suffix to man docs
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2863)
Matt Caswell [Mon, 6 Mar 2017 16:56:42 +0000 (16:56 +0000)]
Add a test to check that we correctly handle record overflows
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2861)
Matt Caswell [Mon, 6 Mar 2017 15:13:25 +0000 (15:13 +0000)]
Tweak the TLSv1.3 record overflow limits
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2861)
Kurt Roeckx [Sun, 5 Mar 2017 20:00:11 +0000 (21:00 +0100)]
Fix double free in cookie generation.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
GH: #2850
Rich Salz [Fri, 3 Mar 2017 20:03:42 +0000 (15:03 -0500)]
Remove some duplicate manpage entries
[skip ci]
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2860)
Richard Levitte [Mon, 6 Mar 2017 10:19:49 +0000 (11:19 +0100)]
Add documentation on platform specific checks
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2851)
Richard Levitte [Sun, 5 Mar 2017 20:51:18 +0000 (21:51 +0100)]
Add a platform specific configuration checker
For each platform, we may need to perform some basic checks to see
that available tools perform as we expect them.
For the moment, the added checkers test that Perl gives the expected
path format. This should help MingW users to see if they run an
appropriate Perl implementation, for example.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2851)
Rich Salz [Mon, 6 Mar 2017 14:54:17 +0000 (09:54 -0500)]
Fix an endless loop in rsa_builtin_keygen.
And add a test case.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2757)
Matt Caswell [Mon, 6 Mar 2017 10:16:07 +0000 (10:16 +0000)]
Fix no-ec
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2858)
Matt Caswell [Mon, 6 Mar 2017 10:03:53 +0000 (10:03 +0000)]
Fix a test failure with no-tls1_1
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2857)
Matt Caswell [Mon, 6 Mar 2017 09:51:54 +0000 (09:51 +0000)]
Fix no-psk
Fixes #2847
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2856)
Matt Caswell [Sat, 4 Mar 2017 23:58:03 +0000 (23:58 +0000)]
Don't call memcmp with a NULL pointer
If early data is sent to a server, but ALPN is not used then memcmp is
called with a NULL pointer which is undefined behaviour.
Fixes #2841
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2845)
Matt Caswell [Fri, 3 Mar 2017 10:28:02 +0000 (10:28 +0000)]
Add a test for TLSv1.3 cookies
We just check that if we insert a cookie into an HRR it gets echoed back
in the subsequent ClientHello.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2839)
Matt Caswell [Thu, 2 Mar 2017 17:37:03 +0000 (17:37 +0000)]
Add basic TLSv1.3 cookie support
We do not allow the generation of TLSv1.3 cookies. But if we receive one
in an HRR we will echo it back in the ClientHello.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2839)
Andy Polyakov [Thu, 2 Mar 2017 13:07:45 +0000 (14:07 +0100)]
appveyor.yml: call upon cmd to redirect stderr.
If stderr is not redirected an uncatchable exception is thrown.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Andy Polyakov [Thu, 2 Mar 2017 15:56:44 +0000 (16:56 +0100)]
apps/s_client.c: harden ldap_ExtendedResponse_parse.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Matt Caswell [Sat, 4 Mar 2017 15:45:40 +0000 (15:45 +0000)]
Fix a memory leak on an error path
A leak of an SSL_SESSION object can occur when decoding a psk extension on
an error path when using TLSv1.3
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2843)
Matt Caswell [Fri, 3 Mar 2017 08:56:25 +0000 (08:56 +0000)]
Ensure we don't call memcpy with a NULL pointer
Commit
d5aa14dd simplified the bn_expand_internal() and BN_copy() functions.
Unfortunately it also removed some checks which are still required,
otherwise we call memcpy passing in NULL which is not allowed.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2836)
Dr. Stephen Henson [Fri, 3 Mar 2017 21:02:42 +0000 (21:02 +0000)]
Update and add test
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2840)
Dr. Stephen Henson [Fri, 3 Mar 2017 03:23:27 +0000 (03:23 +0000)]
Set specific error is we have no valid signature algorithms set
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2840)
Dr. Stephen Henson [Fri, 3 Mar 2017 03:10:13 +0000 (03:10 +0000)]
Signature algorithm enhancement.
Change tls12_sigalg_allowed() so it is passed a SIGALG_LOOKUP parameter,
this avoids multiple lookups.
When we copy signature algorithms return an error if no valid TLS message
signing algorithm is present. For TLS 1.3 this means we need at least one
signature algorithm other than RSA PKCS#1 or SHA1 both of which can only be
used to sign certificates and not TLS messages.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2840)
Dr. Stephen Henson [Fri, 3 Mar 2017 02:44:18 +0000 (02:44 +0000)]
Disallow zero length signature algorithms
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2840)
Dr. Stephen Henson [Wed, 1 Mar 2017 17:15:43 +0000 (17:15 +0000)]
Don't allow DSA for TLS 1.3
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2840)
edelangh [Fri, 17 Feb 2017 12:23:22 +0000 (13:23 +0100)]
use OSSLzu instead of lu format for size_t display
CLA: trivial
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2660)
Bernd Edlinger [Fri, 3 Mar 2017 08:13:40 +0000 (09:13 +0100)]
Reset executable bits on files where not needed.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2835)
Pauli [Thu, 2 Mar 2017 02:52:44 +0000 (12:52 +1000)]
Update the cipher(1) documentation to explicitly state that the RSA cipher
string means the same a kRSA.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2821)
Rich Salz [Fri, 3 Mar 2017 00:16:57 +0000 (19:16 -0500)]
sh_malloc & sh_free prototype change to match POSIX
CLA: trivial
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2823)
Matt Caswell [Fri, 3 Mar 2017 00:03:47 +0000 (00:03 +0000)]
Silence some more clang warnings
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2832)
Matt Caswell [Thu, 2 Mar 2017 23:53:30 +0000 (23:53 +0000)]
Silence some clang warnings
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2831)
Matt Caswell [Thu, 2 Mar 2017 17:40:43 +0000 (17:40 +0000)]
More early data documentation updates following feedback
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Thu, 2 Mar 2017 16:05:02 +0000 (16:05 +0000)]
Update the API documentation for the latest early data changes
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Thu, 2 Mar 2017 15:49:33 +0000 (15:49 +0000)]
Update early data API for writing to unauthenticated clients
Change the early data API so that the server must use
SSL_write_early_data() to write to an unauthenticated client.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Thu, 2 Mar 2017 15:05:36 +0000 (15:05 +0000)]
Rename SSL_write_early() to SSL_write_early_data()
This is for consistency with the rest of the API where all the functions
are called *early_data*.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Thu, 2 Mar 2017 14:42:55 +0000 (14:42 +0000)]
Rename SSL_read_early() to SSL_read_early_data()
This is for consistency with the rest of the API where all the functions
are called *early_data*.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Tue, 28 Feb 2017 00:40:24 +0000 (00:40 +0000)]
Updates to the early data documentation
Following on from the latest API changes.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Mon, 27 Feb 2017 20:55:04 +0000 (20:55 +0000)]
Updates to s_server and s_client for the latest early_data API changes
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Mon, 27 Feb 2017 20:54:39 +0000 (20:54 +0000)]
Make SSL_write_early_finish() an internal only function
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Mon, 27 Feb 2017 11:20:22 +0000 (11:20 +0000)]
Add early_data tests
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Mon, 27 Feb 2017 11:19:57 +0000 (11:19 +0000)]
Various fixes required to allow SSL_write/SSL_read during early data
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Sat, 25 Feb 2017 15:59:44 +0000 (15:59 +0000)]
Enable the server to call SSL_write() without stopping the ability to call SSL_read_early()
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Sat, 25 Feb 2017 15:34:07 +0000 (15:34 +0000)]
Enable the client to call SSL_read() without stopping the ability to call SSL_write_early()
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Sat, 25 Feb 2017 00:06:49 +0000 (00:06 +0000)]
Introduce a new early_data state in the state machine
Also simplifies the state machine a bit.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Fri, 24 Feb 2017 17:08:41 +0000 (17:08 +0000)]
Improve the early data sanity check in SSL_do_handshake()
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Fri, 24 Feb 2017 16:17:00 +0000 (16:17 +0000)]
Add documentation for the new s_client and s_server early_data options
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Fri, 24 Feb 2017 16:11:03 +0000 (16:11 +0000)]
Tighten sanity checks when calling early data functions
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Fri, 24 Feb 2017 15:38:38 +0000 (15:38 +0000)]
Add documentation for the early data functions
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Fri, 24 Feb 2017 14:17:41 +0000 (14:17 +0000)]
Make SSL_get_early_data_status() take a const
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Fri, 24 Feb 2017 14:08:59 +0000 (14:08 +0000)]
Make SSL_get_max_early_data() and SSL_CTX_get_max_early_data() take a const
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Fri, 24 Feb 2017 14:08:06 +0000 (14:08 +0000)]
Add a SSL_SESSION_get_max_early_data() function
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Fri, 24 Feb 2017 13:51:04 +0000 (13:51 +0000)]
Don't attempt to write more early_data than we know the server will accept
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Fri, 24 Feb 2017 12:45:37 +0000 (12:45 +0000)]
Only accept early_data if the negotiated ALPN is the same
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Fri, 24 Feb 2017 11:40:49 +0000 (11:40 +0000)]
Skip early_data if appropriate after a HelloRetryRequest
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Fri, 24 Feb 2017 11:13:25 +0000 (11:13 +0000)]
Don't accept early_data if we are going to issue a HelloRetryRequest
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Fri, 24 Feb 2017 10:29:20 +0000 (10:29 +0000)]
Add extra validation parsing the server-to-client early_data extension
Check that we actually resumed the session, and that we selected the first
identity.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Fri, 24 Feb 2017 09:34:32 +0000 (09:34 +0000)]
Remove some TLSv1.3 TODOs that are no longer relevant
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Fri, 24 Feb 2017 09:30:54 +0000 (09:30 +0000)]
Validate the ticket age for resumed sessions
If the ticket age calcualtions do not check out then we must not accept
early data (it could be a replay).
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Thu, 23 Feb 2017 16:54:11 +0000 (16:54 +0000)]
Ensure the max_early_data option to s_server can be 0
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Thu, 23 Feb 2017 16:41:15 +0000 (16:41 +0000)]
Provide a default value for max_early_data
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Thu, 23 Feb 2017 14:29:36 +0000 (14:29 +0000)]
Check max_early_data against the amount of early data we actually receive
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Thu, 23 Feb 2017 16:05:57 +0000 (16:05 +0000)]
Make sure we reset the read sequence when skipping records
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Thu, 23 Feb 2017 12:36:35 +0000 (12:36 +0000)]
Disallow handshake messages in the middle of early_data
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Thu, 23 Feb 2017 12:25:21 +0000 (12:25 +0000)]
Fix seg fault when sending early_data using CCM ciphersuites
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Thu, 23 Feb 2017 11:52:43 +0000 (11:52 +0000)]
Get s_client to report on whether early data was accepted or not
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Thu, 23 Feb 2017 11:53:12 +0000 (11:53 +0000)]
Implement client side parsing of the early_data extension
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Wed, 22 Feb 2017 15:24:11 +0000 (15:24 +0000)]
Add a "-early_data" option to s_server
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Wed, 22 Feb 2017 14:09:42 +0000 (14:09 +0000)]
Fix changing of the cipher state when dealing with early data
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Wed, 22 Feb 2017 13:01:48 +0000 (13:01 +0000)]
Construct the server side early_data extension
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Tue, 21 Feb 2017 17:14:42 +0000 (17:14 +0000)]
Provide an SSL_read_early() function for reading early data
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Tue, 21 Feb 2017 16:40:16 +0000 (16:40 +0000)]
Change the cipher state when sending early data
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Tue, 21 Feb 2017 16:39:43 +0000 (16:39 +0000)]
Implement the early data changes required in tls13_change_cipher_state()
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Mon, 20 Feb 2017 16:00:20 +0000 (16:00 +0000)]
Add an option to s_client to send early_data
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Mon, 20 Feb 2017 16:35:03 +0000 (16:35 +0000)]
Parse the early_data extension
We also skip any early_data that subsequently gets sent. Later commits will
process it if we can.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Mon, 20 Feb 2017 15:44:42 +0000 (15:44 +0000)]
Construct the early_data extension
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Tue, 21 Feb 2017 09:22:22 +0000 (09:22 +0000)]
Provide functions to write early data
We provide SSL_write_early() which *must* be called first on a connection
(prior to any other IO function including SSL_connect()/SSL_do_handshake()).
Also SSL_write_early_finish() which signals the end of early data.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Mon, 20 Feb 2017 14:56:51 +0000 (14:56 +0000)]
Parse the ticket_early_data_info extension
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Fri, 17 Feb 2017 17:41:46 +0000 (17:41 +0000)]
Teach SSL_trace() about the early_data_info extension
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Fri, 17 Feb 2017 17:01:16 +0000 (17:01 +0000)]
Add a -max_early_data option to s_server
Allows you to set the number of bytes that can be sent as early data
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Matt Caswell [Fri, 17 Feb 2017 16:52:12 +0000 (16:52 +0000)]
Construct the ticket_early_data_info extension
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Rich Salz [Thu, 2 Mar 2017 15:07:21 +0000 (10:07 -0500)]
Remove ref to err(7), update copyright.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2825)
Richard Levitte [Thu, 2 Mar 2017 17:27:17 +0000 (18:27 +0100)]
-precert doesn't work when configured no-ct, don't try to test it then
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2827)