From: Yann Ylavic Date: Wed, 7 Jan 2015 14:20:57 +0000 (+0000) Subject: mod_ssl: follow up to r1601919. X-Git-Tag: 2.5.0-alpha~3552 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7839a61951f13b222e41a8f7563ff81340d88556;p=apache mod_ssl: follow up to r1601919. Likewise when set from SNI callback. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1650061 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ssl/ssl_engine_kernel.c b/modules/ssl/ssl_engine_kernel.c index 78e89b85d5..fc45a386ea 100644 --- a/modules/ssl/ssl_engine_kernel.c +++ b/modules/ssl/ssl_engine_kernel.c @@ -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;