Fix SSL handshake functions and SSL_clear() such that SSL_clear()