boringssl/crypto/err
David Benjamin 61672818ef Check for buffered handshake messages on cipher change in DTLS.
This is the equivalent of FragmentAcrossChangeCipherSuite for DTLS. It
is possible for us to, while receiving pre-CCS handshake messages, to
buffer up a message with sequence number meant for a post-CCS Finished.
When we then get to the new epoch and attempt to read the Finished, we
will process the buffered Finished although it was sent with the wrong
encryption.

Move ssl_set_{read,write}_state to SSL_PROTOCOL_METHOD hooks as this is
a property of the transport. Notably, read_state may fail. In DTLS
check the handshake buffer size. We could place this check in
read_change_cipher_spec, but TLS 1.3 has no ChangeCipherSpec message, so
we will need to implement this at the cipher change point anyway. (For
now, there is only an assert on the TLS side. This will be replaced with
a proper check in TLS 1.3.)

Change-Id: Ia52b0b81e7db53e9ed2d4f6d334a1cce13e93297
Reviewed-on: https://boringssl-review.googlesource.com/8790
Reviewed-by: Steven Valdez <svaldez@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
2016-07-16 08:25:02 +00:00
..
asn1.errordata Align with upstream's error strings, take two. 2016-03-15 16:02:12 +00:00
bio.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
bn.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
cipher.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
CMakeLists.txt Add a run_tests target to run all tests. 2015-10-26 20:33:44 +00:00
conf.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
dh.errordata Reimplement PKCS #3 DH parameter parsing with crypto/bytestring. 2016-05-09 19:36:41 +00:00
digest.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
dsa.errordata Reimplement DSA parsing logic with crypto/asn1. 2016-02-17 00:26:01 +00:00
ec.errordata Always use Fermat's Little Theorem in ecdsa_sign_setup. 2016-06-20 17:11:42 +00:00
ecdh.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
ecdsa.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
engine.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
err_data_generate.go Make err_data_generator.go silent by default. 2016-04-18 19:42:15 +00:00
err_test.cc Don't bother sampling __func__. 2015-11-03 22:50:59 +00:00
err.c Wrap MSVC-only warning pragmas in a macro. 2016-06-09 21:29:36 +00:00
evp.errordata Reset crypto/evp error codes. 2016-02-26 23:34:04 +00:00
hkdf.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
obj.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
pem.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
pkcs8.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
rsa.errordata Align with upstream's error strings, take two. 2016-03-15 16:02:12 +00:00
ssl.errordata Check for buffered handshake messages on cipher change in DTLS. 2016-07-16 08:25:02 +00:00
x509.errordata Add checks to X509_NAME_oneline() 2016-05-03 16:34:59 +00:00
x509v3.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00