]> granicus.if.org Git - apache/commitdiff
mod_ssl: SSL_smart_shutdown(): follow up to r1601184.
authorYann Ylavic <ylavic@apache.org>
Sun, 8 Jun 2014 23:54:58 +0000 (23:54 +0000)
committerYann Ylavic <ylavic@apache.org>
Sun, 8 Jun 2014 23:54:58 +0000 (23:54 +0000)
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

index c5da7723188b26a6f4c5eeb5d3d8b228ec5274bc..b6183e8b55ac5d1ad66b0640341a80cea6382f0e 100644 (file)
@@ -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)