This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: MacOS: 'Install certificates.command' has no effect
Type: behavior Stage:
Components: macOS Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Jeff Berkowitz, ned.deily, ronaldoussoren
Priority: normal Keywords:

Created on 2019-11-27 02:30 by Jeff Berkowitz, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg357549 - (view) Author: Jeff Berkowitz (Jeff Berkowitz) Date: 2019-11-27 02:30
After using the Python-supported installer to install 3.8.0 on my employer-owned Mac running High Sierra (10.13.6), the 'Install Certificates.command' had no apparently effect on the behavior of Python.

The behavior before executing the script was that a Python program using urllib3 was unable to verify that public certificate of github.com. Using curl, I could download via the desired URL. But the Python program could not, consistently throwing SSL verify errors instead.

I ran the command script several times. I verified that the symlink cert.pem was created in /Library/Frameworks/Python.framework/Versions/3.8/etc/openssl and that it contained "../../lib/python3.8/site-packages/certifi/cacert.pem" and I verified that the latter file had content (4558 lines) and was readable. And that it did contain the root cert for Github.

But despite that and despite multiple new shell windows and so on, I could never get Python to regard the certs. I eventually worked around this by: export SSL_CERT_FILE=/etc/ssl/cert.pem. After this, the Python program using urllib3 could verify Github.com's public cert. But as I understand things, this env var is actually regarded by the OpenSSL "C" library itself, not Python.(?) Which, if true, raises the question of why this was necessary.

Of course, there's quite likely something in my environment that is causing this. But it would be nice to know what.
History
Date User Action Args
2022-04-11 14:59:23adminsetgithub: 83107
2019-11-27 02:30:57Jeff Berkowitzcreate