Add a TODO for why init_buf isn't released post-handshake.

There is no good reason why this needs to be this way. Later work should make
this all use a much more appropriate design. In the meantime, leave a note here
so this does not look accidental.

Change-Id: I7599dea7a474f54e26d9ab175b0e3cada99a974d
Reviewed-on: https://boringssl-review.googlesource.com/7951
Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
David Benjamin 2016-05-15 13:51:35 -04:00 committed by Adam Langley
parent 1d64afda44
commit fce37b0deb
2 changed files with 8 additions and 0 deletions

View File

@ -430,6 +430,10 @@ int dtls1_connect(SSL *ssl) {
/* Remove write buffering now. */
ssl_free_wbio_buffer(ssl);
/* |init_buf| cannot be released because post-handshake retransmit
* relies on that buffer being available as scratch space.
*
* TODO(davidben): Fix this. */
ssl->init_num = 0;
ssl->s3->initial_handshake_complete = 1;

View File

@ -404,6 +404,10 @@ int dtls1_accept(SSL *ssl) {
/* remove buffering on output */
ssl_free_wbio_buffer(ssl);
/* |init_buf| cannot be released because post-handshake retransmit
* relies on that buffer being available as scratch space.
*
* TODO(davidben): Fix this. */
ssl->init_num = 0;
ssl->s3->initial_handshake_complete = 1;