You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading Julia to 1.12-rc, it seems I could not connect to the remote server because of SSL fail (for package https://github.com/SciQLop/Speasy.jl).
However, this bug only appears locally, not in CI, which is very weird. I checked the cert paths from Python, and the result is different from the previous discussion #493 , so maybe they are related.
I think the bug is the Python ssl library fail to load from Python openssl_cafile, instead it points to /workspace/.... And when using ssl from Python, it just could not verify the certificate
I'm encountering an issue on Julia 1.12 presenting a similar openssl_cafile='/workspace/destdir'related error. My diagnosis is below.
Julia 1.12 is the first release to ship libssl.so.3 / libcrypto.so.3 in lib/julia/. As far as I can tell,julia does not load them, but I think something in the using PythonCall path must (I haven't done a full trace on this). Once loaded, Julia's copy occupies the libssl.so.3 SONAME. When CPython then dlopens _ssl, the loader reuses the already-loaded library instead of following the interpreter's RPATH to its own. /proc/self/maps confirms only Julia's copies are mapped. Julia's OpenSSL bakes OPENSSLDIR in at compile time, so its defaults come out as /workspace/destdir/ssl/..., which of course are garbage. CPython maps any default that is not an existing file or directory to None, so the trust store is empty and verification cannot succeed. Julia's own HTTPS is unaffected because Julia never uses OpenSSL's compiled-in defaults; it passes libcurl a bundle from NetworkOptions explicitly.
I had an agent check different Julia versions pointing PythonCall.jl at the same Python installation (a pixi env, _ssl dynamically linked), where I have not set SSL_CERT_FILE manually, results are
Julia
libssl mapped
ssl.OPENSSL_VERSION
openssl_cafile
exists
urlopen
1.10.11
the env's own
3.5.7
<env>/ssl/cert.pem
yes
OK
1.11.9
the env's own
3.5.7
<env>/ssl/cert.pem
yes
OK
1.12.6
Julia's
3.5.4
/workspace/destdir/ssl/cert.pem
no
FAIL
Whether this can be reproduced seems to depend on how the Python used links its _ssl. If the Python is linked dynamically against libssl.so.3 (e.g., conda-forge, pixi) it's affected because it picks up Julia's declared library. If the Python is statically linked (like a uv managed environment I had lying around) I couldn't reproduce it.
Proposed Solution
The following fixes the problem for me
import NetworkOptions
get!(ENV, "SSL_CERT_FILE", NetworkOptions.ca_roots_path())
using PythonCall
This names a bundle explicitly rather than relying on the compiled-in defaults, so it fixes any variant where those defaults are the problem, whatever broke them.
PythonCall could do the same in init_context() (src/C/context.jl), just before Py_InitializeEx, since it knows it is embedding CPython into a process that may already hold Julia's OpenSSL. NetworkOptions is a stdlib, so no new dependency. The get! leaves existing user setting alone, so hopefully it will be safe, but I haven't fully thought through what else this might affect.
Activity
Beforerr commentedon Aug 12, 2025
Solved. It turned out to be macOS setting problem. (https://support.apple.com/en-in/guide/keychain-access/kyca11871/mac
Beforerr commentedon Aug 30, 2025
Sorry to reopen. But I think the issue is not solved for Julia 1.12. It fails on Ubuntu CI https://github.com/SciQLop/Speasy.jl/actions/runs/17310489122/job/49143456845
cjdoris commentedon Aug 30, 2025
What's the bug? You haven't shown any errors.
Beforerr commentedon Aug 30, 2025
I think the bug is the Python ssl library fail to load from Python openssl_cafile, instead it points to
/workspace/.... And when using ssl from Python, it just could not verify the certificateymiftah commentedon Sep 4, 2025
I encountered a similar issue, example code:
Worth noting, no error thrown with requests
cgarling commentedon Sep 20, 2026
I'm encountering an issue on Julia 1.12 presenting a similar
openssl_cafile='/workspace/destdir'related error. My diagnosis is below.Julia 1.12 is the first release to ship
libssl.so.3/libcrypto.so.3inlib/julia/. As far as I can tell,juliadoes not load them, but I think something in theusing PythonCallpath must (I haven't done a full trace on this). Once loaded, Julia's copy occupies thelibssl.so.3SONAME. When CPython thendlopens_ssl, the loader reuses the already-loaded library instead of following the interpreter's RPATH to its own./proc/self/mapsconfirms only Julia's copies are mapped. Julia's OpenSSL bakesOPENSSLDIRin at compile time, so its defaults come out as/workspace/destdir/ssl/..., which of course are garbage. CPython maps any default that is not an existing file or directory toNone, so the trust store is empty and verification cannot succeed. Julia's own HTTPS is unaffected because Julia never uses OpenSSL's compiled-in defaults; it passes libcurl a bundle from NetworkOptions explicitly.I had an agent check different Julia versions pointing PythonCall.jl at the same Python installation (a pixi env,
_ssldynamically linked), where I have not setSSL_CERT_FILEmanually, results aressl.OPENSSL_VERSIONopenssl_cafileurlopen<env>/ssl/cert.pem<env>/ssl/cert.pem/workspace/destdir/ssl/cert.pemWhether this can be reproduced seems to depend on how the Python used links its
_ssl. If the Python is linked dynamically againstlibssl.so.3(e.g., conda-forge, pixi) it's affected because it picks up Julia's declared library. If the Python is statically linked (like auvmanaged environment I had lying around) I couldn't reproduce it.Proposed Solution
The following fixes the problem for me
This names a bundle explicitly rather than relying on the compiled-in defaults, so it fixes any variant where those defaults are the problem, whatever broke them.
PythonCall could do the same in
init_context()(src/C/context.jl), just beforePy_InitializeEx, since it knows it is embedding CPython into a process that may already hold Julia's OpenSSL. NetworkOptions is a stdlib, so no new dependency. Theget!leaves existing user setting alone, so hopefully it will be safe, but I haven't fully thought through what else this might affect.