From: Doug MacEachern Date: Thu, 22 Nov 2001 00:42:35 +0000 (+0000) Subject: get rid of 'apctx' table that used to live in SSL_get_app_data2(ssl) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8277f0b95addc09668364d42705df3ad393178d4;p=thirdparty%2Fapache%2Fhttpd.git 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/modules/ssl@92113 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/mod_ssl.c b/mod_ssl.c index 62452dd5024..d494cfa238c 100644 --- a/mod_ssl.c +++ b/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/ssl_engine_kernel.c b/ssl_engine_kernel.c index ee888aea922..569e8c87843 100644 --- a/ssl_engine_kernel.c +++ b/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);