Skip to content

Commit e23dd16

Browse files
authored
Remove CAStore (#35)
Erlang/OTP 25 ships with its own certificates, which can also be configured globally. Earlier Erlang/OTP versions are no longer maintained.
1 parent 436d793 commit e23dd16

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

lib/bun.ex

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,11 @@ defmodule Bun do
296296
end
297297

298298
# https://erlef.github.io/security-wg/secure_coding_and_deployment_hardening/inets
299-
cacertfile = cacertfile() |> String.to_charlist()
300-
301299
http_options =
302300
[
303301
ssl: [
304302
verify: :verify_peer,
305-
cacertfile: cacertfile,
303+
cacerts: :public_key.cacerts_get(),
306304
depth: 2,
307305
customize_hostname_check: [
308306
match_fun: :public_key.pkix_verify_hostname_match_fun(:https)
@@ -351,8 +349,4 @@ defmodule Bun do
351349
_ -> nil
352350
end
353351
end
354-
355-
defp cacertfile() do
356-
Application.get_env(:bun, :cacerts_path) || CAStore.file_path()
357-
end
358352
end

mix.exs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ defmodule Bun.MixProject do
4040

4141
defp deps do
4242
[
43-
{:castore, ">= 0.0.0"},
4443
{:ex_doc, ">= 0.0.0", only: :dev}
4544
]
4645
end

mix.lock

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
%{
2-
"castore": {:hex, :castore, "1.0.3", "7130ba6d24c8424014194676d608cb989f62ef8039efd50ff4b3f33286d06db8", [:mix], [], "hexpm", "680ab01ef5d15b161ed6a95449fac5c6b8f60055677a8e79acf01b27baa4390b"},
32
"earmark_parser": {:hex, :earmark_parser, "1.4.42", "f23d856f41919f17cd06a493923a722d87a2d684f143a1e663c04a2b93100682", [:mix], [], "hexpm", "6915b6ca369b5f7346636a2f41c6a6d78b5af419d61a611079189233358b8b8b"},
43
"ex_doc": {:hex, :ex_doc, "0.36.1", "4197d034f93e0b89ec79fac56e226107824adcce8d2dd0a26f5ed3a95efc36b1", [:mix], [{:earmark_parser, "~> 1.4.42", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "d7d26a7cf965dacadcd48f9fa7b5953d7d0cfa3b44fa7a65514427da44eafd89"},
54
"makeup": {:hex, :makeup, "1.2.1", "e90ac1c65589ef354378def3ba19d401e739ee7ee06fb47f94c687016e3713d1", [:mix], [{:nimble_parsec, "~> 1.4", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "d36484867b0bae0fea568d10131197a4c2e47056a6fbe84922bf6ba71c8d17ce"},

0 commit comments

Comments
 (0)