From ec3eebef53a8b6528e23cf941980131b489483c5 Mon Sep 17 00:00:00 2001 From: Yann Ylavic Date: Sun, 8 Jun 2014 23:54:58 +0000 Subject: [PATCH] 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 --- modules/ssl/ssl_util_ssl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 2.40.0