]> granicus.if.org Git - apache/commitdiff
mod_ssl: follow up to r1601919.
authorYann Ylavic <ylavic@apache.org>
Wed, 7 Jan 2015 14:20:57 +0000 (14:20 +0000)
committerYann Ylavic <ylavic@apache.org>
Wed, 7 Jan 2015 14:20:57 +0000 (14:20 +0000)
Likewise when set from SNI callback.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1650061 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_engine_kernel.c

index 78e89b85d5f383b40b203316f276de0d4297b4ae..fc45a386ea65e7f3b8d745117382a9343c5a732a 100644 (file)
@@ -2074,8 +2074,14 @@ static int ssl_find_vhost(void *servername, conn_rec *c, server_rec *s)
          * we need to set that callback here.
          */
         if (APLOGtrace4(s)) {
-            BIO_set_callback(SSL_get_rbio(ssl), ssl_io_data_cb);
-            BIO_set_callback_arg(SSL_get_rbio(ssl), (void *)ssl);
+            BIO *rbio = SSL_get_rbio(ssl),
+                *wbio = SSL_get_wbio(ssl);
+            BIO_set_callback(rbio, ssl_io_data_cb);
+            BIO_set_callback_arg(rbio, (void *)ssl);
+            if (wbio && wbio != rbio) {
+                BIO_set_callback(wbio, ssl_io_data_cb);
+                BIO_set_callback_arg(wbio, (void *)ssl);
+            }
         }
 
         return 1;