httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: svn commit: r1752099 - in /httpd/httpd/trunk: ./ build/rpm/ docs/log-message-tags/ docs/manual/ docs/manual/mod/ modules/filters/
Date Tue, 12 Jul 2016 21:16:20 GMT
On 11 Jul 2016, at 4:39 PM, Ruediger Pluem <rpluem@apache.org> wrote:

>> Added: httpd/httpd/trunk/modules/filters/mod_crypto.c
>> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_crypto.c?rev=1752099&view=auto
>> ==============================================================================
>> --- httpd/httpd/trunk/modules/filters/mod_crypto.c (added)
>> +++ httpd/httpd/trunk/modules/filters/mod_crypto.c Sun Jul 10 17:27:03 2016
> 
>> +static void *merge_crypto_config(apr_pool_t * p, void *basev, void *addv)
>> +{
>> +    crypto_conf *new = (crypto_conf *) apr_pcalloc(p, sizeof(crypto_conf));
>> +    crypto_conf *add = (crypto_conf *) addv;
>> +    crypto_conf *base = (crypto_conf *) basev;
>> +
>> +    new->library = (add->library_set == 0) ? base->library : add->library;
>> +    new->params = (add->library_set == 0) ? base->params : add->params;
>> +    new->library_set = add->library_set || base->library_set;
>> +
>> +    new->crypto = base->crypto;
> 
> Shouldn't this be:
> 
> new->crypto = add->crypto;

In this case no, the value of crypto is set globally and needs to be unique across the server.

>> +
>> +    return (void *) new;
>> +}
>> +
>> +static void *create_crypto_dir_config(apr_pool_t * p, char *dummy)
>> +{
>> +    crypto_dir_conf *new =
>> +        (crypto_dir_conf *) apr_pcalloc(p, sizeof(crypto_dir_conf));
>> +
>> +    new->size_set = 0;          /* unset */
> 
> Is this needed? We do apr_pcalloc above.

We don’t need it, this is fixed.

>> +    new->size = DEFAULT_BUFFER_SIZE;    /* default size */
>> +    new->cipher = DEFAULT_CIPHER;
>> +    new->cipher = DEFAULT_MODE;
> 
> Shouldn't this be:
> 
> new->mode = DEFAULT_MODE;

Definitely.

All fixed in r1752348, thanks for this.

Regards,
Graham
—


Mime
View raw message