boringssl/ssl
David Benjamin 44d3eed2bb Forbid caller-initiated renegotiations and all renego as a servers.
The only case where renego is supported is if we are a client and the
server sends a HelloRequest. That is still needed to support the renego
+ client auth hack in Chrome. Beyond that, no other forms of renego will
work.

The messy logic where the handshake loop is repurposed to send
HelloRequest and the extremely confusing tri-state s->renegotiate (which
makes SSL_renegotiate_pending a lie during the initial handshake as a
server) are now gone. The next change will further simplify things by
removing ssl->s3->renegotiate and the renego deferral logic. There's
also some server-only renegotiation checks that can go now.

Also clean up ssl3_read_bytes' HelloRequest handling. The old logic relied on
the handshake state machine to reject bad HelloRequests which... actually that
code probably lets you initiate renego by sending the first four bytes of a
ServerHello and expecting the peer to read it later.

BUG=429450

Change-Id: Ie0f87d0c2b94e13811fe8e22e810ab2ffc8efa6c
Reviewed-on: https://boringssl-review.googlesource.com/4824
Reviewed-by: Adam Langley <agl@google.com>
2015-05-21 20:43:56 +00:00
..
pqueue Fix some malloc test crashs. 2015-05-21 18:00:10 +00:00
test Forbid caller-initiated renegotiations and all renego as a servers. 2015-05-21 20:43:56 +00:00
CMakeLists.txt Add malloc test support to unit tests. 2015-05-21 17:59:48 +00:00
d1_both.c Pass a dtls1_use_epoch enum down to dtls1_seal_record. 2015-05-21 17:59:36 +00:00
d1_clnt.c Forbid caller-initiated renegotiations and all renego as a servers. 2015-05-21 20:43:56 +00:00
d1_lib.c Pass a dtls1_use_epoch enum down to dtls1_seal_record. 2015-05-21 17:59:36 +00:00
d1_meth.c Forbid caller-initiated renegotiations and all renego as a servers. 2015-05-21 20:43:56 +00:00
d1_pkt.c Deprecate SSL_*_read_ahead and enforce DTLS packet boundaries. 2015-05-21 18:29:34 +00:00
d1_srtp.c Fix STACK_OF pointer style. 2015-05-06 22:55:16 +00:00
d1_srvr.c Forbid caller-initiated renegotiations and all renego as a servers. 2015-05-21 20:43:56 +00:00
internal.h Forbid caller-initiated renegotiations and all renego as a servers. 2015-05-21 20:43:56 +00:00
s3_both.c Remove redundant setup buffer calls. 2015-05-11 21:31:59 +00:00
s3_clnt.c Forbid caller-initiated renegotiations and all renego as a servers. 2015-05-21 20:43:56 +00:00
s3_enc.c Remove unnecessary NULL checks, part 5. 2015-05-04 23:16:19 +00:00
s3_lib.c Factor SSL_AEAD_CTX into a dedicated type. 2015-05-21 17:59:15 +00:00
s3_meth.c Forbid caller-initiated renegotiations and all renego as a servers. 2015-05-21 20:43:56 +00:00
s3_pkt.c Forbid caller-initiated renegotiations and all renego as a servers. 2015-05-21 20:43:56 +00:00
s3_srvr.c Forbid caller-initiated renegotiations and all renego as a servers. 2015-05-21 20:43:56 +00:00
ssl_aead_ctx.c Factor SSL_AEAD_CTX into a dedicated type. 2015-05-21 17:59:15 +00:00
ssl_algs.c Rename ssl_locl.h to internal.h 2015-04-10 22:14:09 +00:00
ssl_asn1.c Remove unnecessary NULL checks, part 5. 2015-05-04 23:16:19 +00:00
ssl_cert.c Remove remaining calls to the old lock functions. 2015-05-20 19:18:13 +00:00
ssl_cipher.c Remove dead field from CIPHER_ORDER. 2015-05-06 22:36:31 +00:00
ssl_lib.c Forbid caller-initiated renegotiations and all renego as a servers. 2015-05-21 20:43:56 +00:00
ssl_rsa.c Switch EVP_PKEY_dup calls to EVP_PKEY_up_ref. 2015-05-06 22:57:09 +00:00
ssl_sess.c Remove remaining calls to the old lock functions. 2015-05-20 19:18:13 +00:00
ssl_stat.c Rename ssl_locl.h to internal.h 2015-04-10 22:14:09 +00:00
ssl_test.cc Fix some malloc test crashs. 2015-05-21 18:00:10 +00:00
ssl_txt.c Rename ssl_locl.h to internal.h 2015-04-10 22:14:09 +00:00
t1_enc.c Factor SSL_AEAD_CTX into a dedicated type. 2015-05-21 17:59:15 +00:00
t1_lib.c Switch three more renegotiate checks to initial_handshake_complete. 2015-05-21 18:31:55 +00:00
t1_reneg.c Include-what-you-use ssl/internal.h. 2015-04-10 22:15:02 +00:00