From 4e340c98497cd2a5f0bffcc5ded8fedd1fbab69d Mon Sep 17 00:00:00 2001 From: Dan Schultzer Date: Thu, 28 Feb 2019 10:37:37 -0800 Subject: [PATCH] Ignore warnings with xhref --- lib/pow_assent/http_adapter/httpc.ex | 9 ++------- mix.exs | 4 +++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/pow_assent/http_adapter/httpc.ex b/lib/pow_assent/http_adapter/httpc.ex index fd5054b..fb4c400 100644 --- a/lib/pow_assent/http_adapter/httpc.ex +++ b/lib/pow_assent/http_adapter/httpc.ex @@ -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 diff --git a/mix.exs b/mix.exs index 812cb1b..bbc8521 100644 --- a/mix.exs +++ b/mix.exs @@ -19,7 +19,9 @@ defmodule PowAssent.MixProject do # Docs name: "PowAssent", - docs: docs() + docs: docs(), + + xref: [exclude: [Mint.HTTP, :certifi, :ssl_verify_hostname]] ] end