Skip to content

Commit

Permalink
Ignore warnings with xhref
Browse files Browse the repository at this point in the history
  • Loading branch information
danschultzer committed Feb 28, 2019
1 parent 89a52aa commit 4e340c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 2 additions & 7 deletions lib/pow_assent/http_adapter/httpc.ex
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,11 @@ defmodule PowAssent.HTTPAdapter.Httpc do
defp ssl_opts(url) do
%{host: host} = URI.parse(url)

# This will prevent warnings from showing up if :certifi or
# :ssl_verify_hostname isn't available
certifi_mod = :certifi
ssl_verify_hostname_mod = :ssl_verify_hostname

[
verify: :verify_peer,
depth: 99,
cacerts: certifi_mod.cacerts(),
verify_fun: {&ssl_verify_hostname_mod.verify_fun/3, check_hostname: to_charlist(host)}
cacerts: :certifi.cacerts(),
verify_fun: {&:ssl_verify_hostname.verify_fun/3, check_hostname: to_charlist(host)}
]
end
end
4 changes: 3 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ defmodule PowAssent.MixProject do

# Docs
name: "PowAssent",
docs: docs()
docs: docs(),

xref: [exclude: [Mint.HTTP, :certifi, :ssl_verify_hostname]]
]
end

Expand Down

0 comments on commit 4e340c9

Please sign in to comment.