boringssl/crypto
David Benjamin 98e882ead1 Clean up s23_srvr.c.
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>
2014-08-12 21:10:56 +00:00
..
aes Windows build fixes. 2014-08-11 22:10:02 +00:00
asn1 Fix OID handling. 2014-08-07 21:09:47 +00:00
base64 Windows build fixes. 2014-08-11 22:10:02 +00:00
bio Windows build fixes. 2014-08-11 22:10:02 +00:00
bn Fix out-of-bounds read in BN_mod_exp_mont_consttime. 2014-08-06 00:11:47 +00:00
buf Move public headers to include/openssl/ 2014-07-14 22:42:18 +00:00
bytestring Clean up s23_srvr.c. 2014-08-12 21:10:56 +00:00
chacha Add visibility rules. 2014-07-31 22:03:11 +00:00
cipher Fix copy in AES-KW. 2014-07-29 19:44:50 -07:00
conf Prevent infinite loop loading config files. 2014-07-28 17:05:13 -07:00
des A bunch of dead assignments. 2014-07-30 00:44:03 +00:00
dh Windows build fixes. 2014-08-11 22:10:02 +00:00
digest Correct endif comment in md32_common.h 2014-08-04 20:28:25 +00:00
dsa Move public headers to include/openssl/ 2014-07-14 22:42:18 +00:00
ec Simplify ec_GFp_simple_points_make_affine. 2014-08-05 21:22:38 +00:00
ecdh Move public headers to include/openssl/ 2014-07-14 22:42:18 +00:00
ecdsa Align EVP return values with BoringSSL convention. 2014-07-29 21:47:51 +00:00
engine Move public headers to include/openssl/ 2014-07-14 22:42:18 +00:00
err Fix err_test. 2014-08-11 16:58:33 -07:00
evp Use EVP_PKEY_dup instead of manually incrementing the refcount. 2014-08-07 00:03:56 +00:00
hmac Move public headers to include/openssl/ 2014-07-14 22:42:18 +00:00
lhash Move public headers to include/openssl/ 2014-07-14 22:42:18 +00:00
md5 Move public headers to include/openssl/ 2014-07-14 22:42:18 +00:00
modes Use unified ARM assembly. 2014-08-08 16:52:36 -07:00
obj Add PKCS7_bundle_certificates. 2014-08-07 18:12:25 +00:00
pem Remove remnants of OPENSSL_FIPS 2014-08-04 19:20:04 +00:00
perlasm Windows build fixes. 2014-08-11 22:10:02 +00:00
pkcs8 Add PKCS8_{decrypt,encrypt}_pbe. 2014-08-01 17:17:36 +00:00
poly1305 Add a control to disable the Poly1305 NEON code. 2014-07-31 22:42:15 +00:00
rand Move public headers to include/openssl/ 2014-07-14 22:42:18 +00:00
rc4 Windows build fixes. 2014-08-11 22:10:02 +00:00
rsa Spell Bleichenbacher's name right. 2014-08-04 18:53:41 +00:00
sha Add visibility rules. 2014-07-31 22:03:11 +00:00
stack Move public headers to include/openssl/ 2014-07-14 22:42:18 +00:00
x509 Add PKCS7_bundle_certificates. 2014-08-07 18:12:25 +00:00
x509v3 Add X509_up_ref and use it internally. 2014-08-07 00:06:34 +00:00
arm_arch.h Add a control to disable the Poly1305 NEON code. 2014-07-31 22:42:15 +00:00
CMakeLists.txt Windows build fixes. 2014-08-11 22:10:02 +00:00
cpu-arm.c Add a control to disable the Poly1305 NEON code. 2014-07-31 22:42:15 +00:00
cpu-intel.c Include some build fixes for OS X. 2014-06-24 11:15:12 -07:00
cpu-x86_64-asm.pl Inital import. 2014-06-20 13:17:32 -07:00
cpu-x86-asm.pl Use asm directives to protect OPENSSL_cleanse. 2014-07-31 18:49:22 +00:00
crypto_error.c Move public headers to include/openssl/ 2014-07-14 22:42:18 +00:00
crypto_error.h Add ISC header to a handful of files. 2014-06-26 10:26:42 -07:00
directory_posix.c Support building with PNaCl. 2014-07-11 19:04:04 +00:00
directory_win.c Inital import. 2014-06-20 13:17:32 -07:00
directory.h Add visibility rules. 2014-07-31 22:03:11 +00:00
ex_data_impl.c Inital import. 2014-06-20 13:17:32 -07:00
ex_data.c Inital import. 2014-06-20 13:17:32 -07:00
header_removed.h Add ISC header to a handful of files. 2014-06-26 10:26:42 -07:00
internal.h Inital import. 2014-06-20 13:17:32 -07:00
mem.c Windows build fixes. 2014-08-11 22:10:02 +00:00
thread.c Windows build fixes. 2014-08-11 22:10:02 +00:00
time_support.c Windows build fixes. 2014-08-11 22:10:02 +00:00