On 07/10/2016 07:27 PM, minf...@apache.org wrote:
> Author: minfrin
> Date: Sun Jul 10 17:27:03 2016
> New Revision: 1752099
> 
> URL: http://svn.apache.org/viewvc?rev=1752099&view=rev
> Log:
> mod_crypto: Add the all purpose crypto filters with support for HLS.
> 
> Added:
>     httpd/httpd/trunk/docs/manual/mod/mod_crypto.xml   (with props)
>     httpd/httpd/trunk/docs/manual/mod/mod_crypto.xml.meta   (with props)
>     httpd/httpd/trunk/modules/filters/NWGNUmod_crypto   (with props)
>     httpd/httpd/trunk/modules/filters/mod_crypto.c   (with props)
>     httpd/httpd/trunk/modules/filters/mod_crypto.dsp   (with props)
>     httpd/httpd/trunk/modules/filters/mod_crypto.h   (with props)
> Modified:
>     httpd/httpd/trunk/Apache-apr2.dsw
>     httpd/httpd/trunk/Apache.dsw
>     httpd/httpd/trunk/CHANGES
>     httpd/httpd/trunk/build/rpm/httpd.spec.in
>     httpd/httpd/trunk/docs/log-message-tags/next-number
>     httpd/httpd/trunk/docs/manual/expr.xml
>     httpd/httpd/trunk/docs/manual/mod/allmodules.xml
>     httpd/httpd/trunk/modules/filters/NWGNUmakefile
>     httpd/httpd/trunk/modules/filters/config.m4
> 

> 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;

> +
> +    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.

> +    new->size = DEFAULT_BUFFER_SIZE;    /* default size */
> +    new->cipher = DEFAULT_CIPHER;
> +    new->cipher = DEFAULT_MODE;

Shouldn't this be:

new->mode = DEFAULT_MODE;


> +
> +    return (void *) new;
> +}
> +

Regards

RĂ¼diger

Reply via email to