Skip to content

Commit 1b3f9f8

Browse files
committed
Use httpc:ssl_verify_host_options/1
1 parent dbfdedf commit 1b3f9f8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/mix/lib/mix/utils.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -655,11 +655,11 @@ defmodule Mix.Utils do
655655
request = {:binary.bin_to_list(path), headers}
656656

657657
# Use the system certificates if available, otherwise skip peer verification
658-
# TODO: Always use system certificates when OTP >= 25 is required
658+
# TODO: Always use system certificates when OTP >= 25.1 is required
659659
ssl_options =
660-
if Code.ensure_loaded?(:public_key) and function_exported?(:public_key, :cacerts_get, 0) do
660+
if Code.ensure_loaded?(:httpc) and function_exported?(:httpc, :ssl_verify_host_options, 1) do
661661
try do
662-
[cacerts: apply(:public_key, :cacerts_get, [])]
662+
apply(:httpc, :ssl_verify_host_options, [true])
663663
rescue
664664
_ ->
665665
Mix.shell().error(

0 commit comments

Comments
 (0)