diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2013-07-26 23:43:40 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2013-07-28 20:01:06 +0200 |
commit | 4031750cbbf7d8c7803ed7379d42c1c1b4805a85 (patch) | |
tree | 72460cc969b61e96eff56ed03c659598e9ac9ec6 | |
parent | 5d3f681e04861f15539fe639e7a4e289050a315e (diff) |
Properly handle start_tls in pynslcd
-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 |