From: Yann Ylavic Date: Sun, 8 Jun 2014 23:54:58 +0000 (+0000) Subject: mod_ssl: SSL_smart_shutdown(): follow up to r1601184. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4d25962b8307336b4f5f5f20a913be34acac410;p=thirdparty%2Fapache%2Fhttpd.git mod_ssl: SSL_smart_shutdown(): follow up to r1601184. Use SSL_get_wbio() to comply with OPENSSL_NO_SSL_INTERN. Stop SSL shutdown loop when flush fails. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601274 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ssl/ssl_util_ssl.c b/modules/ssl/ssl_util_ssl.c index c5da7723188..b6183e8b55a 100644 --- a/modules/ssl/ssl_util_ssl.c +++ b/modules/ssl/ssl_util_ssl.c @@ -142,7 +142,10 @@ int SSL_smart_shutdown(SSL *ssl) /* Once the close notity is sent through the output filters, * ensure it is flushed through the socket. */ - BIO_flush(ssl->wbio); + if (BIO_flush(SSL_get_wbio(ssl)) <= 0) { + rc = -1; + break; + } flush = 0; } if (rc != 0)