From: Dr. Stephen Henson Date: Fri, 26 Jun 2009 15:02:01 +0000 (+0000) Subject: PR: 1949 X-Git-Tag: OpenSSL_0_9_8m-beta1~187 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3f4802a14ea070a26917223b6f93bd35097740d9;p=oweals%2Fopenssl.git PR: 1949 Submitted by: David.Smith@cern.ch Approved by: steve@openssl.org When checking whether to flush the output BIO use BIO_CTRL_WPENDING instead of BIO_CTRL_INFO. In most cases this will have no effect since the following BIOs wont buffer. In the case of a following buffering BIO this will check for any pending data in the whole chain and not just the single BIO. See: https://issues.apache.org/bugzilla/show_bug.cgi?id=46952 for a detailed analysis of this issue. --- diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index 80b45eb86f..a9f0077968 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -436,7 +436,7 @@ int ssl3_accept(SSL *s) case SSL3_ST_SW_FLUSH: /* number of bytes to be flushed */ - num1=BIO_ctrl(s->wbio,BIO_CTRL_INFO,0,NULL); + num1=BIO_ctrl(s->wbio,BIO_CTRL_WPENDING,0,NULL); if (num1 > 0) { s->rwstate=SSL_WRITING;