Hanging during ldaps
Goucher, Adam
adam.goucher at hp.com
Mon Jan 5 23:02:02 CET 2004
> Just guessing since you did not mention what "is hanging"
> means and you did
> not provide a Python traceback: You have to tell where to
> find the CA's
> certificate by calling
>
> ldap.set_option(ldap.OPT_X_TLS_CACERTFILE,path_to_cacert_file) or
> ldap.set_option(ldap.OPT_X_TLS_CACERTDIR,path_of_cacert_dir).
Using openssl's s_client it shows that the connection is doing TLS 1.0. Consequently, I tried to do exactly as is suggested and received the following.
Traceback (most recent call last):
File "c:\temp\ads.py", line 3, in ?
ldap.set_option(ldap.OPT_X_TLS_CACERTFILE, "c:\temp\unicert.cer")
File "C:\Python23\Lib\site-packages\ldap\functions.py", line 104, in set_option
_ldap_function_call(_ldap.set_option,option,invalue)
File "C:\Python23\Lib\site-packages\ldap\__init__.py", line 62, in _ldap_function_call
result = apply(func,args,kwargs)
ldap.LDAPError: {'errnum': -1}
And the cert itself is pem encoded.
-adam
More information about the python-ldap
mailing list