OSDir


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: svn commit: r1844001 - in /httpd/httpd/trunk/modules/ssl: mod_ssl.c ssl_engine_kernel.c ssl_private.h


On 16/10/2018 19:21, Ruediger Pluem wrote:
> 
> 
> On 10/16/2018 02:53 PM, jfclere@xxxxxxxxxx wrote:
>> Author: jfclere
>> Date: Tue Oct 16 12:53:18 2018
>> New Revision: 1844001
>>
>> URL: http://svn.apache.org/viewvc?rev=1844001&view=rev
>> Log:
>> And a way to custom modules to guess and extract ssl variable.
>> See https://github.com/jfclere/JBCSP-17 for example...
>>
>> Modified:
>>     httpd/httpd/trunk/modules/ssl/mod_ssl.c
>>     httpd/httpd/trunk/modules/ssl/ssl_engine_kernel.c
>>     httpd/httpd/trunk/modules/ssl/ssl_private.h
>>
>> Modified: httpd/httpd/trunk/modules/ssl/mod_ssl.c
>> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/mod_ssl.c?rev=1844001&r1=1844000&r2=1844001&view=diff
>> ==============================================================================
>> --- httpd/httpd/trunk/modules/ssl/mod_ssl.c (original)
>> +++ httpd/httpd/trunk/modules/ssl/mod_ssl.c Tue Oct 16 12:53:18 2018
>> @@ -776,6 +776,8 @@ static void ssl_register_hooks(apr_pool_
>>                                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());
> 
> 1. Instead of using literals you should use defines for them in mod_ssl.h. I understand that you want to use this
>    in other modules. So it needs to become part of the mod_ssl API.
> 2. Also the provider seems to provide only one method it should be stored in a clearly defined struct like e.g.
>    authz_provider in mod_auth.h
> 3. Why using the provider interface at all? You have only one method and it doesn't look like that other providers
>    should be implemented. Looks like a perfect case for an optional function to me which we have various in mod_ssl,
>    e.g. ssl_proxy_enable

That is a lot simpler in fact :D


-- 
Cheers

Jean-Frederic