From: Jean-Frederic Clere Date: Tue, 16 Oct 2018 12:53:18 +0000 (+0000) Subject: And a way to custom modules to guess and extract ssl variable. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bbdbf79438b822d77cf397261506005e0d8b0c18;p=apache And a way to custom modules to guess and extract ssl variable. See https://github.com/jfclere/JBCSP-17 for example... git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1844001 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ssl/mod_ssl.c b/modules/ssl/mod_ssl.c index 605d987c3d..ca6618b2f8 100644 --- a/modules/ssl/mod_ssl.c +++ b/modules/ssl/mod_ssl.c @@ -776,6 +776,8 @@ static void ssl_register_hooks(apr_pool_t *p) AUTHZ_PROVIDER_VERSION, &ssl_authz_provider_verify_client, AP_AUTH_INTERNAL_PER_CONF); + ap_register_provider(p, "mod_ssl" , "ssl_variables", "0", + ssl_hook_GetVars()); } module AP_MODULE_DECLARE_DATA ssl_module = { diff --git a/modules/ssl/ssl_engine_kernel.c b/modules/ssl/ssl_engine_kernel.c index e91f600e87..2e543ae0f9 100644 --- a/modules/ssl/ssl_engine_kernel.c +++ b/modules/ssl/ssl_engine_kernel.c @@ -2697,3 +2697,8 @@ int ssl_callback_SRPServerParams(SSL *ssl, int *ad, void *arg) } #endif /* HAVE_SRP */ + +const char * const *ssl_hook_GetVars() +{ + return ssl_hook_Fixup_vars; +} diff --git a/modules/ssl/ssl_private.h b/modules/ssl/ssl_private.h index 8524c515ba..fc51f8c894 100644 --- a/modules/ssl/ssl_private.h +++ b/modules/ssl/ssl_private.h @@ -899,6 +899,7 @@ int ssl_hook_Fixup(request_rec *); int ssl_hook_ReadReq(request_rec *); int ssl_hook_Upgrade(request_rec *); void ssl_hook_ConfigTest(apr_pool_t *pconf, server_rec *s); +const char* const *ssl_hook_GetVars(void); /** Apache authz provisders */ extern const authz_provider ssl_authz_provider_require_ssl;