imap-send.c: set CURLOPT_USE_SSL to CURLUSESSL_TRY
According to the cURL documentation for the CURLOPT_USE_SSL option, it is only used with plain text protocols that get upgraded to SSL using the STARTTLS command. The server.use_ssl variable is only set when we are using a protocol that is already SSL/TLS (i.e. imaps), so setting CURLOPT_USE_SSL when the server.use_ssl variable is set has no effect whatsoever. Instead, set CURLOPT_USE_SSL to CURLUSESSL_TRY when the server.use_ssl variable is NOT set so that cURL will attempt to upgrade the plain text connection to SSL/TLS using STARTTLS in that case. This much more closely matches the behavior of the non-cURL code path. Signed-off-by: NKyle J. McKay <mackyle@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
Showing
想要评论请 注册 或 登录