[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

mod_python, python-ldap und SSL/TLS



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hallo,

nun muss ich doch tatsachlich auch mal eine Frage stellen und bin mir
direkt nicht sicher, ob ich da hier richtig bin. Ist vielleicht etwas zu
speziell, aber ich hoffe, es gibt hier ein paar Leute, die mein Hirn
erhellen koennen.

Folgendes Problem:
Ich habe ein kleines Python-Script geschrieben, dass u.a. einen
SSL-Connect auf den LDAP-Server und dann ein simple_bind versucht.

import ldap
connect = ldap.initialize("ldaps://127.0.0.1:636")
user = "blahbla"
pass = "geheim"
connect.simple_bind(user, pass)
connect.unbind()

Das laesst sich nun als beliebiger User prima ausfuehren und gibt das
gewuenschte Ergebniss.

Nur wenn ich das Ganze unter mod_python im Web ausfuehre, Bringt er mir
einen "TLS Negotiation failure." (so das log vom slapd). Ohne TLS
funktioniert es auch da prima, aber ich moechte nun einmal eine
verschluesselte Verbindung, die ja sonst auch ueberall prima funktioniert.

Das ist das Log auf apache (PythonDebug On)

File "test.py", line 52, in change_ldap
    connect.simple_bind(user, old_pw)

  File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 169, in
simple_bind
    return
self._ldap_call(self._l.simple_bind,who,cred,EncodeControlTuples(serverctrls),EncodeControlTuples(clientctrls))

  File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 94, in
_ldap_call
    result = func(*args,**kwargs)

SERVER_DOWN: {'info': 'error:140740BF:SSL routines:SSL23_CLIENT_HELLO:no
protocols available', 'desc': "Can't contact LDAP server"}

Ist das ein Bug/Feature? Oder uebersehe ich einfach irgendwas?

Ach so, die mod_python Einbindung:
<IfModule mod_mime.c>
        AddHandler mod_python .py
</IfModule>
PythonHandler mod_python.publisher
PythonDebug On

TIA, MfG Jan


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFBYa0ZRp6KEAo/3oRAggsAKCF8Kq5FVZYAUNP6B79TQAIz8KXfACfcDaJ
Otmpg4L7GWfAAdBIf8Fa0D0=
=ljj/
-----END PGP SIGNATURE-----



Reply to: