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-Tag: 2.5.0-alpha~4095 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec3eebef53a8b6528e23cf941980131b489483c5;p=apache 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 c5da772318..b6183e8b55 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)