mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-05-28 04:35:40 -04:00
-C now implies -S/--ssl as well
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1355 f882894a-f735-0410-b71e-b25c423dba1c
This commit is contained in:
parent
f6bfe34a3e
commit
293fc70756
1 changed files with 10 additions and 12 deletions
|
|
@ -253,6 +253,16 @@ process_arguments (int argc, char **argv)
|
|||
case 'n': /* do not show html link */
|
||||
display_html = FALSE;
|
||||
break;
|
||||
case 'C': /* Check SSL cert validity */
|
||||
#ifdef HAVE_SSL
|
||||
if (!is_intnonneg (optarg))
|
||||
usage2 (_("Invalid certificate expiration period"), optarg);
|
||||
else {
|
||||
days_till_exp = atoi (optarg);
|
||||
check_cert = TRUE;
|
||||
}
|
||||
/* Fall through to -S option */
|
||||
#endif
|
||||
case 'S': /* use SSL */
|
||||
#ifndef HAVE_SSL
|
||||
usage4 (_("Invalid option - SSL is not available"));
|
||||
|
|
@ -261,18 +271,6 @@ process_arguments (int argc, char **argv)
|
|||
if (specify_port == FALSE)
|
||||
server_port = HTTPS_PORT;
|
||||
break;
|
||||
case 'C': /* Check SSL cert validity */
|
||||
#ifdef USE_OPENSSL
|
||||
if (!is_intnonneg (optarg))
|
||||
usage2 (_("Invalid certificate expiration period"), optarg);
|
||||
else {
|
||||
days_till_exp = atoi (optarg);
|
||||
check_cert = TRUE;
|
||||
}
|
||||
#else
|
||||
usage4 (_("Invalid option - SSL is not available"));
|
||||
#endif
|
||||
break;
|
||||
case 'f': /* onredirect */
|
||||
if (!strcmp (optarg, "follow"))
|
||||
onredirect = STATE_DEPENDENT;
|
||||
|
|
|
|||
Loading…
Reference in a new issue