diff options
Diffstat (limited to 'lib/libssl/s3_lib.c')
-rw-r--r-- | lib/libssl/s3_lib.c | 51 |
1 files changed, 4 insertions, 47 deletions
diff --git a/lib/libssl/s3_lib.c b/lib/libssl/s3_lib.c index 52e0c524102..aa430ee9716 100644 --- a/lib/libssl/s3_lib.c +++ b/lib/libssl/s3_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: s3_lib.c,v 1.165 2018/03/15 12:27:00 jca Exp $ */ +/* $OpenBSD: s3_lib.c,v 1.166 2018/04/07 16:55:13 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -2524,56 +2524,13 @@ ssl3_shutdown(SSL *s) int ssl3_write(SSL *s, const void *buf, int len) { - int ret, n; - -#if 0 - if (s->internal->shutdown & SSL_SEND_SHUTDOWN) { - s->internal->rwstate = SSL_NOTHING; - return (0); - } -#endif errno = 0; + if (S3I(s)->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 (S3I(s)->delay_buf_pop_ret == 0) { - ret = ssl3_write_bytes(s, SSL3_RT_APPLICATION_DATA, - buf, len); - if (ret <= 0) - return (ret); - - S3I(s)->delay_buf_pop_ret = ret; - } - - s->internal->rwstate = SSL_WRITING; - n = BIO_flush(s->wbio); - if (n <= 0) - return (n); - s->internal->rwstate = SSL_NOTHING; - - /* We have flushed the buffer, so remove it */ - ssl_free_wbio_buffer(s); - s->s3->flags&= ~SSL3_FLAGS_POP_BUFFER; - - ret = S3I(s)->delay_buf_pop_ret; - S3I(s)->delay_buf_pop_ret = 0; - } else { - ret = s->method->internal->ssl_write_bytes(s, - SSL3_RT_APPLICATION_DATA, buf, len); - if (ret <= 0) - return (ret); - } - - return (ret); + return s->method->internal->ssl_write_bytes(s, + SSL3_RT_APPLICATION_DATA, buf, len); } static int |