Bläddra i källkod

[hack] fix SSL issues.

Iain Bryson 6 år sedan
förälder
incheckning
087309a4d3
2 ändrade filer med 10 tillägg och 1 borttagningar
  1. 9 0
      plugins/check_ldap.c
  2. 1 1
      plugins/sslutils.c

+ 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);