boringssl/ssl/test/runner
David Benjamin f01f42a2ce Negotiate ciphers before resumption.
This changes our resumption strategy. Before, we would negotiate ciphers
only on fresh handshakes. On resumption, we would blindly use whatever
was in the session.

Instead, evaluate cipher suite preferences on every handshake.
Resumption requires that the saved cipher suite match the one that would
have been negotiated anyway. If client or server preferences changed
sufficiently, we decline the session.

This is much easier to reason about (we always pick the best cipher
suite), simpler, and avoids getting stuck under old preferences if
tickets are continuously renewed. Notably, although TLS 1.2 ticket
renewal does not work in practice, TLS 1.3 will renew tickets like
there's no tomorrow.

It also means we don't need dedicated code to avoid resuming a cipher
which has since been disabled. (That dedicated code was a little odd
anyway since the mask_k, etc., checks didn't occur. When cert_cb was
skipped on resumption, one could resume without ever configuring a
certificate! So we couldn't know whether to mask off RSA or ECDSA cipher
suites.)

Add tests which assert on this new arrangement.

BUG=116

Change-Id: Id40d851ccd87e06c46c6ec272527fd8ece8abfc6
Reviewed-on: https://boringssl-review.googlesource.com/11847
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
2016-11-17 01:02:42 +00:00
..
curve25519
newhope
poly1305
alert.go Add the certificate_required alert. 2016-10-10 15:48:06 +00:00
cert.pem
chacha20_poly1305_test.go
chacha20_poly1305.go
channel_id_key.pem
cipher_suites.go Update to TLS 1.3 draft 18. 2016-11-15 06:57:21 +00:00
common.go Do not send unsolicited SCTs in TLS 1.3. 2016-11-16 00:20:09 +00:00
conn.go Update to TLS 1.3 draft 18. 2016-11-15 06:57:21 +00:00
deterministic.go
dtls.go Moving TLS 1.3 version negotiation into extension. 2016-09-27 20:12:22 +00:00
ecdsa_p256_cert.pem
ecdsa_p256_key.pem
ecdsa_p384_cert.pem
ecdsa_p384_key.pem
ecdsa_p521_cert.pem
ecdsa_p521_key.pem
fuzzer_mode.json Update suppressions for fuzzer mode. 2016-11-15 07:00:35 +00:00
handshake_client.go Loosen TLS 1.3 session/cipher matching in BoGo. 2016-11-16 13:19:25 +00:00
handshake_messages.go Remove out-of-date BoGo earlyDataContext parsing bits. 2016-11-15 13:55:26 +00:00
handshake_server.go Loosen TLS 1.3 session/cipher matching in BoGo. 2016-11-16 13:19:25 +00:00
hkdf_test.go
hkdf.go
key_agreement.go Apply version/wire mapping at a higher layer in runner. 2016-09-27 15:09:16 +00:00
key.pem
packet_adapter.go
prf.go Update to TLS 1.3 draft 18. 2016-11-15 06:57:21 +00:00
recordingconn.go
rsa_1024_cert.pem
rsa_1024_key.pem
rsa_chain_cert.pem Add runner tests which send intermediate certificates. 2016-11-15 01:36:37 +00:00
rsa_chain_key.pem Add runner tests which send intermediate certificates. 2016-11-15 01:36:37 +00:00
runner_test.go
runner.go Negotiate ciphers before resumption. 2016-11-17 01:02:42 +00:00
shim_ticket.go Test bad records at all cipher suites. 2016-11-10 16:19:51 +00:00
sign.go RSA-PSS should work in TLS 1.2. 2016-08-19 18:44:26 +00:00
test_output.go
ticket.go
tls.go