All of lore.kernel.org
 help / color / mirror / Atom feed
From: Drew DeVault <sir@cmpwn.com>
To: git@vger.kernel.org
Cc: Drew DeVault <sir@cmpwn.com>
Subject: [PATCH v2 3/3] git-send-email: rename 'tls' to 'starttls'
Date: Sun, 11 Apr 2021 08:54:31 -0400	[thread overview]
Message-ID: <20210411125431.28971-4-sir@cmpwn.com> (raw)
In-Reply-To: <20210411125431.28971-1-sir@cmpwn.com>

The name 'tls' is misleading. The 'ssl' option enables a generic
"modern" encryption stack which might very well use TLS; but the 'tls'
option enables STARTTLS support, which works entirely differently.

This renames the canonical option to 'starttls', to make this
distinction more obvious, and adds 'tls' as an alias for starttls, to
avoid breaking config files.

Signed-off-by: Drew DeVault <sir@cmpwn.com>
---
 Documentation/git-send-email.txt |  6 ++++--
 git-send-email.perl              | 10 +++++++---
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index 520b355e50..f8cea9e1f9 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -168,12 +168,14 @@ Sending
 	unspecified, choosing the envelope sender is left to your MTA.
 
 --smtp-encryption=<encryption>::
-	Specify the encryption to use, either 'ssl' or 'tls'. 'ssl' enables
-	generic SSL/TLS support and is typically used on port 465.  'tls'
+	Specify the encryption to use, either 'ssl' or 'starttls'. 'ssl' enables
+	generic SSL/TLS support and is typically used on port 465.  'starttls'
 	enables in-band STARTTLS support and is typically used on port 25 or
 	587.  Use whichever option is recommended by your mail provider.  Leave
 	empty to disable encryption and use plain SMTP.  Default is the value of
 	`sendemail.smtpEncryption`.
++
+'tls' is an alias for 'starttls' for legacy reasons.
 
 --smtp-domain=<FQDN>::
 	Specifies the Fully Qualified Domain Name (FQDN) used in the
diff --git a/git-send-email.perl b/git-send-email.perl
index bda5211f0d..3f125bc2b8 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -495,8 +495,12 @@ sub read_config {
 
 # 'default' encryption is none -- this only prevents a warning
 $smtp_encryption = '' unless (defined $smtp_encryption);
-if ($smtp_encryption ne "" && $smtp_encryption ne "ssl" && $smtp_encryption ne "tls") {
-	die __("Invalid smtp_encryption configuration: expected 'ssl', 'tls', or nothing.\n");
+if ($smtp_encryption eq "tls") {
+	# "tls" is an alias for starttls for legacy reasons
+	$smtp_encryption = "starttls";
+};
+if ($smtp_encryption ne "" && $smtp_encryption ne "ssl" && $smtp_encryption ne "starttls") {
+	die __("Invalid smtp_encryption configuration: expected 'ssl', 'starttls', or nothing.\n");
 }
 
 # Set CC suppressions
@@ -1541,7 +1545,7 @@ sub send_message {
 						 Hello => $smtp_domain,
 						 Debug => $debug_net_smtp,
 						 Port => $smtp_server_port);
-			if ($smtp_encryption eq 'tls' && $smtp) {
+			if ($smtp_encryption eq 'starttls' && $smtp) {
 				if ($use_net_smtp_ssl) {
 					$smtp->command('STARTTLS');
 					$smtp->response();
-- 
2.31.1


  parent reply	other threads:[~2021-04-11 12:54 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-11 12:54 [PATCH v2 0/3] git-send-email: improve SSL configuration Drew DeVault
2021-04-11 12:54 ` [PATCH v2 1/3] git-send-email(1): improve smtp-encryption docs Drew DeVault
2021-04-11 14:11   ` Ævar Arnfjörð Bjarmason
2021-04-11 12:54 ` [PATCH v2 2/3] git-send-email: die on invalid smtp_encryption Drew DeVault
2021-04-11 14:20   ` Ævar Arnfjörð Bjarmason
2021-04-11 14:21     ` Drew DeVault
2021-04-11 14:30       ` Ævar Arnfjörð Bjarmason
2021-04-11 15:06         ` Ævar Arnfjörð Bjarmason
2021-04-11 15:18           ` Drew DeVault
2021-04-11 19:56             ` Ævar Arnfjörð Bjarmason
2021-04-12 12:33               ` Drew DeVault
2021-04-12 13:16                 ` Ævar Arnfjörð Bjarmason
2021-04-13 12:12                   ` Drew DeVault
2021-04-13 14:22                     ` Ævar Arnfjörð Bjarmason
2021-04-13 21:39                     ` Junio C Hamano
2021-04-11 12:54 ` Drew DeVault [this message]
2021-04-11 14:17   ` [PATCH v2 3/3] git-send-email: rename 'tls' to 'starttls' Ævar Arnfjörð Bjarmason
2021-04-11 14:22     ` Drew DeVault
2021-04-11 14:43 ` [PATCH 0/2] send-email: simplify smtp.{smtpssl,smtpencryption} parsing Ævar Arnfjörð Bjarmason
2021-04-11 14:43   ` [PATCH 1/2] send-email: remove non-working support for "sendemail.smtpssl" Ævar Arnfjörð Bjarmason
2021-04-11 19:08     ` Junio C Hamano
2021-04-11 19:51       ` Ævar Arnfjörð Bjarmason
2021-05-01  9:15         ` Ævar Arnfjörð Bjarmason
2021-04-11 14:43   ` [PATCH 2/2] send-email: refactor sendemail.smtpencryption config parsing Ævar Arnfjörð Bjarmason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210411125431.28971-4-sir@cmpwn.com \
    --to=sir@cmpwn.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.