<div dir="ltr"><div><div>Hi Brian,<br></div>I am looking to have my two stunnel's (client and server) work together to determine if an SSL connection should be closed. The client stunnel will send some data to the server stunnel. The server stunnel will make the decision to close the session. I want to send the extra data in an HTTP GET method request, and I am thinking an additional HTTP request header should do the trick. If I had unlimited time I'd try to make these changes to the SSL code in my browser (Firefox) and the web server (Tomcat) and not use stunnel. I chose to work with stunnel because it's easier than trying to obtain and master the code used in Firefox and Tomcat.<br>
<br></div><div>The problem I am seeing is that stunnel is a "dumb" proxy, and as such works quite well with a lot of protocols, because it does not care about the protocol. Getting it to do some protocol specific work is the key.<br>
</div><div><br></div>Regards.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 26, 2014 at 8:13 AM, Brian Wilkins <span dir="ltr"><<a href="mailto:bwilkins@gmail.com" target="_blank">bwilkins@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am a little confused by your question. If you control the<br>
unencrypted side, you should be able to use Wireshark to sniff the<br>
connection between your network application's unencrypted channel to<br>
stunnel. Nothing really fancy. Off the top of my head, you could<br>
replay captured packets after you have modified them.<br>
<div><div class="h5"><br>
On Wed, Mar 26, 2014 at 8:05 AM, Michael Carlino (RIT Student)<br>
<<a href="mailto:mac9951@rit.edu">mac9951@rit.edu</a>> wrote:<br>
> Hello stunnel users,<br>
> I am working with what seems to be the standard stunnel HTTPS configuration.<br>
> I have two instances of stunnel, one as a client and one as a server. The<br>
> client accepts connections from a browser. The server sits in front of<br>
> tomcat. If works like a charm (of course!).<br>
><br>
> What I need to do seems simple, and I will try to keep my description of it<br>
> generic. In the client stunnel I need to make a small change to the HTTP<br>
> packet. I need to add some data to it. At the server side I need to access<br>
> that added data. The server stunnel may close the SSL session based on that<br>
> data.<br>
><br>
> So, my question is: can I obtain access to the packet before it's encrypted<br>
> and sent out over SSL? Can I get access to the decrypted packet before it's<br>
> sent on to tomcat?<br>
><br>
> I know that as a proxy stunnel has to be and tries to be general in nature.<br>
> I am not concerned (right now) with developing a feature that will become<br>
> available to others later. I don't mind if my changes make my development<br>
> version of stunnel single-purpose. My work is academic and proof-of-concept<br>
> in it's nature.<br>
><br>
> I have collected references and a text book (Network Security with OpenSSL<br>
> by Viega et al). I will continue to walk through and explore the code. Are<br>
> there any programmer resources I can obtain? I see the occasional URL in<br>
> the stunnel source code. I will have to check these URLs.<br>
><br>
> ---<br>
><br>
> I just now pursued<br>
> <a href="http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt" target="_blank">http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt</a>, and I see that<br>
> there is a patch that allows stunnel to do an initial modification to the<br>
> HTTP request to insert a X-Forwarded-For header. This sounds like what I<br>
> need to do! I am going to look for that patch. I hope the source code for<br>
> the patch is available.<br>
><br>
> Please, if anyone has any advice, war stories, criticism, whatever... I<br>
> would very much appreciate it.<br>
><br>
> Regards.<br>
><br>
</div></div>> _______________________________________________<br>
> stunnel-users mailing list<br>
> <a href="mailto:stunnel-users@stunnel.org">stunnel-users@stunnel.org</a><br>
> <a href="https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users" target="_blank">https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users</a><br>
><br>
</blockquote></div><br></div>