Skip to content

Commit

Permalink
Rely on Erlang/OTP 25+ and no more on CAStore (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
DnOberon authored Feb 2, 2025
1 parent 7153c6e commit 83b786b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
3 changes: 0 additions & 3 deletions lib/esbuild.ex
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ defmodule Esbuild do
Useful when you manage the esbuild executable with an external
tool (eg. npm)
* `:cacerts_path` - the directory to find certificates for
https connections
* `:path` - the path to find the esbuild executable at. By
default, it is automatically downloaded and placed inside
the `_build` directory of your current app
Expand Down
6 changes: 1 addition & 5 deletions lib/esbuild/npm_registry.ex
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ defmodule Esbuild.NpmRegistry do
ssl: [
verify: :verify_peer,
# https://erlef.github.io/security-wg/secure_coding_and_deployment_hardening/inets
cacertfile: cacertfile() |> String.to_charlist(),
cacerts: :public_key.cacerts_get(),

Check warning on line 94 in lib/esbuild/npm_registry.ex

View workflow job for this annotation

GitHub Actions / test (1.11, 23)

:public_key.cacerts_get/0 is undefined or private
depth: 2,
customize_hostname_check: [
match_fun: :public_key.pkix_verify_hostname_match_fun(:https)
Expand Down Expand Up @@ -128,10 +128,6 @@ defmodule Esbuild.NpmRegistry do
end
end

defp cacertfile() do
Application.get_env(:esbuild, :cacerts_path) || CAStore.file_path()
end

defp verify_signature!(message, signature) do
:public_key.verify(
message,
Expand Down

0 comments on commit 83b786b

Please sign in to comment.