f01f42a2ce
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> |
||
---|---|---|
.. | ||
curve25519 | ||
newhope | ||
poly1305 | ||
alert.go | ||
cert.pem | ||
chacha20_poly1305_test.go | ||
chacha20_poly1305.go | ||
channel_id_key.pem | ||
cipher_suites.go | ||
common.go | ||
conn.go | ||
deterministic.go | ||
dtls.go | ||
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 | ||
handshake_client.go | ||
handshake_messages.go | ||
handshake_server.go | ||
hkdf_test.go | ||
hkdf.go | ||
key_agreement.go | ||
key.pem | ||
packet_adapter.go | ||
prf.go | ||
recordingconn.go | ||
rsa_1024_cert.pem | ||
rsa_1024_key.pem | ||
rsa_chain_cert.pem | ||
rsa_chain_key.pem | ||
runner_test.go | ||
runner.go | ||
shim_ticket.go | ||
sign.go | ||
test_output.go | ||
ticket.go | ||
tls.go |