[nagiosplug] Don't use SSLv2 when compiling against GnuTLS

"Nagios Plugin Development" <[email protected]> Mon, 11 Jun 2012 21:40:09 +0000
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
 Module: nagiosplug
 Branch: master
 Commit: 3fd1bd97ca874aecd4ad046f642c894bd1347f88
 Author: Holger Weiss <[email protected]>
   Date: Mon Jun 11 23:23:40 2012 +0200
    URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=3fd1bd9

Don't use SSLv2 when compiling against GnuTLS

GnuTLS doesn't support SSL version 2.

---

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

diff --git a/plugins/sslutils.c b/plugins/sslutils.c
index 4e3fc4e..12cd734 100644
--- a/plugins/sslutils.c
+++ b/plugins/sslutils.c
@@ -55,8 +55,8 @@ int np_net_ssl_init_with_hostname_and_version (int sd, char *host_name, int vers
 			method = TLSv1_client_method();
 			break;
 		case 2: /* SSLv2 protocol */
-#ifdef OPENSSL_NO_SSL2
-			printf (("%s\n", _("CRITICAL - SSL Protocol Version 2 is not supported by your build of OpenSSL.")));
+#if defined(USE_GNUTLS) || defined(OPENSSL_NO_SSL2)
+			printf (("%s\n", _("CRITICAL - SSL Protocol Version 2 is not supported by your SSL library.")));
 			return STATE_CRITICAL;
 #else
 			method = SSLv2_client_method();


------------------------------------------------------------------------------
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/