[nagiosplug] check_http: Fix -C/--certificate option handling

"Nagios Plugin Development" <[email protected]> Tue, 29 May 2012 11:50:19 +0000
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
 Module: nagiosplug
 Branch: master
 Commit: 252ae618fc6a02ca68872a1262d054a0b7b98fdb
 Author: Holger Weiss <[email protected]>
   Date: Tue May 29 12:59:16 2012 +0200
    URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=252ae61

check_http: Fix -C/--certificate option handling

The support for specifying the desired SSL protocol version via an
optional -S/--ssl argument broke the -C/--certificate option.  This is
fixed now.

---

 plugins/check_http.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/plugins/check_http.c b/plugins/check_http.c
index 8712079..315848f 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -295,7 +295,7 @@ process_arguments (int argc, char **argv)
       usage4 (_("Invalid option - SSL is not available"));
 #endif
       use_ssl = TRUE;
-      if (optarg == NULL)
+      if (optarg == NULL || c != 'S')
         ssl_version = 0;
       else {
         ssl_version = atoi(optarg);


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/