Skip to content

Commit 4c81f00

Browse files
authored
Merge pull request #191 from ocaisa/curl_ca_eessi_module
Make sure to set `CURL_CA_BUNDLE` on RHEL-based systems when using EESSI modules
2 parents 5c68d52 + 75e2288 commit 4c81f00

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

init/modules/EESSI/2023.06.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,13 @@ if os.getenv("EESSI_MODULE_STICKY") then
233233
load_message = load_message .. " (requires '--force' option to unload or purge)"
234234
end
235235

236+
-- set CURL_CA_BUNDLE on RHEL-based systems
237+
ca_bundle_file_rhel = "/etc/pki/tls/certs/ca-bundle.crt"
238+
if isFile(ca_bundle_file_rhel) then
239+
pushenv("CURL_CA_BUNDLE", ca_bundle_file_rhel)
240+
eessiDebug("Setting CURL_CA_BUNDLE to " .. ca_bundle_file_rhel)
241+
end
242+
236243
if mode() == "load" then
237244
if not os.getenv("EESSI_MODULE_QUIET_LOAD") then
238245
LmodMessage(load_message)

0 commit comments

Comments
 (0)