From 3c90a370ea5860ed66d35285aba8304ed4f5c9ba Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 28 Oct 2013 23:58:36 +0100 Subject: Update URLs and mailing list addresses Now that we moved our infrastructure away from SourceForge, update the URLs and mailing list addresses accordingly. --- plugins/check_http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/check_http.c') diff --git a/plugins/check_http.c b/plugins/check_http.c index c36d916a..0ffb0c18 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -35,7 +35,7 @@ const char *progname = "check_http"; const char *copyright = "1999-2013"; -const char *email = "nagiosplug-devel@lists.sourceforge.net"; +const char *email = "devel@nagios-plugins.org"; #include "common.h" #include "netutils.h" -- cgit v1.2.3-74-g34f1 From c91ff7539af65f95c2bcef69e5643bd99773c80f Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Thu, 5 Dec 2013 20:13:31 +0100 Subject: check_http: Don't let "-N" expect an argument Fix the problem that check_http's "-N" option expects an argument although it shouldn't. The corresponding long option ("--no-body") wasn't affected. This error was introduced in ee3c4014d511e105489b081390636cacd4c53e3f. Thanks to Kerry Hughes for reporting it on the devel@ list. --- plugins/check_http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/check_http.c') diff --git a/plugins/check_http.c b/plugins/check_http.c index 0ffb0c18..1595a59e 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -257,7 +257,7 @@ process_arguments (int argc, char **argv) } while (1) { - c = getopt_long (argc, argv, "Vvh46t:c:w:A:k:H:P:j:T:I:a:b:d:e:p:s:R:r:u:f:C:J:K:nlLS::m:M:N:E", longopts, &option); + c = getopt_long (argc, argv, "Vvh46t:c:w:A:k:H:P:j:T:I:a:b:d:e:p:s:R:r:u:f:C:J:K:nlLS::m:M:NE", longopts, &option); if (c == -1 || c == EOF) break; -- cgit v1.2.3-74-g34f1 From cadf0d7ba866e004b409d165f4ac2391fe8b6b7c Mon Sep 17 00:00:00 2001 From: Joseph Gooch Date: Fri, 20 Dec 2013 07:46:20 -0500 Subject: Fix for SSL Versioning when multiple options are used. If you specify -S1 -C 30... The -C option will reset the ssl_version to 0. This is not a good thing. Instead we set the default to 0 and retain the version when later args are passed. --- plugins/check_http.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/check_http.c') diff --git a/plugins/check_http.c b/plugins/check_http.c index 1595a59e..4eba4b68 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -57,7 +57,7 @@ enum { #ifdef HAVE_SSL int check_cert = FALSE; -int ssl_version; +int ssl_version = 0; int days_till_exp_warn, days_till_exp_crit; char *randbuff; X509 *server_cert; @@ -339,10 +339,10 @@ process_arguments (int argc, char **argv) case 'S': /* use SSL */ #ifdef HAVE_SSL enable_ssl: + /* ssl_version initialized to 0 as a default. Only set if it's non-zero. This helps when we include multiple + parameters, like -S and -C combinations */ use_ssl = TRUE; - if (optarg == NULL || c != 'S') - ssl_version = 0; - else { + if (c=='S' && optarg != NULL) { ssl_version = atoi(optarg); if (ssl_version < 1 || ssl_version > 3) usage4 (_("Invalid option - Valid values for SSL Version are 1 (TLSv1), 2 (SSLv2) or 3 (SSLv3)")); -- cgit v1.2.3-74-g34f1