]> granicus.if.org Git - apache/commitdiff
enable i/o debugging
authorDoug MacEachern <dougm@apache.org>
Fri, 24 Aug 2001 18:06:47 +0000 (18:06 +0000)
committerDoug MacEachern <dougm@apache.org>
Fri, 24 Aug 2001 18:06:47 +0000 (18:06 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90645 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/mod_ssl.c
modules/ssl/ssl_engine_io.c

index a5ee4ba0e02165b36cdb1598f3821f5e44073cc0..033c5af35a0365db5f87e78d99cb8c76748d4412 100644 (file)
@@ -285,12 +285,7 @@ static int ssl_hook_pre_connection(conn_rec *c)
      */
     SSL_set_tmp_rsa_callback(ssl, ssl_callback_TmpRSA);
     SSL_set_tmp_dh_callback(ssl,  ssl_callback_TmpDH);
-#if 0 /* XXX */
-    if (sc->nLogLevel >= SSL_LOG_DEBUG) {
-        BIO_set_callback(SSL_get_rbio(ssl), ssl_io_data_cb);
-        BIO_set_callback_arg(SSL_get_rbio(ssl), ssl);
-    }
-#endif
+
     /*
      * Predefine some client verification results
      */
index c29917b8d11bdcb9338dc4fe31b8218dac5726c1..79dc55e8a50da397f6a7d6622683114d83a50829 100644 (file)
@@ -414,6 +414,7 @@ static apr_status_t ssl_io_filter_cleanup (void *data)
 
 void ssl_io_filter_init(conn_rec *c, SSL *ssl)
 {
+    SSLSrvConfigRec *sc = mySrvConfig(c->base_server);
     SSLFilterRec *filter;
 
     filter = apr_pcalloc(c->pool, sizeof(SSLFilterRec));
@@ -429,6 +430,14 @@ void ssl_io_filter_init(conn_rec *c, SSL *ssl)
     apr_pool_cleanup_register(c->pool, (void*)filter,
                               ssl_io_filter_cleanup, apr_pool_cleanup_null);
 
+    if (sc->nLogLevel >= SSL_LOG_DEBUG) {
+        /* XXX: this will currently get wiped out if renegotiation
+         * happens in ssl_hook_Access
+         */
+        BIO_set_callback(SSL_get_rbio(ssl), ssl_io_data_cb);
+        BIO_set_callback_arg(SSL_get_rbio(ssl), ssl);
+    }
+
     return;
 }