ldap.set_option() ready

Jacek Konieczny jajcus at bnet.pl
Mon Nov 12 21:20:31 CET 2001


Hi,

I have just commited ldap.set_option() function and ldap.OPT_* constants.
It is not perfect yet (probably boolean options don't work as they
should), but it can already be used for TLS certificate validation
setup.

You can try this:

ldap.set_option(ldap.OPT_DEBUG_LEVEL,255)
ldap.set_option(ldap.OPT_X_TLS,ldap.OPT_X_TLS_HARD)
ldap.set_option(ldap.OPT_X_TLS_CACERTFILE,"cacerts.pem")
ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT,1)
l=ldap.initialize("ldaps://some.ldap.host")
l.simple_bind_s("","")

I will also make ldap.get_option() function and get_option/set_option
methods of LDAPObject.

Greets,
        Jacek




More information about the python-ldap mailing list