Go to file
David Benjamin 894f48c6b3 Only read 5 bytes (record header length) in sniffing for V2ClientHello.
This guarantees that we never read beyond the first record, even if the
first record is empty. Between removing SSL_set_read_ahead and DTLS
enforcing record boundaries, this means the buffer need never memmove
data.

The memmove isn't really much of a burden and we can probably just put
SSL_set_read_ahead back after the cleanup if desired. But while the
non-existant read_ahead is off, we should avoid reading more than needed.

(Also the current memmove logic is completely wrong for TLS. Checking
align != 0 doesn't make sense. The real reason to memmove is that the
next record may still be full size. So now line 209 of s3_pkt.c should
*actually* be unreachable.)

SSL_R_HTTPS_PROXY_REQUEST detection is now slightly less accurate, but
OpenSSL was already not parsing HTTP completely. We could asynchronously
read the extra 3 bytes once the first 5 match, but that seems
unnecessary. (Shall we just get rid of all these HTTP detectors? The
only consumer of those error codes is some diagnostics logic.)

BUG=468889

Change-Id: Ie3bf148ae7274795e1d048d78282d1d8063278ea
Reviewed-on: https://boringssl-review.googlesource.com/5714
Reviewed-by: Adam Langley <agl@google.com>
2015-08-17 20:58:09 +00:00
crypto Fix a couple other leaks on failure in X509_verify_cert. 2015-08-17 20:35:10 +00:00
decrepit Restore |DES_ede3_cfb_encrypt| and |DES_ede3_cfb64_encrypt| from OpenSSL at ce7e647b. 2015-06-24 01:33:31 +00:00
doc Inital import. 2014-06-20 13:17:32 -07:00
include/openssl Use the record-layer buffer for sniffing V2ClientHellos. 2015-08-17 20:56:21 +00:00
ssl Only read 5 bytes (record header length) in sniffing for V2ClientHello. 2015-08-17 20:58:09 +00:00
tool Convert the Channel ID extension to the new system. 2015-07-21 21:44:11 +00:00
util Get rid of err function codes. 2015-07-16 02:02:08 +00:00
.clang-format Inital import. 2014-06-20 13:17:32 -07:00
.gitignore Add generated documentation to .gitignore 2015-01-26 18:37:55 +00:00
BUILDING Suggest building at Android API level 16. 2015-06-18 17:32:29 -07:00
CMakeLists.txt Allow compilation for armv6 2015-06-02 18:16:13 +00:00
codereview.settings Add a codereview.settings file. 2014-11-18 22:21:33 +00:00
LICENSE Note that some files carry in Intel license. 2015-07-28 00:55:32 +00:00
STYLE Require that FOO_free functions do nothing on NULL. 2015-05-04 22:58:13 +00:00