diff options
author | David Benjamin <davidben@chromium.org> | 2014-11-05 09:28:53 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2014-11-11 02:59:13 +0300 |
commit | e1b20a013633754378439f041a72c498d29ed413 (patch) | |
tree | f97019460f4552463b267439ffb884c0f77b73da /ssl/s3_lib.c | |
parent | 5e961c1ff1515fb328de711b0ee795253199b298 (diff) |
Remove SSL3_FLAGS_POP_BUFFER.
This is an experimental flag that dates back to SSLeay 0.8.1b or earlier. It's
never set internally and never set in consumers.
Change-Id: I922583635c9f3d8d93f08f1707531ad22a26ae6a
Reviewed-on: https://boringssl-review.googlesource.com/2214
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'ssl/s3_lib.c')
-rw-r--r-- | ssl/s3_lib.c | 56 |
1 files changed, 3 insertions, 53 deletions
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index 0141dde7..29e40fc0 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -2037,8 +2037,6 @@ int ssl3_shutdown(SSL *s) int ssl3_write(SSL *s, const void *buf, int len) { - int ret,n; - #if 0 if (s->shutdown & SSL_SEND_SHUTDOWN) { @@ -2049,63 +2047,15 @@ int ssl3_write(SSL *s, const void *buf, int len) ERR_clear_system_error(); if (s->s3->renegotiate) ssl3_renegotiate_check(s); - /* This is an experimental flag that sends the - * last handshake message in the same packet as the first - * use data - used to see if it helps the TCP protocol during - * session-id reuse */ - /* The second test is because the buffer may have been removed */ - if ((s->s3->flags & SSL3_FLAGS_POP_BUFFER) && (s->wbio == s->bbio)) - { - /* First time through, we write into the buffer */ - if (s->s3->delay_buf_pop_ret == 0) - { - ret=ssl3_write_bytes(s,SSL3_RT_APPLICATION_DATA, - buf,len); - if (ret <= 0) return(ret); - - s->s3->delay_buf_pop_ret=ret; - } - - s->rwstate=SSL_WRITING; - n=BIO_flush(s->wbio); - if (n <= 0) return(n); - s->rwstate=SSL_NOTHING; - - /* We have flushed the buffer, so remove it */ - ssl_free_wbio_buffer(s); - s->s3->flags&= ~SSL3_FLAGS_POP_BUFFER; - - ret=s->s3->delay_buf_pop_ret; - s->s3->delay_buf_pop_ret=0; - } - else - { - ret=s->method->ssl_write_bytes(s,SSL3_RT_APPLICATION_DATA, - buf,len); - if (ret <= 0) return(ret); - } - - return(ret); + return s->method->ssl_write_bytes(s, SSL3_RT_APPLICATION_DATA, buf, + len); } static int ssl3_read_internal(SSL *s, void *buf, int len, int peek) { - int n,ret; + int ret; ERR_clear_system_error(); - if ((s->s3->flags & SSL3_FLAGS_POP_BUFFER) && (s->wbio == s->bbio)) - { - /* Deal with an application that calls SSL_read() when handshake data - * is yet to be written. - */ - if (BIO_wpending(s->wbio) > 0) - { - s->rwstate=SSL_WRITING; - n=BIO_flush(s->wbio); - if (n <= 0) return(n); - s->rwstate=SSL_NOTHING; - } - } if (s->s3->renegotiate) ssl3_renegotiate_check(s); s->s3->in_read_app_data=1; ret=s->method->ssl_read_bytes(s,SSL3_RT_APPLICATION_DATA,buf,len,peek); |