diff options
Diffstat (limited to 'plugins/t')
0 files changed, 0 insertions, 0 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c index 1595a59..4eba4b6 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c | |||
@@ -57,7 +57,7 @@ enum { | |||
57 | 57 | ||
58 | #ifdef HAVE_SSL | 58 | #ifdef HAVE_SSL |
59 | int check_cert = FALSE; | 59 | int check_cert = FALSE; |
60 | int ssl_version; | 60 | int ssl_version = 0; |
61 | int days_till_exp_warn, days_till_exp_crit; | 61 | int days_till_exp_warn, days_till_exp_crit; |
62 | char *randbuff; | 62 | char *randbuff; |
63 | X509 *server_cert; | 63 | X509 *server_cert; |
@@ -339,10 +339,10 @@ process_arguments (int argc, char **argv) | |||
339 | case 'S': /* use SSL */ | 339 | case 'S': /* use SSL */ |
340 | #ifdef HAVE_SSL | 340 | #ifdef HAVE_SSL |
341 | enable_ssl: | 341 | enable_ssl: |
342 | /* ssl_version initialized to 0 as a default. Only set if it's non-zero. This helps when we include multiple | ||
343 | parameters, like -S and -C combinations */ | ||
342 | use_ssl = TRUE; | 344 | use_ssl = TRUE; |
343 | if (optarg == NULL || c != 'S') | 345 | if (c=='S' && optarg != NULL) { |
344 | ssl_version = 0; | ||
345 | else { | ||
346 | ssl_version = atoi(optarg); | 346 | ssl_version = atoi(optarg); |
347 | if (ssl_version < 1 || ssl_version > 3) | 347 | if (ssl_version < 1 || ssl_version > 3) |
348 | usage4 (_("Invalid option - Valid values for SSL Version are 1 (TLSv1), 2 (SSLv2) or 3 (SSLv3)")); | 348 | usage4 (_("Invalid option - Valid values for SSL Version are 1 (TLSv1), 2 (SSLv2) or 3 (SSLv3)")); |