httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shane Pope <>
Subject Re: Recv'ing data directly from a socket and running it through SSL input filter.
Date Wed, 04 Nov 2009 04:01:40 GMT
Essentially what I'm asking is,
I have data in a char *
I have the filters (r->input_filters) I need to run this through.
Is there a way to send this data through that filter?

I've found some code that will let me place that data in a bucket brigade.

	apr_bucket_brigade *bb = apr_brigade_create(r->pool, c->bucket_alloc);
	apr_bucket *b = apr_bucket_transient_create(str, len, c->bucket_alloc);

But then what?

Thank you,

On Tue, Nov 3, 2009 at 12:29 AM, Shane Pope <> wrote:
> Hello modules-dev mailing list,
> I'm attempting to write a module that proxy's bits from an outside host to a local port
under SSL. I have everything working except reading data from the client socket, and sending
it through the SSL filter to decrypt it.
> For outputting bits to the client connection I can get the data from the local socket
like this
> rv = apr_socket_recv(local_socket, buffer, &nbytes);
> and call these two functions, which would pass the bits through the output filters.
> ap_rwrite(buffer, nbytes, r);
> ap_rflush(r);
> But I cannot read bits directly from the client socket, because it's encrypted. I've
attempted to pass the bits through input_filters but failed.
> rv = apr_socket_recv(client_socket, buffer, &nbytes);
> //tried passing bits through filters, but don't know what I'm doing wrong. what next?
> Thanks,
> Shane

View raw message