Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: (qmail 82725 invoked from network); 4 Nov 2009 04:02:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Nov 2009 04:02:31 -0000 Received: (qmail 45604 invoked by uid 500); 4 Nov 2009 04:02:30 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 45549 invoked by uid 500); 4 Nov 2009 04:02:29 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 45539 invoked by uid 99); 4 Nov 2009 04:02:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 04:02:28 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of imcompa@gmail.com designates 209.85.218.221 as permitted sender) Received: from [209.85.218.221] (HELO mail-bw0-f221.google.com) (209.85.218.221) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 04:02:20 +0000 Received: by bwz21 with SMTP id 21so8356858bwz.24 for ; Tue, 03 Nov 2009 20:02:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=u7uqSnSIfN9GpEQ5b5kF17b2TS3ZNwYcq+utAQw/j3U=; b=CvIHx3xmXAuMdQ9nmB7fF9RUVaOs8AWN378gFRAU4mU9/Hd4XmANbx1vl3ftXojJlZ 8b/E8AR6YQAWeXmoJC/EK5c6UVJ+zxmlzrRzfB6Pm8njF5jj9r0I1MbNP2xCO/I55/RV YaYnBGpBwXFWLj2GQWBXb6+vbrVwwyut+0ywQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=dJuWH5blgbKDXpKMrIEmrxxHO/3XY8q13KhSfxim1NTkWt4gROmX9jPvEJAdreDf/9 8MrlvMLAl4oVjteseqx3SFBhKuElycpa1RmkGQwFH44N61v5+wSxlsUIeDxuto9LlVj2 jOX3oSXOvz5gDOEwZEhFmJDeNIBDtbWY+g9lw= MIME-Version: 1.0 Received: by 10.103.76.21 with SMTP id d21mr353557mul.78.1257307320064; Tue, 03 Nov 2009 20:02:00 -0800 (PST) In-Reply-To: References: From: Shane Pope Date: Tue, 3 Nov 2009 22:01:40 -0600 Message-ID: Subject: Re: Recv'ing data directly from a socket and running it through SSL input filter. To: modules-dev@httpd.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org 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); APR_BRIGADE_INSERT_TAIL(bb, b); But then what? Thank you, Shane 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