Преглед изворни кода

sslutils: Check if OpenSSL supports SSLv3.

Jérémie Courrèges-Anglas пре 10 година
родитељ
комит
d643e57235
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      plugins/sslutils.c

+ 4 - 0
plugins/sslutils.c

@@ -70,6 +70,10 @@ int np_net_ssl_init_with_hostname_version_and_cert(int sd, char *host_name, int
 #endif
 #endif
 		break;
 		break;
 	case 3: /* SSLv3 protocol */
 	case 3: /* SSLv3 protocol */
+#if defined(OPENSSL_NO_SSL3)
+		printf(("%s\n", _("CRITICAL - SSL protocol version 3 is not supported by your SSL library.")));
+		return STATE_CRITICAL;
+#else
 		method = SSLv3_client_method();
 		method = SSLv3_client_method();
 		ssl_options = SSL_OP_NO_SSLv2 | SSL_OP_NO_TLSv1;
 		ssl_options = SSL_OP_NO_SSLv2 | SSL_OP_NO_TLSv1;
 		break;
 		break;