summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-12-17 19:47:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-12-17 19:47:12 (GMT)
commit433a30d0ba6e6d258be099859fa98d0205b25634 (patch)
tree3576102d43cbb1a1ad5d4dd51f89242e7173b02d
parent7dc8a65c86b4405dee8a4ee0fa4dcded96b7b900 (diff)
parent5508f3ed2c1cdb515e658cfc29ca0d5cd6683190 (diff)
downloadgit-433a30d0ba6e6d258be099859fa98d0205b25634.zip
git-433a30d0ba6e6d258be099859fa98d0205b25634.tar.gz
git-433a30d0ba6e6d258be099859fa98d0205b25634.tar.bz2
Merge branch 'tr/send-email-ssl'
SSL-related options were not passed correctly to underlying socket layer in "git send-email". * tr/send-email-ssl: send-email: set SSL options through IO::Socket::SSL::set_client_defaults send-email: --smtp-ssl-cert-path takes an argument send-email: pass Debug to Net::SMTP::SSL::new
-rwxr-xr-xgit-send-email.perl8
1 files changed, 6 insertions, 2 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 3782c3b..2016d9c 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -291,7 +291,7 @@ my $rc = GetOptions("h" => \$help,
"smtp-pass:s" => \$smtp_authpass,
"smtp-ssl" => sub { $smtp_encryption = 'ssl' },
"smtp-encryption=s" => \$smtp_encryption,
- "smtp-ssl-cert-path" => \$smtp_ssl_cert_path,
+ "smtp-ssl-cert-path=s" => \$smtp_ssl_cert_path,
"smtp-debug:i" => \$debug_net_smtp,
"smtp-domain:s" => \$smtp_domain,
"identity=s" => \$identity,
@@ -1214,10 +1214,14 @@ X-Mailer: git-send-email $gitversion
$smtp_server_port ||= 465; # ssmtp
require Net::SMTP::SSL;
$smtp_domain ||= maildomain();
+ require IO::Socket::SSL;
+ # Net::SMTP::SSL->new() does not forward any SSL options
+ IO::Socket::SSL::set_client_defaults(
+ ssl_verify_params());
$smtp ||= Net::SMTP::SSL->new($smtp_server,
Hello => $smtp_domain,
Port => $smtp_server_port,
- ssl_verify_params());
+ Debug => $debug_net_smtp);
}
else {
require Net::SMTP;