diff options
author | David Benjamin <davidben@chromium.org> | 2014-12-15 03:44:34 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2014-12-16 04:43:51 +0300 |
commit | e4824e8af0f46bd9723750e045401de65741bbe9 (patch) | |
tree | 20b4cf0d029c34890378dd12bd0213884d2e5b19 /ssl/t1_lib.c | |
parent | 44f2d1a9bf3a71d0f502933ac6807d97ae1f16ba (diff) |
Add outgoing messages to the handshake hash at set_handshake_header.
This avoids needing a should_add_to_finished_hash boolean on do_write. The
logic in do_write was a little awkward because do_write would be called
multiple times if the write took several iterations. This also gets complex if
DTLS retransmits are involved. (At a glance, it's not obvious the
BIO_CTRL_DGRAM_MTU_EXCEEDED case actually works.)
Doing it as the handshake message is being prepared avoids this concern. It
also gives a natural point for the extended master secret logic which needs to
do work after the finished hash has been sampled.
As a bonus, we can remove s->d1->retransmitting which was only used to deal
with this issue.
Change-Id: Ifedf23ee4a6c5e08f960d296a6eb1f337a16dc7a
Reviewed-on: https://boringssl-review.googlesource.com/2604
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'ssl/t1_lib.c')
-rw-r--r-- | ssl/t1_lib.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index c8a4feaf..c3cac065 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -141,7 +141,6 @@ const SSL3_ENC_METHOD TLSv1_enc_data = { SSL3_HM_HEADER_LENGTH, ssl3_set_handshake_header, ssl3_handshake_write, - ssl3_add_to_finished_hash, }; const SSL3_ENC_METHOD TLSv1_1_enc_data = { @@ -161,7 +160,6 @@ const SSL3_ENC_METHOD TLSv1_1_enc_data = { SSL3_HM_HEADER_LENGTH, ssl3_set_handshake_header, ssl3_handshake_write, - ssl3_add_to_finished_hash, }; const SSL3_ENC_METHOD TLSv1_2_enc_data = { @@ -182,7 +180,6 @@ const SSL3_ENC_METHOD TLSv1_2_enc_data = { SSL3_HM_HEADER_LENGTH, ssl3_set_handshake_header, ssl3_handshake_write, - ssl3_add_to_finished_hash, }; static int compare_uint16_t(const void *p1, const void *p2) |