diff options
author | David Benjamin <davidben@google.com> | 2016-07-15 06:10:43 +0300 |
---|---|---|
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | 2016-07-16 11:25:02 +0300 |
commit | 61672818efc108e16166491d0757f3baa1cfc9ec (patch) | |
tree | fce20435afc3fe115bca45b681a7a79cf6c08a9b /crypto | |
parent | cea0ab43612e81966f80e209fc851340f56eff5a (diff) |
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>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/err/ssl.errordata | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/err/ssl.errordata b/crypto/err/ssl.errordata index f211a24f..f9d557e6 100644 --- a/crypto/err/ssl.errordata +++ b/crypto/err/ssl.errordata @@ -19,6 +19,7 @@ SSL,117,BAD_SSL_FILETYPE SSL,118,BAD_WRITE_RETRY SSL,119,BIO_NOT_SET SSL,120,BN_LIB +SSL,255,BUFFERED_MESSAGES_ON_CIPHER_CHANGE SSL,121,BUFFER_TOO_SMALL SSL,122,CA_DN_LENGTH_MISMATCH SSL,123,CA_DN_TOO_LONG |