aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_http.c
diff options
context:
space:
mode:
authorGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2014-01-21 16:07:38 +0100
committerGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2014-01-21 16:07:38 +0100
commit7ee3525423f17cb8269a11e679355733867131e9 (patch)
tree6b68b8bddc3603925a5eb2b996859c94e0c06b46 /plugins/check_http.c
parent11cf54ca78185d820085a476cdbf7d8f9149c292 (diff)
parenta3871201821d9abe8a12e637e7dd00d9d1dde2a5 (diff)
downloadmonitoring-plugins-7ee3525423f17cb8269a11e679355733867131e9.tar.gz
Merge branch 'maint'
* maint: check_ssh: Get rid of sshd: Read from socket failed: Connection reset by peer fixed tests when there is no direct internet connection NEWS: Mention fix for check_http's -S option Fix for SSL Versioning when multiple options are used. Fix #1217 spec file fails to build due to duplicate files and unused files check_http: Don't let "-N" expect an argument README: Change GitHub URL README: Clarify license notice Update URLs and mailing list addresses Just using the posix conform extended regular expression grep check_oracle: --db +ASM bad string matching check_oracle doesn't correctly check for pmon +ASM instance from at least Oracle 11 as the pmon proces was renamed from ora_pmon_.* to asm_pmon_.*. -- Just turning attached patch of github issue #1207 into a push request. (Closes #1207) Update web site URLs Conflicts: FAQ NEWS README SUPPORT configure.in monitoring-plugins.spec.in pkg/solaris/pkginfo.in plugins-root/check_dhcp.c plugins-root/check_icmp.c plugins-scripts/check_ifoperstatus.pl plugins-scripts/check_mssql.pl plugins/check_apt.c plugins/check_by_ssh.c plugins/check_cluster.c plugins/check_dbi.c plugins/check_dig.c plugins/check_disk.c plugins/check_dns.c plugins/check_dummy.c plugins/check_fping.c plugins/check_game.c plugins/check_hpjd.c plugins/check_http.c plugins/check_ide_smart.c plugins/check_ldap.c plugins/check_load.c plugins/check_mrtg.c plugins/check_mrtgtraf.c plugins/check_mysql.c plugins/check_mysql_query.c plugins/check_nagios.c plugins/check_nt.c plugins/check_ntp.c plugins/check_ntp_peer.c plugins/check_ntp_time.c plugins/check_nwstat.c plugins/check_overcr.c plugins/check_pgsql.c plugins/check_ping.c plugins/check_procs.c plugins/check_radius.c plugins/check_real.c plugins/check_smtp.c plugins/check_snmp.c plugins/check_ssh.c plugins/check_swap.c plugins/check_tcp.c plugins/check_time.c plugins/check_ups.c plugins/check_users.c plugins/negate.c plugins/urlize.c plugins/utils.h po/Makevars po/de.po po/fr.po po/monitoring-plugins.pot
Diffstat (limited to 'plugins/check_http.c')
-rw-r--r--plugins/check_http.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c
index d8b3f9c5..92861d97 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;
@@ -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;
@@ -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)"));