L
Laszlo Nagy
Hello,
I'm using the ldap module under Windows. This is the error that I get:
import ldap
l = ldap.initialize("ldaps://neptunus.msnet:636")
l.simple_bind_s("cn=gandalf,ou=Users,dc=neptunus,dc=msnet","gandalf")
l.search_s("ou=AddressBooks,dc=neptunus,dc=msnet", ldap.SCOPE_SUBTREE,
"objectclass=inetOrgPerson")
Traceback (most recent call last):
File
"T:\developer20\knowledgebase\FreeBSD\Thunderbird_OpenLDAP_AddressBook\working\05\example.py",
line 3, in ?
l.simple_bind_s("cn=gandalf,ou=Users,dc=neptunus,dc=msnet","gandalf")
File "C:\Python24\Lib\site-packages\ldap\ldapobject.py", line 175, in
simple_bind_s
msgid = self.simple_bind(who,cred,serverctrls,clientctrls)
File "C:\Python24\Lib\site-packages\ldap\ldapobject.py", line 169, in
simple_bind
return
self._ldap_call(self._l.simple_bind,who,cred,serverctrls,clientctrls)
File "C:\Python24\Lib\site-packages\ldap\ldapobject.py", line 94, in
_ldap_call
result = func(*args,**kwargs)
ldap.SERVER_DOWN: {'info': 'error:14090086:SSL
routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed', 'desc':
"Can't contact LDAP server"}
I think that I need to specify to the openldap client to trust the
server's certificate. The problem is that the ldap module bundles the
openldap-client implementation, and there is no ldap.conf file (or at
least I cannot find it). So how can I configure it to trust my server's
certificate?
Thanks,
Laszlo
I'm using the ldap module under Windows. This is the error that I get:
import ldap
l = ldap.initialize("ldaps://neptunus.msnet:636")
l.simple_bind_s("cn=gandalf,ou=Users,dc=neptunus,dc=msnet","gandalf")
l.search_s("ou=AddressBooks,dc=neptunus,dc=msnet", ldap.SCOPE_SUBTREE,
"objectclass=inetOrgPerson")
Traceback (most recent call last):
File
"T:\developer20\knowledgebase\FreeBSD\Thunderbird_OpenLDAP_AddressBook\working\05\example.py",
line 3, in ?
l.simple_bind_s("cn=gandalf,ou=Users,dc=neptunus,dc=msnet","gandalf")
File "C:\Python24\Lib\site-packages\ldap\ldapobject.py", line 175, in
simple_bind_s
msgid = self.simple_bind(who,cred,serverctrls,clientctrls)
File "C:\Python24\Lib\site-packages\ldap\ldapobject.py", line 169, in
simple_bind
return
self._ldap_call(self._l.simple_bind,who,cred,serverctrls,clientctrls)
File "C:\Python24\Lib\site-packages\ldap\ldapobject.py", line 94, in
_ldap_call
result = func(*args,**kwargs)
ldap.SERVER_DOWN: {'info': 'error:14090086:SSL
routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed', 'desc':
"Can't contact LDAP server"}
I think that I need to specify to the openldap client to trust the
server's certificate. The problem is that the ldap module bundles the
openldap-client implementation, and there is no ldap.conf file (or at
least I cannot find it). So how can I configure it to trust my server's
certificate?
Thanks,
Laszlo