Move the hostname verification to after the SSL handshake has completed.