diff options
author | David Benjamin <davidben@google.com> | 2016-05-06 04:50:24 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2016-05-06 20:39:48 +0300 |
commit | b095f0f0ca4ef08de8c5b48045e20206d55173bf (patch) | |
tree | 2b2a23f8d1bac10eb82788448a08c82c599b337e /ssl/d1_both.c | |
parent | 2730955e7449989bb982092d3301f89340dbc189 (diff) |
Remove the push argument to ssl_init_wbio_buffer.
Having bbio be tri-state (not allocated, allocated but not active, and
allocated and active) is confusing.
The extra state is only used in the client handshake, where ClientHello is
special-cased to not go through the buffer while everything else is. This dates
to OpenSSL's initial commit and doesn't seem to do much. I do not believe it
can affect renego as the buffer only affects writes; although OpenSSL accepted
interleave on read (though this logic predates it slightly), it never sent
application data while it believed a handshake was active. The handshake would
always be driven to completion first.
My guess is this was to save a copy since the ClientHello is a one-message
flight so it wouldn't need to be buffered? This is probably not worth the extra
variation in the state. (Especially with the DTLS state machine going through
ClientHello twice and pushing the BIO in between the two. Though I suspect that
was a mistake in itself. If the optimization guess is correct, there was no
need to do that.)
Change-Id: I6726f866e16ee7213cab0c3e6abb133981444d47
Reviewed-on: https://boringssl-review.googlesource.com/7873
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'ssl/d1_both.c')
-rw-r--r-- | ssl/d1_both.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/d1_both.c b/ssl/d1_both.c index e14eae73..9f60db41 100644 --- a/ssl/d1_both.c +++ b/ssl/d1_both.c @@ -744,7 +744,7 @@ int dtls1_retransmit_buffered_messages(SSL *ssl) { /* Ensure we are packing handshake messages. */ const int was_buffered = ssl_is_wbio_buffered(ssl); assert(was_buffered == SSL_in_init(ssl)); - if (!was_buffered && !ssl_init_wbio_buffer(ssl, 1)) { + if (!was_buffered && !ssl_init_wbio_buffer(ssl)) { return -1; } assert(ssl_is_wbio_buffered(ssl)); |