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
@@ -1043,24 +1043,20 @@ function set_ssl_cert_locations(cert_loc)
1043
1043
else# files, /dev/null, non-existent paths, etc.
1044
1044
cert_file = cert_loc
1045
1045
end
1046
-
ret =@ccall libgit2.git_libgit2_opts(
1046
+
ret =@ccall libgit2.git_libgit2_opts(
1047
1047
Consts.SET_SSL_CERT_LOCATIONS::Cint;
1048
1048
cert_file::Cstring,
1049
1049
cert_dir::Cstring)::Cint
1050
1050
ret >=0&&return ret
1051
+
# On macOS and Windows LibGit2_jll is built without a TLS backend that supports
1052
+
# certificate locations; don't throw on this expected error so we allow certificate
1053
+
# location environment variables to be set for other purposes.
1054
+
# We still try doing so to support other LibGit2 builds.
1051
1055
err = Error.GitError(ret)
1052
1056
err.class == Error.SSL &&
1053
1057
err.msg =="TLS backend doesn't support certificate locations"||
1054
1058
throw(err)
1055
-
var =nothing
1056
-
for v in NetworkOptions.CA_ROOTS_VARS
1057
-
haskey(ENV, v) && (var = v)
1058
-
end
1059
-
@assert var !==nothing# otherwise we shouldn't be here
1060
-
msg ="""
1061
-
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