Skip to content

Commit

Permalink
git-send-email: Fix authenticating on some servers when using TLS.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Robert Shearman authored and Junio C Hamano committed Jul 9, 2008
1 parent 607bb3f commit 9d1ccf5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,9 @@ sub send_message
$smtp = Net::SMTP::SSL->start_SSL($smtp)
or die "STARTTLS failed! ".$smtp->message;
$smtp_encryption = '';
# Send EHLO again to receive fresh
# supported commands
$smtp->hello();
} else {
die "Server does not support STARTTLS! ".$smtp->message;
}
Expand Down

0 comments on commit 9d1ccf5

Please sign in to comment.