Skip to content

Commit

Permalink
Using public_key:cacerts_get/0 to get root certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorng committed Apr 12, 2024
1 parent 9d1b4b1 commit 4c62ba7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions _scripts/src/create-releases.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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)}]}
]}].
4 changes: 2 additions & 2 deletions _scripts/src/gh.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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)}]}
Expand Down

0 comments on commit 4c62ba7

Please sign in to comment.