I need some information about OpenSSL, TLS socket. First of i want to made a connection with server through TLS over TCP. Generally first create a TCP socket, then connect to server using the TCP socket, after that convert(before send or receive any data through TCP socket) the TCP socket into TLS.
My question is is it possible according to following way?
- Create TCP socket.
- Connect with server using TCP socket.
- Send and receive some data through TCP socket.
Then convert the TCP socket into TLS.
Note: I am using OpenSSL.