<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 9, 2016 at 4:03 AM, Michael Ströder <span dir="ltr"><<a href="mailto:michael@stroeder.com" target="_blank">michael@stroeder.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">Peter Bengtsson wrote:<br>
> The error happens before initialize, but I played with setting _trace_level<br>
><br>
>>>> import ldap<br>
>>>> ldap._trace_level = 7<br>
>>>><br>
> CACERTFILE='/Users/peterbe/dev/MOZILLA/MEDLEM/ldap-bind/medlem/ldapproxy-medlem.crt'<br>
>>>> ldap.set_option(ldap.OPT_X_TLS_CACERTFILE, CACERTFILE)<br>
> *** _ldap.set_option ((24578,<br>
><br>
> '/Users/peterbe/dev/MOZILLA/MEDLEM/ldap-bind/medlem/ldapproxy-medlem.crt'),<br>
>  {})<br>
> Traceback (most recent call last):<br>
>   File "<stdin>", line 1, in <module><br>
>   File<br>
> "/Users/peterbe/virtualenvs/medlem/lib/python2.7/site-packages/python_ldap-2.4.25-py2.7-macosx-10.11-x86_64.egg/ldap/functions.py",<br>
> line 133, in set_option<br>
>     return _ldap_function_call(None,_ldap.set_option,option,invalue)<br>
>   File<br>
> "/Users/peterbe/virtualenvs/medlem/lib/python2.7/site-packages/python_ldap-2.4.25-py2.7-macosx-10.11-x86_64.egg/ldap/functions.py",<br>
> line 64, in _ldap_function_call<br>
>     result = func(*args,**kwargs)<br>
> ValueError: option error<br>
<br>
</span>Note that python-ldap's tracing only logs the Python API calls.<br>
<br>
In this particular case it'd be more helpful to enable libldap's own logging<br>
like this:<br>
<br>
ldap.set_option(ldap.OPT_DEBUG_LEVEL,255)<br>
ldap.set_option(ldap.OPT_X_TLS_CACERTFILE, CACERTFILE)<br>
<br></blockquote><div><br></div><div>No luck :(<br><br>(medlem) :~/dev/MOZILLA/MEDLEM/ldap-bind/medlem$ cat test.py<br>import ldap<br>ldap.set_option(ldap.OPT_DEBUG_LEVEL,255)<br>CACERTFILE='/Users/peterbe/dev/MOZILLA/MEDLEM/ldap-bind/medlem/ldapproxy-medlem.crt'<br>ldap.set_option(ldap.OPT_X_TLS_CACERTFILE, CACERTFILE)<br>(medlem) :~/dev/MOZILLA/MEDLEM/ldap-bind/medlem$ python test.py<br>Traceback (most recent call last):<br>  File "test.py", line 4, in <module><br>    ldap.set_option(ldap.OPT_X_TLS_CACERTFILE, CACERTFILE)<br>  File "/Users/peterbe/virtualenvs/medlem/lib/python2.7/site-packages/python_ldap-2.4.25-py2.7-macosx-10.11-x86_64.egg/ldap/functions.py", line 133, in set_option<br>    return _ldap_function_call(None,_ldap.set_option,option,invalue)<br>  File "/Users/peterbe/virtualenvs/medlem/lib/python2.7/site-packages/python_ldap-2.4.25-py2.7-macosx-10.11-x86_64.egg/ldap/functions.py", line 64, in _ldap_function_call<br>    result = func(*args,**kwargs)<br>ValueError: option error<br><br></div><div>Nothing comes out on stderr.<br></div><div><br></div></div></div></div>