Skip to content

Commit

Permalink
Add overridable cacertfile (#30)
Browse files Browse the repository at this point in the history
easink authored Jan 8, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent be25694 commit a769a21
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/tailwind.ex
Original file line number Diff line number Diff line change
@@ -312,7 +312,7 @@ defmodule Tailwind do
end

# https://erlef.github.io/security-wg/secure_coding_and_deployment_hardening/inets
cacertfile = CAStore.file_path() |> String.to_charlist()
cacertfile = cacertfile() |> String.to_charlist()

http_options = [
ssl: [
@@ -337,6 +337,10 @@ defmodule Tailwind do
end
end

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

defp protocol_versions do
if otp_version() < 25, do: [:"tlsv1.2"], else: [:"tlsv1.2", :"tlsv1.3"]
end

0 comments on commit a769a21

Please sign in to comment.