Cast sockets to SSL sockets