Skip to content

Commit 93f8db7

Browse files
committed
Using tls_certificate_check in runtime.exs was unable to migrate
Remove the library because it's unable to migrate due to the library application not having started at runtime.exs evaluation time.
1 parent 5975a51 commit 93f8db7

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

config/runtime.exs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,15 @@ if config_env() == :prod do
293293
password: System.fetch_env!("SMTP_PASSWORD"),
294294
ssl: System.get_env("SMTP_SSL", "false") == "true",
295295
tls: :always,
296-
tls_options: :tls_certificate_check.options(System.fetch_env!("SMTP_SERVER")),
296+
tls_options: [
297+
verify: :verify_peer,
298+
cacerts: :public_key.cacerts_get(),
299+
depth: 99,
300+
server_name_indication: String.to_charlist(System.get_env("SMTP_SERVER")),
301+
customize_hostname_check: [
302+
match_fun: :public_key.pkix_verify_hostname_match_fun(:https)
303+
]
304+
],
297305
retries: 1
298306
end
299307
end

lib/nerves_hub/release/tasks.ex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ defmodule NervesHub.Release.Tasks do
88
]
99

1010
def migrate() do
11-
:ok = Application.ensure_started(:tls_certificate_check)
12-
1311
Application.load(@app)
1412

1513
for repo <- Application.fetch_env!(@app, :ecto_repos) do

mix.exs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ defmodule NervesHub.MixProject do
9696
{:telemetry_metrics_statsd, "~> 0.7.0"},
9797
{:telemetry_poller, "~> 1.0"},
9898
{:timex, "~> 3.1"},
99-
{:tls_certificate_check, "~> 1.0"},
10099
{:x509, "~> 0.5.1 or ~> 0.6"}
101100
]
102101
end

mix.lock

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
"telemetry_poller": {:hex, :telemetry_poller, "1.0.0", "db91bb424e07f2bb6e73926fcafbfcbcb295f0193e0a00e825e589a0a47e8453", [:rebar3], [{:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "b3a24eafd66c3f42da30fc3ca7dda1e9d546c12250a2d60d7b81d264fbec4f6e"},
7575
"thousand_island": {:hex, :thousand_island, "1.3.3", "d193a0e268f44a2d09efc6b2d8b39cf37fc65ce99fc421deca6260759d6eb204", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "adc328b15f10012769dcc3aeb14d4855790cd5ea34e4c6a701f334516084e750"},
7676
"timex": {:hex, :timex, "3.7.11", "bb95cb4eb1d06e27346325de506bcc6c30f9c6dea40d1ebe390b262fad1862d1", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:gettext, "~> 0.20", [hex: :gettext, repo: "hexpm", optional: false]}, {:tzdata, "~> 1.1", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "8b9024f7efbabaf9bd7aa04f65cf8dcd7c9818ca5737677c7b76acbc6a94d1aa"},
77-
"tls_certificate_check": {:hex, :tls_certificate_check, "1.22.1", "0f450cc1568a67a65ce5e15df53c53f9a098c3da081c5f126199a72505858dc1", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "3092be0babdc0e14c2e900542351e066c0fa5a9cf4b3597559ad1e67f07938c0"},
7877
"tzdata": {:hex, :tzdata, "1.1.1", "20c8043476dfda8504952d00adac41c6eda23912278add38edc140ae0c5bcc46", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "a69cec8352eafcd2e198dea28a34113b60fdc6cb57eb5ad65c10292a6ba89787"},
7978
"unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"},
8079
"websock": {:hex, :websock, "0.5.3", "2f69a6ebe810328555b6fe5c831a851f485e303a7c8ce6c5f675abeb20ebdadc", [:mix], [], "hexpm", "6105453d7fac22c712ad66fab1d45abdf049868f253cf719b625151460b8b453"},

0 commit comments

Comments
 (0)