From: Junio C Hamano Date: Thu, 21 Feb 2013 00:18:04 GMT Subject: [RFH/PATCH] imap-send: support SNI (RFC4366) Message-ID: <7vbobey0xv.fsf@alter.siamese.dyndns.org> To talk to a site that serves multiple names on a single IP address, the client needs to ask for the specific hostname it wants to talk to. Otherwise, the default certificate returned from the IP address may not match that of the host we wanted to talk to. Signed-off-by: Junio C Hamano --- * I need help from people on this patch in two areas: (1) I only tested this patch by connecting to https://googlemail.com/ with $ git -c imap.host=imaps://googlemail.com -c imap.port=443 imap-send ssl, server.host); + if (ret != 1) + warning("SSL_set_tslext_host_name(%s) failed.\n", server.host); + ret = SSL_connect(sock->ssl); if (ret <= 0) { socket_perror("SSL_connect", sock, ret); -- 1.8.2.rc0.106.ga6e4a61