git-send-email: Fix authenticating on some servers when using TLS.
Send HELO again after a successful STARTTLS command to refresh the list of extensions. These may be different to what is returned over a clear connection (for example the AUTH command may be accepted over a secure connection, but not over a clear connection). Furthermore, this behaviour is recommended by RFC 2487 (http://www.ietf.org/rfc/rfc2487.txt). Signed-off-by: Robert Shearman <robertshearman@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Robert Shearman committed
Jul 9, 2008 at 22:39 UTC
9d1ccf5e640bdaeddd01a86b40b4c0980c1ef642
1 file changed
+3
git-send-email.perl
+3
@@ -773,6 +773,9 @@ X-Mailer: git-send-email $gitversion
773
$smtp = Net::SMTP::SSL->start_SSL($smtp)
774
or die "STARTTLS failed! ".$smtp->message;
775
$smtp_encryption = '';
776
+ # Send EHLO again to receive fresh
777
+ # supported commands
778
+ $smtp->hello();
779
} else {
780
die "Server does not support STARTTLS! ".$smtp->message;
781
}