Skip to content

Commit d8ba63d

Browse files
committed
[OpenSSL_jll] Set SSL_CERT_FILE if necessary
1 parent 256ebee commit d8ba63d

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

doc/Manifest.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
172172
version = "1.2.0"
173173

174174
[[deps.OpenSSL_jll]]
175-
deps = ["Artifacts", "Libdl"]
175+
deps = ["Artifacts", "Libdl", "NetworkOptions"]
176176
uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95"
177177
version = "3.0.13+1"
178178

stdlib/OpenSSL_jll/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ version = "3.0.13+1"
55
[deps]
66
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
77
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
8+
NetworkOptions = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
89

910
[compat]
1011
julia = "1.6"

stdlib/OpenSSL_jll/src/OpenSSL_jll.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
baremodule OpenSSL_jll
66
using Base, Libdl, Base.BinaryPlatforms
7+
using NetworkOptions: ca_roots
78

89
const PATH_list = String[]
910
const LIBPATH_list = String[]
@@ -43,6 +44,12 @@ function __init__()
4344
global artifact_dir = dirname(Sys.BINDIR)
4445
LIBPATH[] = dirname(libssl_path)
4546
push!(LIBPATH_list, LIBPATH[])
47+
48+
# If not already done, set the environment variable `SSL_CERT_FILE` when necessary.
49+
cert_loc = ca_roots()
50+
if cert_loc isa String
51+
get!(ENV, "SSL_CERT_FILE", cert_loc)
52+
end
4653
end
4754

4855
# JLLWrappers API compatibility shims. Note that not all of these will really make sense.

0 commit comments

Comments
 (0)