My Proxy won't handle SSL/https requests

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

rbrunet

Thread Starter
Joined
Nov 20, 2001
Messages
3
I am in the proces of coding a proxy server in C and am having difficulty with the SSL aspect.
When receiving an http request, I simply forward the whole message (GET htpp;//host.com \n User-Agent:...\n etc. ) to the appropriate server, and it works fine. But when an SSL request arrives (CONNECT host.com:443 \n User-Agent:...\n etc.), I try to forward this to the server in the same fashion.

This does not work as I am not getting any response back (not even an error). I think I have to manipulate the request message (ex. remove the "CONNECT" and ":443", but I am not sure how to properly format it. After several tries with different formats, I am still lost and frustrated.
Anyone know how to format the SSL message. i.e. What should my proxy forward to the secure server? Or maybe, formatting is not the solution?!? Any help appreciated.

Thanks,
rbrunet
 
Joined
Jul 29, 2001
Messages
21,334
Doesn't SSL require some kink of key exchange between the client and the server? I think that is what you are missing.
 

rbrunet

Thread Starter
Joined
Nov 20, 2001
Messages
3
Yes, there is a key exchange between client and server. It is performed during the SSL handshake. The first message of the handshake (and for that matter, the very first message sent by the client (browser) ) is a "CONNECT server.com:443".
It is this message that I am getting stuck on - I don't even get to the key exchange. I am unsure how to format (if at all) this CONNECT message before sending it to the server. All my attempts have have gotten silence from the server.
Thanks for your thoughts, javascript:smilie(':)')
smile
Richard
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top