boringssl/ssl
Adam Langley ba5934b77f Tighten up EMS resumption behaviour.
The client and server both have to decide on behaviour when resuming a
session where the EMS state of the session doesn't match the EMS state
as exchanged in the handshake.

                        Original handshake
      |  No                                         Yes
------+--------------------------------------------------------------
      |
R     |  Server: ok [1]                     Server: abort [3]
e  No |  Client: ok [2]                     Client: abort [4]
s     |
u     |
m     |
e     |
  Yes |  Server: don't resume                   No problem
      |  Client: abort; server
      |    shouldn't have resumed

[1] Servers want to accept legacy clients. The draft[5] says that
resumptions SHOULD be rejected so that Triple-Handshake can't be done,
but we'll rather enforce that EMS was used when using tls-unique etc.

[2] The draft[5] says that even the initial handshake should be aborted
if the server doesn't support EMS, but we need to be able to talk to the
world.

[3] This is a very weird case where a client has regressed without
flushing the session cache. Hopefully we can be strict and reject these.

[4] This can happen when a server-farm shares a session cache but
frontends are not all updated at once. If Chrome is strict here then
hopefully we can prevent any servers from existing that will try to
resume an EMS session that they don't understand. OpenSSL appears to be
ok here: https://www.ietf.org/mail-archive/web/tls/current/msg16570.html

[5] https://tools.ietf.org/html/draft-ietf-tls-session-hash-05#section-5.2

BUG=492200

Change-Id: Ie1225a3960d49117b05eefa5a36263d8e556e467
Reviewed-on: https://boringssl-review.googlesource.com/4981
Reviewed-by: Adam Langley <agl@google.com>
2015-06-03 22:05:50 +00:00
..
pqueue Fix some malloc test crashs. 2015-05-21 18:00:10 +00:00
test Tighten up EMS resumption behaviour. 2015-06-03 22:05:50 +00:00
CMakeLists.txt Add malloc test support to unit tests. 2015-05-21 17:59:48 +00:00
d1_both.c Fold away SSL_PROTOCOL_METHOD hooks shared between TLS and DTLS. 2015-06-01 22:29:46 +00:00
d1_clnt.c Remove SSL_in_before and SSL_ST_BEFORE. 2015-05-21 20:51:06 +00:00
d1_lib.c Further tidy up cipher logic. 2015-06-01 22:48:30 +00:00
d1_meth.c Further tidy up cipher logic. 2015-06-01 22:48:30 +00:00
d1_pkt.c Split ssl_read_bytes hook into app_data and close_notify hooks. 2015-06-01 22:27:55 +00:00
d1_srtp.c Fix STACK_OF pointer style. 2015-05-06 22:55:16 +00:00
d1_srvr.c Decide whether or not to request client certificates early. 2015-05-27 21:53:16 +00:00
internal.h Further tidy up cipher logic. 2015-06-01 22:48:30 +00:00
s3_both.c Split ssl_read_bytes hook into app_data and close_notify hooks. 2015-06-01 22:27:55 +00:00
s3_clnt.c Tighten up EMS resumption behaviour. 2015-06-03 22:05:50 +00:00
s3_enc.c Remove unnecessary NULL checks, part 5. 2015-05-04 23:16:19 +00:00
s3_lib.c Further tidy up cipher logic. 2015-06-01 22:48:30 +00:00
s3_meth.c Further tidy up cipher logic. 2015-06-01 22:48:30 +00:00
s3_pkt.c Split ssl_read_bytes hook into app_data and close_notify hooks. 2015-06-01 22:27:55 +00:00
s3_srvr.c Tighten up EMS resumption behaviour. 2015-06-03 22:05:50 +00:00
ssl_aead_ctx.c Factor SSL_AEAD_CTX into a dedicated type. 2015-05-21 17:59:15 +00:00
ssl_algs.c Rename ssl_locl.h to internal.h 2015-04-10 22:14:09 +00:00
ssl_asn1.c Further tidy up cipher logic. 2015-06-01 22:48:30 +00:00
ssl_cert.c Remove remaining calls to the old lock functions. 2015-05-20 19:18:13 +00:00
ssl_cipher.c Further tidy up cipher logic. 2015-06-01 22:48:30 +00:00
ssl_lib.c Further tidy up cipher logic. 2015-06-01 22:48:30 +00:00
ssl_rsa.c Switch EVP_PKEY_dup calls to EVP_PKEY_up_ref. 2015-05-06 22:57:09 +00:00
ssl_sess.c Remove remaining calls to the old lock functions. 2015-05-20 19:18:13 +00:00
ssl_stat.c Remove SSL_in_before and SSL_ST_BEFORE. 2015-05-21 20:51:06 +00:00
ssl_test.cc Reject sessions with the wrong structure version. 2015-06-01 20:30:02 +00:00
ssl_txt.c Rename ssl_locl.h to internal.h 2015-04-10 22:14:09 +00:00
t1_enc.c Fold TLS1_PRF_* into SSL_HANDSHAKE_MAC_* 2015-06-01 22:43:06 +00:00
t1_lib.c Switch three more renegotiate checks to initial_handshake_complete. 2015-05-21 18:31:55 +00:00
t1_reneg.c Include-what-you-use ssl/internal.h. 2015-04-10 22:15:02 +00:00