> From: owner-openssl-us...@openssl.org On Behalf Of Raj > Sent: Wednesday, 04 August, 2010 01:09
> Thanks for all the response > 1. I was able to do the handshaking successfully with > the browser. > On receiving the request from the browser I will send "HTTP > OK " response > back to the browser, I was able to do the handshaking and > read the actual > GET request. To be clear: I interpret you received CONNECT, sent OK, did SSL handshake between browser and you (SSL_accept), then SSL_read (data which is a) GET request. > 2. Then I create a new socket to establish the > connection with > server. The connection was successful. > Sends the request to the server > Reads the request from the server > (Obviously you mean read response.) > When I read the response from the server it always return > empty. I don't > know what went wrong here. I am reading the data from the > socket using > 'recv' function. Can anybody tell me what went wrong > Is the connection to the server clear, or SSL? If SSL, you must use SSL_{connect,write,read,etc} throughout, with a different SSL* pointer than the one for the client side. And check for errors and report them etc. If clear, either: - you did the send and/or recv wrong; we'd have to look at your code, which you should simplify/trim as much as possible. - the server didn't like the request you sent, or you, strongly enough it just closed the connection. For HTTP this should be rare; most issues with the actual request (such as bad method or resource, unauthorized, bad or prohibited or required body, etc.) have defined HTTP error responses. Something like a firewall or frontend that works at the TCP level might just disconnect you, although in my experience they usually block or reject the initial connection (SYN) or break abruptly (RST), either of which appears to your program as an error return (canonically -1, not 0). Can you contact the people operating the server, and can they check their logs around the time of your attempt? Can you connect to the server from a browser on the machine running your proxy, or at one nearby on the same subnet? In clear, SSL, or both? And do a GET like the one you are (receiving and) forwarding from your client? Successfully? Can you run a monitor like tcpdump or wireshark while running your program, to see what was actually sent to the server and confirm if any data or what flags came back? ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org