Go Back   Wireless and Wifi Forums > News > Newsgroups > comp.security.misc
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-14-2008, 06:41 PM
Rich Fife
Guest
 
Posts: n/a
Default HTTPS question

Hello all,

Hope this isn't a total newbie question...

I'm writing an extension to an existing client / server suite that
currently uses UDP for all of its communication.

We are having some problems with clients that are behind firewalls
that only allow HTTP and HTTPS, so I've created a system where the
necessary communications all take place in the form of GET and PUT
HTTP calls. This makes the proxy think that the client is simply
browsing the web when they are not. Yeah, lame, but it works for
HTTP. I need to implement a version that uses HTTPS as well. I've
got all my certificates ready and it works between the client and the
server if there is no proxy, but the question I'm having trouble
answering is how do you implement HTTPS from the TCP / SSL level?

Do you send an unencrypted HTTP header and then pop over to SSL
immediately afterwards? When do you do the SSL handshaking? Before
or after you send the header?

Thanks in advance!

-- Rich Fife --

Reply With Quote
  #2 (permalink)  
Old 02-14-2008, 06:55 PM
Bruce Stephens
Guest
 
Posts: n/a
Default Re: HTTPS question

Rich Fife <rfife@amug.org> writes:

[...]

> Do you send an unencrypted HTTP header and then pop over to SSL
> immediately afterwards? When do you do the SSL handshaking? Before
> or after you send the header?


Start straight off with SSL/TLS. (I believe there's a proposal for an
HTTP startTLS, but I don't think it's caught on.)

Reply With Quote
  #3 (permalink)  
Old 02-14-2008, 09:36 PM
Rich Fife
Guest
 
Posts: n/a
Default Re: HTTPS question

On Feb 14, 11:55 am, Bruce Stephens <bruce
+use...@cenderis.demon.co.uk> wrote:
> Rich Fife <rf...@amug.org> writes:
>
> [...]
>
> > Do you send an unencrypted HTTP header and then pop over to SSL
> > immediately afterwards? When do you do the SSL handshaking? Before
> > or after you send the header?

>
> Start straight off with SSL/TLS. (I believe there's a proposal for an
> HTTP startTLS, but I don't think it's caught on.)


So I do an SSL handshake directly with the proxy and then it
handshakes with the server? If I don't, how does the proxy know what
server I want (it's only in the (encrypted) HTTP header)?

Thanks for your reply!

-- Rich --

Reply With Quote
  #4 (permalink)  
Old 02-14-2008, 09:40 PM
Sebastian G.
Guest
 
Posts: n/a
Default Re: HTTPS question

Rich Fife wrote:

> On Feb 14, 11:55 am, Bruce Stephens <bruce
> +use...@cenderis.demon.co.uk> wrote:
>> Rich Fife <rf...@amug.org> writes:
>>
>> [...]
>>
>>> Do you send an unencrypted HTTP header and then pop over to SSL
>>> immediately afterwards? When do you do the SSL handshaking? Before
>>> or after you send the header?

>> Start straight off with SSL/TLS. (I believe there's a proposal for an
>> HTTP startTLS, but I don't think it's caught on.)

>
> So I do an SSL handshake directly with the proxy and then it
> handshakes with the server? If I don't, how does the proxy know what
> server I want (it's only in the (encrypted) HTTP header)?



First you create a connection to the proxy which may or may not be secured
with SSL. Then you send a CONNECT request to the proxy, telling him the host
you want to talk to. He then sets up the connection and proxies all traffic,
and if it's secured with SSL then he doesn't know the content.

Reply With Quote
  #5 (permalink)  
Old 02-14-2008, 10:01 PM
Rich Fife
Guest
 
Posts: n/a
Default Re: HTTPS question

On Feb 14, 2:40 pm, "Sebastian G." <se...@seppig.de> wrote:
> Rich Fife wrote:
> > On Feb 14, 11:55 am, Bruce Stephens <bruce
> > +use...@cenderis.demon.co.uk> wrote:
> >> Rich Fife <rf...@amug.org> writes:

>
> >> [...]

>
> >>> Do you send an unencrypted HTTP header and then pop over to SSL
> >>> immediately afterwards? When do you do the SSL handshaking? Before
> >>> or after you send the header?
> >> Start straight off with SSL/TLS. (I believe there's a proposal for an
> >> HTTP startTLS, but I don't think it's caught on.)

>
> > So I do an SSL handshake directly with the proxy and then it
> > handshakes with the server? If I don't, how does the proxy know what
> > server I want (it's only in the (encrypted) HTTP header)?

>
> First you create a connection to the proxy which may or may not be secured
> with SSL. Then you send a CONNECT request to the proxy, telling him the host
> you want to talk to. He then sets up the connection and proxies all traffic,
> and if it's secured with SSL then he doesn't know the content.


Ah. I get it. I was going straight for GET and PUT without using
CONNECT. That's the magic word I was looking for.

Thanks!

-- Rich --

Reply With Quote
  #6 (permalink)  
Old 02-14-2008, 10:03 PM
Sebastian G.
Guest
 
Posts: n/a
Default Re: HTTPS question

Rich Fife wrote:


> Ah. I get it. I was going straight for GET and PUT without using
> CONNECT. That's the magic word I was looking for.



PUT isn't even part of HTTP, but rather of its extension WebDAV.

Reply With Quote
  #7 (permalink)  
Old 02-14-2008, 10:08 PM
Bruce Stephens
Guest
 
Posts: n/a
Default Re: HTTPS question

Rich Fife <rfife@amug.org> writes:

> So I do an SSL handshake directly with the proxy and then it
> handshakes with the server? If I don't, how does the proxy know what
> server I want (it's only in the (encrypted) HTTP header)?


Ah. I was forgetting you had a proxy. I've no idea how HTTP SSL
proxies work in reality. You've got a working proxy, so you could try
a web browser suitably configured and ethereal, and see what it's
doing? Or check if the proxy supports RFC 2817, and implement that
(apparently web clients don't)?

Sorry, my fault. I had read "proxy" but somehow forgot it.

Reply With Quote
  #8 (permalink)  
Old 02-14-2008, 10:12 PM
Bruce Stephens
Guest
 
Posts: n/a
Default Re: HTTPS question

"Sebastian G." <seppi@seppig.de> writes:

> PUT isn't even part of HTTP, but rather of its extension WebDAV.


It's less commonly used than GET, but it's surely part of HTTP.

Reply With Quote
  #9 (permalink)  
Old 02-14-2008, 10:49 PM
Sebastian G.
Guest
 
Posts: n/a
Default Re: HTTPS question

Bruce Stephens wrote:

> "Sebastian G." <seppi@seppig.de> writes:
>
>> PUT isn't even part of HTTP, but rather of its extension WebDAV.

>
> It's less commonly used than GET, but it's surely part of HTTP.



At least for HTTP 1.0 this is wrong. Quoting RFC1945:

| These appendices are provided for informational reasons only -- they
| do not form a part of the HTTP/1.0 specification.
| [...]
| D.1.1 PUT

That is, one should expect an error 400 and not just 501.

Reply With Quote
  #10 (permalink)  
Old 02-14-2008, 11:36 PM
Rich Fife
Guest
 
Posts: n/a
Default Re: HTTPS question

On Feb 14, 3:49 pm, "Sebastian G." <se...@seppig.de> wrote:
> Bruce Stephens wrote:
> > "Sebastian G." <se...@seppig.de> writes:

>
> >> PUT isn't even part of HTTP, but rather of its extension WebDAV.

>
> > It's less commonly used than GET, but it's surely part of HTTP.

>
> At least for HTTP 1.0 this is wrong. Quoting RFC1945:
>
> | These appendices are provided for informational reasons only -- they
> | do not form a part of the HTTP/1.0 specification.
> | [...]
> | D.1.1 PUT
>
> That is, one should expect an error 400 and not just 501.


I'm using 1.1, so I should be fine. Thanks for the info guys! I
should have made more of a point that a proxy was involved. My
original post was kind of disorganized.

-- Rich --

Reply With Quote
  #11 (permalink)  
Old 02-20-2008, 04:36 PM
Chris Mattern
Guest
 
Posts: n/a
Default Re: HTTPS question

On 2008-02-14, Rich Fife <rfife@amug.org> wrote:
> Hello all,
>
> Hope this isn't a total newbie question...
>
> I'm writing an extension to an existing client / server suite that
> currently uses UDP for all of its communication.
>
> We are having some problems with clients that are behind firewalls
> that only allow HTTP and HTTPS,


In other words, you're trying to subvert some clients' firewall policies
that their boxen only access HTTP and HTTPS. That's not very nice.


--
Christopher Mattern

NOTICE
Thank you for noticing this new notice
Your noticing it has been noted
And will be reported to the authorities

Reply With Quote
  #12 (permalink)  
Old 02-20-2008, 04:42 PM
Todd H.
Guest
 
Posts: n/a
Default Re: HTTPS question

Rich Fife <rfife@amug.org> writes:

> Hello all,
>
> Hope this isn't a total newbie question...
>
> I'm writing an extension to an existing client / server suite that
> currently uses UDP for all of its communication.
>
> We are having some problems with clients that are behind firewalls
> that only allow HTTP and HTTPS, so I've created a system where the
> necessary communications all take place in the form of GET and PUT
> HTTP calls. This makes the proxy think that the client is simply
> browsing the web when they are not. Yeah, lame, but it works for
> HTTP. I need to implement a version that uses HTTPS as well. I've
> got all my certificates ready and it works between the client and the
> server if there is no proxy, but the question I'm having trouble
> answering is how do you implement HTTPS from the TCP / SSL level?
>
> Do you send an unencrypted HTTP header and then pop over to SSL
> immediately afterwards? When do you do the SSL handshaking? Before
> or after you send the header?
>
> Thanks in advance!


stunnel is a command line thingee built with such issues in mind.

http://www.stunnel.org/examples/


--
Todd H.
http://www.toddh.net/

Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A basic/newbie question on https. Harry comp.security.misc 1 01-31-2008 03:56 AM
Re: '911 Leaders Saying They Are Jesus' - The King of America - Live broadcasts out in the fields, trumping evil demons by the power of the Word . . . : They'll tell you, blame the shadows in the New World Order, but don't rely on evidence to form yo God Guy Good alt.comp.hardware 1 08-09-2007 02:47 AM
Bank login not using https spasmous2 comp.security.misc 3 03-18-2007 07:00 PM
Https question Anand kumar comp.security.misc 7 08-23-2005 07:34 PM
SSL Proxy / How to forward HTTPS connections? fritz-bayer@web.de comp.security.misc 2 08-14-2005 03:35 AM


All times are GMT. The time now is 08:07 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 RC8

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45