From: Doug MacEachern Date: Thu, 22 Nov 2001 00:25:00 +0000 (+0000) Subject: move c->notes.ssl::verify::depth to SSLConnRec.verify_depth X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2a99e3b0c00021eba2f2ba0da2c72b9d3a83943;p=thirdparty%2Fapache%2Fhttpd.git move c->notes.ssl::verify::depth to SSLConnRec.verify_depth note: may actually be removed unless somebody can figure out why it is in there to begin with PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/ssl@92111 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/mod_ssl.c b/mod_ssl.c index 3977c73b087..62452dd5024 100644 --- a/mod_ssl.c +++ b/mod_ssl.c @@ -274,7 +274,6 @@ static int ssl_hook_pre_connection(conn_rec *c) SSL_set_app_data(ssl, c); apctx = apr_table_make(c->pool, AP_CTX_MAX_ENTRIES); apr_table_setn(apctx, "ssl::request_rec", NULL); - apr_table_setn(apctx, "ssl::verify::depth", AP_CTX_NUM2PTR(0)); SSL_set_app_data2(ssl, apctx); sslconn->ssl = ssl; diff --git a/mod_ssl.h b/mod_ssl.h index 50471a81d16..32a3e8081e6 100644 --- a/mod_ssl.h +++ b/mod_ssl.h @@ -462,6 +462,7 @@ typedef struct { ssl_shutdown_type_e shutdown_type; const char *verify_info; const char *verify_error; + int verify_depth; } SSLConnRec; typedef struct { diff --git a/ssl_engine_kernel.c b/ssl_engine_kernel.c index 19c13eb5e2d..ee888aea922 100644 --- a/ssl_engine_kernel.c +++ b/ssl_engine_kernel.c @@ -371,11 +371,9 @@ int ssl_hook_Access(request_rec *r) STACK_OF(SSL_CIPHER) *skCipherOld; STACK_OF(SSL_CIPHER) *skCipher; SSL_CIPHER *pCipher; - apr_table_t *apctx; int nVerifyOld; int nVerify; int n; - void *vp; int rc; dc = myDirConfig(r); @@ -522,13 +520,11 @@ int ssl_hook_Access(request_rec *r) * restriction on the certificate chain). */ if (dc->nVerifyDepth != UNSET) { - apctx = (apr_table_t *)SSL_get_app_data2(ssl); - if ((vp = (void *)apr_table_get(apctx, "ssl::verify::depth")) != NULL) - n = (int)AP_CTX_PTR2NUM(vp); - else - n = sc->nVerifyDepth; - apr_table_setn(apctx, "ssl::verify::depth", - (const char *)AP_CTX_NUM2PTR(dc->nVerifyDepth)); + /* XXX: doesnt look like sslconn->verify_depth is actually used */ + if (!(n = sslconn->verify_depth)) { + sslconn->verify_depth = n = sc->nVerifyDepth; + } + /* determine whether a renegotiation has to be forced */ if (dc->nVerifyDepth < n) { renegotiate = TRUE;