diff options
Diffstat (limited to 'pynslcd/search.py')
-rw-r--r-- | pynslcd/search.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pynslcd/search.py b/pynslcd/search.py index f8c82fb..4c6f243 100644 --- a/pynslcd/search.py +++ b/pynslcd/search.py @@ -53,6 +53,10 @@ class Connection(ldap.ldapobject.ReconnectLDAPObject): # TODO: register a connection callback (like dis?connect_cb() in myldap.c) if cfg.ssl or cfg.uri.startswith('ldaps://'): self.set_option(ldap.OPT_X_TLS, ldap.OPT_X_TLS_HARD) + # TODO: the following should probably be done on the first search + # together with binding, not when creating the connection object + if cfg.ssl == 'STARTTLS': + self.start_tls_s() def reconnect_after_fail(self): import invalidator |