boringssl/crypto
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
..
aes aes/asm/bsaes-armv7.pl: fix compilation with Xcode 6.3. 2015-05-27 21:58:27 +00:00
asn1 Convert reference counts in crypto/ 2015-05-20 19:15:26 +00:00
base64 Add malloc test support to unit tests. 2015-05-21 17:59:48 +00:00
bio Add |BIO_read_asn1| to read a single ASN.1 object. 2015-05-27 15:21:56 -07:00
bn Fix bn_test's bc output and shut it up a little. 2015-05-28 17:25:41 +00:00
buf
bytestring Fix some malloc test crashs. 2015-05-21 18:00:10 +00:00
chacha
cipher Match the ifdef check in bsaes-armv7.S 2015-06-02 18:14:41 +00:00
cmac Add support for CMAC (RFC 4493). 2015-05-07 21:13:41 +00:00
conf Add NCONF_load_bio. 2015-04-06 16:58:45 -07:00
des Implement |DES_ede2_cbc_encrypt|. 2015-05-20 18:36:01 +00:00
dh Add malloc test support to unit tests. 2015-05-21 17:59:48 +00:00
digest Add |EVP_get_digestbyname|. 2015-06-03 21:34:07 +00:00
dsa Fix some malloc test crashs. 2015-05-21 18:00:10 +00:00
ec Fix some malloc test crashs. 2015-05-21 18:00:10 +00:00
ecdh
ecdsa Add malloc test support to unit tests. 2015-05-21 17:59:48 +00:00
engine
err Tighten up EMS resumption behaviour. 2015-06-03 22:05:50 +00:00
evp Unexport and prune EVP_MD_CTX flags. 2015-06-02 01:08:10 +00:00
hkdf Add malloc test support to unit tests. 2015-05-21 17:59:48 +00:00
hmac Remove HMAC_CTX_set_flags. 2015-06-02 01:07:07 +00:00
lhash Fix some malloc test crashs. 2015-05-21 18:00:10 +00:00
md4 Fix integer types in low-level hash functions. 2015-06-01 22:12:21 +00:00
md5 Fix integer types in low-level hash functions. 2015-06-01 22:12:21 +00:00
modes Add some comments and tweak assertions for cbc.c. 2015-05-27 21:48:36 +00:00
obj Tidy up overflows in obj_cmp. 2015-05-28 17:22:19 +00:00
pem Implement |PEM_def_callback| and call it where appropriate. 2015-06-03 17:58:44 +00:00
perlasm Add assembly support for 32-bit iOS. 2015-05-04 22:44:24 +00:00
pkcs8 Add malloc test support to unit tests. 2015-05-21 17:59:48 +00:00
poly1305 Fix ARM Clang build. 2015-05-05 00:24:59 +00:00
rand Don't use uninitialized memory in RAND_bytes. 2015-05-15 20:31:27 +00:00
rc4 Mind the end of the buffer in aligned case of generic RC4 implementation. 2015-05-12 19:31:09 +00:00
rsa Add malloc test support to unit tests. 2015-05-21 17:59:48 +00:00
sha Fix compilation of sha256-armv4.S when using -march=armv6 2015-06-02 18:15:37 +00:00
stack Remove unnecessary NULL checks, part 4. 2015-05-04 23:13:12 +00:00
test Disable the malloc interceptor without glibc. 2015-06-01 17:45:27 +00:00
x509 Add malloc test support to unit tests. 2015-05-21 17:59:48 +00:00
x509v3 Add OPENSSL_PUT_ERROR line to X509V3_parse_list. 2015-05-27 21:56:16 +00:00
arm_arch.h
CMakeLists.txt Add malloc test support to unit tests. 2015-05-21 17:59:48 +00:00
constant_time_test.c
cpu-arm-asm.S
cpu-arm.c Support Trusty, an embedded platform. 2015-05-08 18:34:55 +00:00
cpu-intel.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
cpu-x86_64-asm.pl Remove explicit .hiddens from x86_64 perlasm files. 2015-02-25 21:26:16 +00:00
cpu-x86-asm.pl Never set RC4_CHAR. 2015-02-20 23:59:59 +00:00
crypto.c Fix |SSLeay|. 2015-05-20 17:44:44 +00:00
directory_posix.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
directory_win.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
directory.h
ex_data.c Remove unnecessary NULL checks, part 3. 2015-05-04 23:12:04 +00:00
header_removed.h
internal.h Have consumers supply OPENSSL_C11_ATOMIC. 2015-05-27 19:21:59 +00:00
mem.c Lowercase some Windows headers. 2015-03-31 22:21:42 +00:00
refcount_c11.c Cast refcounts to _Atomic before use. 2015-05-20 13:39:22 -07:00
refcount_lock.c Add infrastructure for reference counts. 2015-05-20 19:14:59 +00:00
refcount_test.c Specify argc and argv arguments to refcount_test:main. 2015-05-20 13:49:41 -07:00
thread_none.c Support Trusty, an embedded platform. 2015-05-08 18:34:55 +00:00
thread_pthread.c Support Trusty, an embedded platform. 2015-05-08 18:34:55 +00:00
thread_test.c Support Trusty, an embedded platform. 2015-05-08 18:34:55 +00:00
thread_win.c Support Trusty, an embedded platform. 2015-05-08 18:34:55 +00:00
thread.c Remove leftovers of the old-style locks. 2015-05-20 19:18:44 +00:00
time_support.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00