-
Notifications
You must be signed in to change notification settings - Fork 126
ValueError exception trying to set_option OPT_X_TLS_CACERTFILE in Mac OS #301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The openldap which comes bundled with OSX seems to be the issue. Based on the instructions here(https://stackoverflow.com/a/43450931) I tried using homebrew to install openldap and then building the package with that, but I could not get it to work. Finally i tried installing python-ldap with conda and it just worked. |
The OSX version of OpenLDAP is hacked to build against a custom Apple written TLS library. I don't know what option(s) it allows for the TLS CA certificate to be set. |
Per the Apple written man page, it looks like ldap.conf wants "TLS_TRUSTED_CERTS" to be set, so I'm guessing they have an analogous option for setting this directly as well. You'd need to track down their source tree to discover exactly what they named it. |
Got my program to accept the certificate (although just a start), after debugging for hours. Thanks a lot |
If you got it working using the native OSX ldap libraries, it would be nice if you could document how :) |
Mac OS 10.14.6
Python 3.7.2
python-ldap 3.2.0
Issue description:
On Mac OS, trying to set the
OPT_X_TLS_CACERTFILE
option raises a ValueError.Steps to reproduce:
Doing the same thing in a Docker container running Python 3.7.3 does not have the problem.
The text was updated successfully, but these errors were encountered: