diff options
author | José Valim <jose.valim@dashbit.co> | 2023-04-07 11:27:05 +0200 |
---|---|---|
committer | José Valim <jose.valim@dashbit.co> | 2023-04-07 11:28:02 +0200 |
commit | 1b3f9f8d5c1c83674d1cf728e81e3aa1918a9ea0 (patch) | |
tree | e355ebc326f4a875aff108601427a39609dc1cec | |
parent | dbfdedf9b3cd274d3dfdc5cb9236e1719a67df2e (diff) | |
download | elixir-v1.14.tar.gz |
Use httpc:ssl_verify_host_options/1v1.14
-rw-r--r-- | lib/mix/lib/mix/utils.ex | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/mix/lib/mix/utils.ex b/lib/mix/lib/mix/utils.ex index 6991dc27a..d671d5dc6 100644 --- a/lib/mix/lib/mix/utils.ex +++ b/lib/mix/lib/mix/utils.ex @@ -655,11 +655,11 @@ defmodule Mix.Utils do request = {:binary.bin_to_list(path), headers} # Use the system certificates if available, otherwise skip peer verification - # TODO: Always use system certificates when OTP >= 25 is required + # TODO: Always use system certificates when OTP >= 25.1 is required ssl_options = - if Code.ensure_loaded?(:public_key) and function_exported?(:public_key, :cacerts_get, 0) do + if Code.ensure_loaded?(:httpc) and function_exported?(:httpc, :ssl_verify_host_options, 1) do try do - [cacerts: apply(:public_key, :cacerts_get, [])] + apply(:httpc, :ssl_verify_host_options, [true]) rescue _ -> Mix.shell().error( |