From 4c62ba7bb777c16eec43a60e95bf9db3e3e4d977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Gustavsson?= Date: Fri, 12 Apr 2024 10:14:37 +0200 Subject: [PATCH] Using `public_key:cacerts_get/0` to get root certificates --- _scripts/src/create-releases.erl | 14 +++++++------- _scripts/src/gh.erl | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/_scripts/src/create-releases.erl b/_scripts/src/create-releases.erl index be1bc10f62..e36f0c2151 100644 --- a/_scripts/src/create-releases.erl +++ b/_scripts/src/create-releases.erl @@ -197,10 +197,10 @@ pmap(Fun, List) -> #{ host := Hostname } = uri_string:parse(Url), VerifyFun = {fun ssl_verify_hostname:verify_fun/3, [{check_hostname, Hostname}]}, - %% CACerts = certifi:cacerts(), - [{ssl,[{verify, verify_peer}, - {cacertfile, "/etc/ssl/certs/ca-certificates.crt"}, - {verify_fun, VerifyFun}, - {customize_hostname_check, - [{match_fun, public_key:pkix_verify_hostname_match_fun(https)}]} - ]}]. + CACerts = public_key:cacerts_get(), + [{ssl,[{verify, verify_peer}, + {cacerts, CACerts}, + {verify_fun, VerifyFun}, + {customize_hostname_check, + [{match_fun, public_key:pkix_verify_hostname_match_fun(https)}]} + ]}]. diff --git a/_scripts/src/gh.erl b/_scripts/src/gh.erl index f595f2b617..e4afbc210c 100644 --- a/_scripts/src/gh.erl +++ b/_scripts/src/gh.erl @@ -57,9 +57,9 @@ ssl_opts(Url) -> #{ host := Hostname } = uri_string:parse(Url), VerifyFun = {fun ssl_verify_hostname:verify_fun/3, [{check_hostname, Hostname}]}, - %% CACerts = certifi:cacerts(), + CACerts = public_key:cacerts_get(), [{ssl,[{verify, verify_peer}, - {cacertfile, "/etc/ssl/certs/ca-certificates.crt"}, + {cacerts, CACerts}, {verify_fun, VerifyFun}, {customize_hostname_check, [{match_fun, public_key:pkix_verify_hostname_match_fun(https)}]}