4
0
Iain Bryson 6 жил өмнө
parent
commit
033523e4ab

+ 9 - 0
plugins/check_ldap.c

@@ -576,6 +576,8 @@ print_usage (void)
 			);
 }
 
+#ifdef HAVE_SSL
+
 int ldap_check_cert (LDAP *ld)
 {
 	SSL *ssl;
@@ -588,3 +590,10 @@ int ldap_check_cert (LDAP *ld)
 	}
 	return np_net_ssl_check_cert_real(ssl, days_till_exp_warn, days_till_exp_crit);
 }
+
+#else
+int ldap_check_cert (LDAP *ld) {
+    return TRUE;
+}
+
+#endif

+ 1 - 1
plugins/sslutils.c

@@ -30,12 +30,12 @@
 #include "common.h"
 #include "netutils.h"
 
+int check_hostname = 0;
 #ifdef HAVE_SSL
 static SSL_CTX *c=NULL;
 static SSL *s=NULL;
 static int initialized=0;
 
-int check_hostname = 0;
 
 int np_net_ssl_init(int sd) {
 	return np_net_ssl_init_with_hostname(sd, NULL);