start tls

Michael Ströder michael at stroeder.com
Fri Oct 19 13:48:21 CEST 2001


Steffen Ries wrote:
> 
> attached is a small (experimental) patch, which enables
> 'start_tls_s()' in python-ldap. The patch requires OpenLDAP 2.0.x (I
> tested it only against 2.0.11 on Redhat 6.2).
> [..]
> A simple demonstration looks like this:
> >>> server = ldap.open('localhost')
> >>> server.version = ldap.VERSION3
> >>> server.start_tls_s()
> >>> server.simple_bind_s(...)
> 
> If the ldap server supports startTLS and the Certificate maps to the
> host, the call to start_tls_s() succeeds, otherwise an exception is
> thrown.

How's the trusted CA cert chain configured? It does not really make
sense to use TLS if the LDAP client does not verify the server's
certificate against a trusted root CA cert.

Also doing a
>>> del l
crashs the interpreter no matter if unbind_s() was called before or
not.

Ciao, Michael.




More information about the python-ldap mailing list