Skip to content

Commit 83b786b

Browse files
authored
Rely on Erlang/OTP 25+ and no more on CAStore (#76)
1 parent 7153c6e commit 83b786b

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

lib/esbuild.ex

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ defmodule Esbuild do
2929
Useful when you manage the esbuild executable with an external
3030
tool (eg. npm)
3131
32-
* `:cacerts_path` - the directory to find certificates for
33-
https connections
34-
3532
* `:path` - the path to find the esbuild executable at. By
3633
default, it is automatically downloaded and placed inside
3734
the `_build` directory of your current app

lib/esbuild/npm_registry.ex

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ defmodule Esbuild.NpmRegistry do
9191
ssl: [
9292
verify: :verify_peer,
9393
# https://erlef.github.io/security-wg/secure_coding_and_deployment_hardening/inets
94-
cacertfile: cacertfile() |> String.to_charlist(),
94+
cacerts: :public_key.cacerts_get(),
9595
depth: 2,
9696
customize_hostname_check: [
9797
match_fun: :public_key.pkix_verify_hostname_match_fun(:https)
@@ -128,10 +128,6 @@ defmodule Esbuild.NpmRegistry do
128128
end
129129
end
130130

131-
defp cacertfile() do
132-
Application.get_env(:esbuild, :cacerts_path) || CAStore.file_path()
133-
end
134-
135131
defp verify_signature!(message, signature) do
136132
:public_key.verify(
137133
message,

0 commit comments

Comments
 (0)