boringssl/ssl
David Benjamin 17b3083373 Use a separate timeout scheme for TLS 1.3.
In TLS 1.2, resumption's benefits are more-or-less subsumed by False
Start. TLS 1.2 resumption lifetime is bounded by how much traffic we are
willing to encrypt without fresh key material, so the lifetime is short.
Renewal uses the same key, so we do not allow it to increase lifetimes.

In TLS 1.3, resumption unlocks 0-RTT. We do not implement psk_ke, so
resumption incorporates fresh key material into both encrypted traffic
(except for early data) and renewed tickets. Thus we are both more
willing to and more interested in longer lifetimes for tickets. Renewal
is also not useless. Thus in TLS 1.3, lifetime is bound separately by
the lifetime of a given secret as a psk_dhe_ke authenticator and the
lifetime of the online signature which authenticated the initial
handshake.

This change maintains two lifetimes on an SSL_SESSION: timeout which is
the renewable lifetime of this ticket, and auth_timeout which is the
non-renewable cliff. It also separates the TLS 1.2 and TLS 1.3 timeouts.
The old session timeout defaults and configuration apply to TLS 1.3, and
we define new ones for TLS 1.3.

Finally, this makes us honor the NewSessionTicket timeout in TLS 1.3.
It's no longer a "hint" in 1.3 and there's probably value in avoiding
known-useless 0-RTT offers.

BUG=120

Change-Id: Iac46d56e5a6a377d8b88b8fa31f492d534cb1b85
Reviewed-on: https://boringssl-review.googlesource.com/13503
Reviewed-by: Adam Langley <agl@google.com>
2017-02-02 19:51:49 +00:00
..
test Use a separate timeout scheme for TLS 1.3. 2017-02-02 19:51:49 +00:00
CMakeLists.txt Move a number of X.509 functions from ssl_lib.c to ssl_x509.c 2017-01-24 17:53:07 +00:00
custom_extensions.c Pass explicit hs parameters into custom_extensions.c. 2016-12-06 19:49:36 +00:00
d1_both.c Remove ssl_hash_message_t from ssl_get_message. 2017-01-27 23:23:57 +00:00
d1_lib.c Add a helper function for resetting SSL_get_error state. 2017-01-04 04:48:44 +00:00
d1_pkt.c dispatch_alert is not an incidental write. 2017-02-02 17:49:44 +00:00
d1_srtp.c Fix ssl_ctx_make_profiles error handling. 2016-09-27 13:27:06 +00:00
dtls_method.c Remove the rest of write_message. 2017-01-25 23:39:23 +00:00
dtls_record.c Don't use the buffer BIO in DTLS. 2017-01-25 23:35:32 +00:00
handshake_client.c Use a separate timeout scheme for TLS 1.3. 2017-02-02 19:51:49 +00:00
handshake_server.c Use a separate timeout scheme for TLS 1.3. 2017-02-02 19:51:49 +00:00
internal.h Use a separate timeout scheme for TLS 1.3. 2017-02-02 19:51:49 +00:00
s3_both.c Remove ssl_hash_message_t from ssl_get_message. 2017-01-27 23:23:57 +00:00
s3_enc.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
s3_lib.c Don't use the buffer BIO in TLS. 2017-01-25 23:35:47 +00:00
s3_pkt.c dispatch_alert is not an incidental write. 2017-02-02 17:49:44 +00:00
ssl_aead_ctx.c Allow dtls_seal_record to work in-place. 2017-01-25 16:27:32 +00:00
ssl_asn1.c Use a separate timeout scheme for TLS 1.3. 2017-02-02 19:51:49 +00:00
ssl_buffer.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
ssl_cert.c Push the use of X509 upwards, out of |ssl_set_cert|. 2017-02-01 20:00:10 +00:00
ssl_cipher.c Remove old ChaCha20-Poly1305 AEAD. 2017-01-19 23:27:54 +00:00
ssl_ecdh.c Remove New Hope key agreement. 2016-12-10 01:06:31 +00:00
ssl_file.c Check for sk_X509_NAME_push failures. 2016-09-27 13:18:37 +00:00
ssl_lib.c Use a separate timeout scheme for TLS 1.3. 2017-02-02 19:51:49 +00:00
ssl_rsa_cc.cc Convert one libssl function to C++11. 2017-01-17 21:51:06 +00:00
ssl_rsa.c Push the use of X509 upwards, out of |ssl_set_cert|. 2017-02-01 20:00:10 +00:00
ssl_session.c Use a separate timeout scheme for TLS 1.3. 2017-02-02 19:51:49 +00:00
ssl_stat.c Remove the rest of write_message. 2017-01-25 23:39:23 +00:00
ssl_test.cc Use a separate timeout scheme for TLS 1.3. 2017-02-02 19:51:49 +00:00
ssl_x509.c Don't use |X509| objects in |CERT|, by default. 2017-01-27 16:21:05 +00:00
t1_enc.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
t1_lib.c Remove mask_a and mask_k from CERT. 2017-01-27 15:44:17 +00:00
tls13_both.c Remove ssl_hash_message_t from ssl_get_message. 2017-01-27 23:23:57 +00:00
tls13_client.c Use a separate timeout scheme for TLS 1.3. 2017-02-02 19:51:49 +00:00
tls13_enc.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
tls13_server.c Use a separate timeout scheme for TLS 1.3. 2017-02-02 19:51:49 +00:00
tls_method.c Remove the rest of write_message. 2017-01-25 23:39:23 +00:00
tls_record.c Don't use the buffer BIO in DTLS. 2017-01-25 23:35:32 +00:00