1

(3 replies, posted in wolfSSL)

first of all I want to state that I am a student who is still learning and this project is for me to learn new things.

Ok I found the solution.

It's an ssl connection inside another ssl connection.

first we make an Ssl connection to the proxy . and treat that connection as a socket.
then we make anothe ssl object setting the receive/send callbacks to functions that read and write from the encrypted proxy connection using our first Ssl object.

but that seems a dirty solution.

can I set the fd inside the wolfssl_set_fd(); function to the ssl object created earlier?
thanks.

2

(3 replies, posted in wolfSSL)

Hello,

I am writing an http client with secure web proxy support (stunnel) using wolfssl.
I am able to connect to the proxy server and complete the Tls handshake successfully, then basic HTTP application data (port 80 sites) can be transfered without issues.

but after asking the proxy to forward tcp data from a secure website (Port 443) ("CONNECT HOST:PORT HTTP/1.1"),  how do I make a hand shake with the site's sever if the socket is already transporting encrypted data from the Proxy.

to illustrate:
1- Tcp connect to Proxyhost:Port
2- initialize wolffssl and setfd
3- Connect_ssl();
4- Tls handshake with proxy success.
5- Send a connect Command to a websites server (Ex. "CONNECT google.com:443 HTTP/1.1")
6- proxy replies 200 OK
7- how to negotiate TLS now ?????

plz if you could answer with an example .

Thank You.