Skip to content
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

Don't error when initializing LibGit2 with CA roots path #56924

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

visr
Copy link
Contributor

@visr visr commented Dec 31, 2024

When e.g. SSL_CERT_FILE is set, we cannot set this location in LibGit2_jll because it isn't built with support for that. Until now we've errored out with a message telling users to set JULIA_SSL_CA_ROOTS_PATH to an empty string.

This changes the behavior to allow this expected error. Variables like SSL_CERT_FILE are for instance set by Conda, ensuring many people running into this, see e.g. https://discourse.julialang.org/search?q=JULIA_SSL_CA_ROOTS_PATH.

The other part, and some more context for this, is here: JuliaLang/NetworkOptions.jl#37 (comment). These two PRs are independent of one another. With this fix I can run e.g. add Example#master in julia despite SSL_CERT_FILE being set.

@LilithHafner LilithHafner added the security System security concerns and vulnerabilities label Dec 31, 2024
@nsajko nsajko added libgit2 The libgit2 library or the LibGit2 stdlib module stdlib Julia's standard library labels Dec 31, 2024
@visr visr force-pushed the allow-cert-file branch from 8dbcb0f to 4f2f105 Compare January 2, 2025 10:42
When e.g. SSL_CERT_FILE is set, we cannot set this location in LibGit2_jll because it isn't built with support for that. Until now we've errored out with a message telling users to set JULIA_SSL_CA_ROOTS_PATH to an empty string.

This changes the behavior to allow this expected error. Variables like SSL_CERT_FILE are for instance set by Conda, ensuring many people running into this, see e.g. https://discourse.julialang.org/search?q=JULIA_SSL_CA_ROOTS_PATH.

The other part, and some more context for this, is here: JuliaLang/NetworkOptions.jl#37 (comment)
@visr visr force-pushed the allow-cert-file branch from 8be0eee to e33618a Compare January 7, 2025 20:52
@visr
Copy link
Contributor Author

visr commented Jan 9, 2025

Test failures are unrelated. I rebased this now on top of the LibGit2 1.9 update and switch to OpenSSL that have merged since. Would appreciate a review on this and its companion JuliaLang/NetworkOptions.jl#37. Tagging @StefanKarpinski who originally contributed this code in #38827.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libgit2 The libgit2 library or the LibGit2 stdlib module security System security concerns and vulnerabilities stdlib Julia's standard library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants