summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFranz Schwartau <franz@electromail.org>2023-06-14 20:29:25 +0200
committerFranz Schwartau <franz@electromail.org>2023-08-29 09:46:50 +0200
commit079c300dcc6479b53e1f84a6b9446c7f403a7612 (patch)
tree53cf1f39178c78f2db0422d9af606a51f8096412
parentda81dd3cf29c16ff1f9cf735482b9d4a0619f501 (diff)
downloadmonitoring-plugins-079c300.tar.gz
check_smtp: add new longoption --tls
This is an alias for -s/--ssl.
-rw-r--r--plugins/check_smtp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index 4ceb9565..3990ad82 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -505,6 +505,7 @@ process_arguments (int argc, char **argv)
505 {"help", no_argument, 0, 'h'}, 505 {"help", no_argument, 0, 'h'},
506 {"lmtp", no_argument, 0, 'L'}, 506 {"lmtp", no_argument, 0, 'L'},
507 {"ssl", no_argument, 0, 's'}, 507 {"ssl", no_argument, 0, 's'},
508 {"tls", no_argument, 0, 's'},
508 {"starttls",no_argument,0,'S'}, 509 {"starttls",no_argument,0,'S'},
509 {"sni", no_argument, 0, SNI_OPTION}, 510 {"sni", no_argument, 0, SNI_OPTION},
510 {"certificate",required_argument,0,'D'}, 511 {"certificate",required_argument,0,'D'},
@@ -715,7 +716,7 @@ process_arguments (int argc, char **argv)
715 from_arg = strdup(" "); 716 from_arg = strdup(" ");
716 717
717 if (use_starttls && use_ssl) { 718 if (use_starttls && use_ssl) {
718 usage4 (_("Set either -s/--ssl or -S/--starttls")); 719 usage4 (_("Set either -s/--ssl/--tls or -S/--starttls"));
719 } 720 }
720 721
721 return validate_arguments (); 722 return validate_arguments ();
@@ -875,7 +876,7 @@ print_help (void)
875#ifdef HAVE_SSL 876#ifdef HAVE_SSL
876 printf (" %s\n", "-D, --certificate=INTEGER[,INTEGER]"); 877 printf (" %s\n", "-D, --certificate=INTEGER[,INTEGER]");
877 printf (" %s\n", _("Minimum number of days a certificate has to be valid.")); 878 printf (" %s\n", _("Minimum number of days a certificate has to be valid."));
878 printf (" %s\n", "-s, --ssl"); 879 printf (" %s\n", "-s, --ssl, --tls");
879 printf (" %s\n", _("Use SSL/TLS for the connection.")); 880 printf (" %s\n", _("Use SSL/TLS for the connection."));
880 printf (_(" Sets default port to %d.\n"), SMTPS_PORT); 881 printf (_(" Sets default port to %d.\n"), SMTPS_PORT);
881 printf (" %s\n", "-S, --starttls"); 882 printf (" %s\n", "-S, --starttls");