fix ssl handshake of haproxy and nginx