98e882ead1
ssl23_get_client_hello has lots of remnants of SSLv2 support and remnants of an even older SSL_OP_NON_EXPORT_FIRST option (see upstream's d92f0bb6e9ed94ac0c3aa0c939f2565f2ed95935) which complicates the logic. Split it into three states and move V2ClientHello parsing into its own function. Port it to CBS and CBB to give bounds checks on the V2ClientHello parse. This fixes a minor bug where, if the SSL_accept call in ssl23_get_client_hello failed, cb would not be NULL'd and SSL_CB_ACCEPT_LOOP would get reported an extra time. It also unbreaks the invariant between s->packet, s->packet_length, s->s3->rbuf.buf, and s->s3->rbuf.offset at the point the switch, although this was of no consequence because the first ssl3_read_n call passes extend = 0 which resets s->packet and s->packet_length. It also makes us tolerant to major version bumps in the ClientHello. Add tests for TLS tolerance of both minor and major version bumps as well as the HTTP request error codes. Change-Id: I948337f4dc483f4ebe1742d3eba53b045b260257 Reviewed-on: https://boringssl-review.googlesource.com/1455 Reviewed-by: Adam Langley <agl@google.com> |
||
---|---|---|
.. | ||
aes | ||
asn1 | ||
base64 | ||
bio | ||
bn | ||
buf | ||
bytestring | ||
chacha | ||
cipher | ||
conf | ||
des | ||
dh | ||
digest | ||
dsa | ||
ec | ||
ecdh | ||
ecdsa | ||
engine | ||
err | ||
evp | ||
hmac | ||
lhash | ||
md5 | ||
modes | ||
obj | ||
pem | ||
perlasm | ||
pkcs8 | ||
poly1305 | ||
rand | ||
rc4 | ||
rsa | ||
sha | ||
stack | ||
x509 | ||
x509v3 | ||
arm_arch.h | ||
CMakeLists.txt | ||
cpu-arm.c | ||
cpu-intel.c | ||
cpu-x86_64-asm.pl | ||
cpu-x86-asm.pl | ||
crypto_error.c | ||
crypto_error.h | ||
directory_posix.c | ||
directory_win.c | ||
directory.h | ||
ex_data_impl.c | ||
ex_data.c | ||
header_removed.h | ||
internal.h | ||
mem.c | ||
thread.c | ||
time_support.c |