From a626a1af07d5b4c98503a2a14181fa5a76442130 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Thu, 22 Nov 2001 00:42:35 +0000 Subject: [PATCH] get rid of 'apctx' table that used to live in SSL_get_app_data2(ssl) change app_data2 to be the request_rec itself. if something needs per-request context in the future, it can use r->request_config PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92113 13f79535-47bb-0310-9956-ffa450edef68 --- modules/ssl/mod_ssl.c | 5 +---- modules/ssl/ssl_engine_kernel.c | 8 ++------ 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/modules/ssl/mod_ssl.c b/modules/ssl/mod_ssl.c index 62452dd502..d494cfa238 100644 --- a/modules/ssl/mod_ssl.c +++ b/modules/ssl/mod_ssl.c @@ -220,7 +220,6 @@ static void ssl_hook_pre_config( static int ssl_hook_pre_connection(conn_rec *c) { SSLSrvConfigRec *sc = mySrvConfig(c->base_server); - apr_table_t *apctx; SSL *ssl; unsigned char *cpVHostID; char *cpVHostMD5; @@ -272,9 +271,7 @@ static int ssl_hook_pre_connection(conn_rec *c) return DECLINED; /* XXX */ } SSL_set_app_data(ssl, c); - apctx = apr_table_make(c->pool, AP_CTX_MAX_ENTRIES); - apr_table_setn(apctx, "ssl::request_rec", NULL); - SSL_set_app_data2(ssl, apctx); + SSL_set_app_data2(ssl, NULL); /* will be request_rec */ sslconn->ssl = ssl; diff --git a/modules/ssl/ssl_engine_kernel.c b/modules/ssl/ssl_engine_kernel.c index ee888aea92..569e8c8784 100644 --- a/modules/ssl/ssl_engine_kernel.c +++ b/modules/ssl/ssl_engine_kernel.c @@ -165,7 +165,6 @@ int ssl_hook_ReadReq(request_rec *r) { SSLConnRec *sslconn = myConnConfig(r->connection); SSL *ssl; - apr_table_t *apctx; /* * Get the SSL connection structure and perform the @@ -173,8 +172,7 @@ int ssl_hook_ReadReq(request_rec *r) */ ssl = sslconn->ssl; if (ssl != NULL) { - apctx = (apr_table_t *)SSL_get_app_data2(ssl); - apr_table_setn(apctx, "ssl::request_rec", (const char *)r); + SSL_set_app_data2(ssl, r); } /* @@ -1199,7 +1197,6 @@ int ssl_callback_SSLVerify(int ok, X509_STORE_CTX *ctx) SSLSrvConfigRec *sc; SSLDirConfigRec *dc; SSLConnRec *sslconn; - apr_table_t *actx; X509 *xs; int errnum; int errdepth; @@ -1214,8 +1211,7 @@ int ssl_callback_SSLVerify(int ok, X509_STORE_CTX *ctx) ssl = (SSL *)X509_STORE_CTX_get_app_data(ctx); conn = (conn_rec *)SSL_get_app_data(ssl); sslconn = myConnConfig(conn); - actx = (apr_table_t *)SSL_get_app_data2(ssl); - r = (request_rec *)apr_table_get(actx, "ssl::request_rec"); + r = (request_rec *)SSL_get_app_data2(ssl); s = conn->base_server; sc = mySrvConfig(s); dc = (r != NULL ? myDirConfig(r) : NULL); -- 2.40.0