Re: [Patch] mod_crypto: A general purpose crypto filter with HLS support

2016-07-10 Thread Graham Leggett
On 12 Dec 2014, at 12:59 AM, Yann Ylavic wrote: >> Incorporating the above, How about this? > > Looks fine, modulo the above (didn't figure out before): All of this has been included. I’ve committed this in r1752099 so that further development can occur on trunk.

Re: [Patch] mod_crypto: A general purpose crypto filter with HLS support

2014-12-11 Thread Graham Leggett
On 10 Dec 2014, at 12:22 AM, Yann Ylavic ylavic@gmail.com wrote: +rv = ap_get_brigade(f-next, ctx-tmp, mode, block, ctx-remaining); + But if you want to keep the following apr_bucket_read() nonblocking, you could do : if (APR_BRIGADE_EMPTY(ctx-tmp) { rv =

Re: [Patch] mod_crypto: A general purpose crypto filter with HLS support

2014-12-11 Thread Yann Ylavic
On Thu, Dec 11, 2014 at 3:31 PM, Graham Leggett minf...@sharp.fm wrote: [] It has always seemed wrong to me to assume what is in the brigade from an earlier filter (ie that the bucket will be memory resident and therefore non blocking). Input filters' passed-in brigades usually have the

Re: [Patch] mod_crypto: A general purpose crypto filter with HLS support

2014-12-09 Thread Graham Leggett
On 01 Dec 2014, at 7:45 PM, Yann Ylavic ylavic@gmail.com wrote: OK, the other way around then (I thought osize was the block size), so it can read more bytes than asked to. This may also be unexpected by the caller... At least for the nonblocking case, I think we should return what we

Re: [Patch] mod_crypto: A general purpose crypto filter with HLS support

2014-12-09 Thread Yann Ylavic
Hi Graham, On Tue, Dec 9, 2014 at 5:50 PM, Graham Leggett minf...@sharp.fm wrote: On 01 Dec 2014, at 7:45 PM, Yann Ylavic ylavic@gmail.com wrote: OK, the other way around then (I thought osize was the block size), so it can read more bytes than asked to. This may also be unexpected by

Re: [Patch] mod_crypto: A general purpose crypto filter with HLS support

2014-12-09 Thread Yann Ylavic
On Tue, Dec 9, 2014 at 10:56 PM, Yann Ylavic ylavic@gmail.com wrote: +static apr_status_t crypto_in_filter(ap_filter_t *f, apr_bucket_brigade *bb, +ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes) +{ [] +/* if our buffer is empty, read off the network until the

Re: [Patch] mod_crypto: A general purpose crypto filter with HLS support

2014-12-09 Thread Yann Ylavic
On Tue, Dec 9, 2014 at 11:03 PM, Yann Ylavic ylavic@gmail.com wrote: On Tue, Dec 9, 2014 at 10:56 PM, Yann Ylavic ylavic@gmail.com wrote: +static apr_status_t crypto_in_filter(ap_filter_t *f, apr_bucket_brigade *bb, +ap_input_mode_t mode, apr_read_type_e block, apr_off_t

Re: [Patch] mod_crypto: A general purpose crypto filter with HLS support

2014-12-01 Thread Yann Ylavic
Hi Graham, nice module, looks very useful. A few (first glance) questions : - The input filter seems to read and return blocksize bytes at once, couldn't it read up to readbytes - reabytes % blocksize, or even readbytes with retained buckets? It seems that buffering (at most blocksize[ - 1])

Re: [Patch] mod_crypto: A general purpose crypto filter with HLS support

2014-12-01 Thread Yann Ylavic
On Mon, Dec 1, 2014 at 11:03 AM, Yann Ylavic ylavic@gmail.com wrote: A few (first glance) questions : - The input filter seems to read and return blocksize bytes at once, couldn't it read up to readbytes - reabytes % blocksize, or even readbytes with retained buckets? It seems that

Re: [Patch] mod_crypto: A general purpose crypto filter with HLS support

2014-12-01 Thread Graham Leggett
On 01 Dec 2014, at 12:11 PM, Yann Ylavic ylavic@gmail.com wrote: Sorry, I forgot one question : - What is the purpose of the handler returning the secret key? Get it through a SSL channel for example? At first glance it looks quite scary ;) In HLS, the key is protected via some kind of

Re: [Patch] mod_crypto: A general purpose crypto filter with HLS support

2014-12-01 Thread Yann Ylavic
On Mon, Dec 1, 2014 at 4:08 PM, Graham Leggett minf...@sharp.fm wrote: On 01 Dec 2014, at 12:03 PM, Yann Ylavic ylavic@gmail.com wrote: - The input filter seems to read and return blocksize bytes at once, couldn't it read up to readbytes - reabytes % blocksize, or even readbytes with

[Patch] mod_crypto: A general purpose crypto filter with HLS support

2014-11-30 Thread Graham Leggett
Hi all, I have attached a proof of concept module that teaches httpd to support symmetrical encryption, initially to support on-the-fly HLS encryption for video streaming. This requires the apr-crypto-secretkey patch that I just posted to the APR list. This module also potentially solves a