From 5508e4023a14205e8a89293521e8cac3a1c83f62 Mon Sep 17 00:00:00 2001 From: kakwa Date: Wed, 17 Jun 2015 23:57:43 +0200 Subject: [PATCH] test... again --- ldapcherry/backend/backendLdap.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ldapcherry/backend/backendLdap.py b/ldapcherry/backend/backendLdap.py index a978019..bf48c6b 100644 --- a/ldapcherry/backend/backendLdap.py +++ b/ldapcherry/backend/backendLdap.py @@ -58,20 +58,20 @@ class Backend(ldapcherry.backend.Backend): def _connect(self): ldap_client = ldap.initialize(self.uri) - ldap_client.set_option(ldap.OPT_REFERRALS, 0) - ldap_client.set_option(ldap.OPT_TIMEOUT, self.timeout) + ldap.set_option(ldap.OPT_REFERRALS, 0) + ldap.set_option(ldap.OPT_TIMEOUT, self.timeout) if self.starttls == 'on': - ldap_client.set_option(ldap.OPT_X_TLS_DEMAND, True) + ldap.set_option(ldap.OPT_X_TLS_DEMAND, True) else: - ldap_client.set_option(ldap.OPT_X_TLS_DEMAND, False) + ldap.set_option(ldap.OPT_X_TLS_DEMAND, False) if self.ca and self.checkcert == 'on': - ldap_client.set_option(ldap.OPT_X_TLS_CACERTFILE, self.ca) + ldap.set_option(ldap.OPT_X_TLS_CACERTFILE, self.ca) #else: - # ldap_client.set_option(ldap.OPT_X_TLS_CACERTFILE, '') + # ldap.set_option(ldap.OPT_X_TLS_CACERTFILE, '') if self.checkcert == 'off': - ldap_client.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_ALLOW) + ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_ALLOW) else: - ldap_client.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_DEMAND) + ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_DEMAND) if self.starttls == 'on': try: ldap_client.start_tls_s()