boost::asio convert socket to secure
===

I'm writing a server for the game Minecraft in C++.

The client sends an initial handshake packet to the server through a normal socket. The server then sends an RSA key back to the game and all socket communication from that point onwards becomes AES encrypted with the RSA key sent to the client.

I had an idea that I could avoid implementing AES/RSA and linking to other libraries in my server by simply using a boost::asio ssl socket however the problem I have is that I need to transform a regular socket into a ssl socket directly after the server sends the RSA key to the client (but I cannot start off with a regular socket, nor destroy the existing one for the sake of the connection).

How can I transform the socket if it's already created?