|
From: Hans A. <Han...@Ph...> - 2002-03-15 15:28:59
|
Its me again :-)
I have something usable now, as I think. The interface looks like this:
-------------------------8<----------------------------
import ldap
# from sasl import sasl_digest_md5 # XXX
l = ldap.initialize("ldap://localhost/")
auth = sasl_digest_md5("aschauer","secret")
l.sasl_bind_s("", auth)
res = l.search_s("dc=myorg,dc=com", ldap.SCOPE_ONELEVEL,
"objectclass=*")
print res
l.unbind()
-------------------------8<-------------------------
Comments?
The interesting part is the sasl_digest_md5 class, that handles the
SASL callbacks (source attached, also for sasl_gssapi and, as a base
class, a generic sasl class).
The diff is against cvs (made with "cvs diff").
If anybody wants to test it and needs assistance with setting things
up, feel free to contact me.
Hans
--
Han...@Ph...
|