fix for "handshake alert: unrecognized_name" (fix #685)