reimplementation of SSL sockets.