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
Copy file name to clipboardExpand all lines: stdlib/LibGit2/src/LibGit2.jl
+6-10Lines changed: 6 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1005,24 +1005,20 @@ function set_ssl_cert_locations(cert_loc)
1005
1005
else# files, /dev/null, non-existent paths, etc.
1006
1006
cert_file = cert_loc
1007
1007
end
1008
-
ret =@ccall libgit2.git_libgit2_opts(
1008
+
ret =@ccall libgit2.git_libgit2_opts(
1009
1009
Consts.SET_SSL_CERT_LOCATIONS::Cint;
1010
1010
cert_file::Cstring,
1011
1011
cert_dir::Cstring)::Cint
1012
1012
ret >=0&&return ret
1013
+
# On macOS and Windows LibGit2_jll is built without a TLS backend that supports
1014
+
# certificate locations; don't throw on this expected error so we allow certificate
1015
+
# location environment variables to be set for other purposes.
1016
+
# We still try doing so to support other LibGit2 builds.
1013
1017
err = Error.GitError(ret)
1014
1018
err.class == Error.SSL &&
1015
1019
err.msg =="TLS backend doesn't support certificate locations"||
1016
1020
throw(err)
1017
-
var =nothing
1018
-
for v in NetworkOptions.CA_ROOTS_VARS
1019
-
haskey(ENV, v) && (var = v)
1020
-
end
1021
-
@assert var !==nothing# otherwise we shouldn't be here
1022
-
msg ="""
1023
-
Your Julia is built with a SSL/TLS engine that libgit2 doesn't know how to configure to use a file or directory of certificate authority roots, but your environment specifies one via the $var variable. If you believe your system's root certificates are safe to use, you can `export JULIA_SSL_CA_ROOTS_PATH=""` in your environment to use those instead.
0 commit comments