Merge branch 'hackney_reenable_TLSv1.3' into 'develop'
hackney adapter helper: enable TLSv1.3 See merge request pleroma/pleroma!3661
This commit is contained in:
commit
75f912c63f
5 changed files with 6 additions and 10 deletions
|
@ -2726,7 +2726,7 @@ config :pleroma, :config_description, [
|
|||
key: :versions,
|
||||
type: {:list, :atom},
|
||||
description: "List of TLS version to use",
|
||||
suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
|
||||
suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2", ":tlsv1.3"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -24,10 +24,6 @@ defmodule Pleroma.HTTP.AdapterHelper.Hackney do
|
|||
|> Pleroma.HTTP.AdapterHelper.maybe_add_proxy(proxy)
|
||||
end
|
||||
|
||||
defp add_scheme_opts(opts, %URI{scheme: "https"}) do
|
||||
Keyword.put(opts, :ssl_options, versions: [:"tlsv1.2", :"tlsv1.1", :tlsv1])
|
||||
end
|
||||
|
||||
defp add_scheme_opts(opts, _), do: opts
|
||||
|
||||
defp maybe_add_with_body(opts) do
|
||||
|
|
|
@ -7,7 +7,6 @@ defmodule Pleroma.ReverseProxy.Client.Hackney do
|
|||
|
||||
@impl true
|
||||
def request(method, url, headers, body, opts \\ []) do
|
||||
opts = Keyword.put(opts, :ssl_options, versions: [:"tlsv1.2", :"tlsv1.1", :tlsv1])
|
||||
:hackney.request(method, url, headers, body, opts)
|
||||
end
|
||||
|
||||
|
|
|
@ -238,10 +238,11 @@ defmodule Pleroma.ConfigDBTest do
|
|||
end
|
||||
|
||||
test "ssl options" do
|
||||
assert ConfigDB.to_elixir_types([":tlsv1", ":tlsv1.1", ":tlsv1.2"]) == [
|
||||
assert ConfigDB.to_elixir_types([":tlsv1", ":tlsv1.1", ":tlsv1.2", ":tlsv1.3"]) == [
|
||||
:tlsv1,
|
||||
:"tlsv1.1",
|
||||
:"tlsv1.2"
|
||||
:"tlsv1.2",
|
||||
:"tlsv1.3"
|
||||
]
|
||||
end
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ defmodule Pleroma.Docs.GeneratorTest do
|
|||
key: :versions,
|
||||
type: {:list, :atom},
|
||||
description: "List of TLS version to use",
|
||||
suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
|
||||
suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2", ":tlsv1.3"]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -213,7 +213,7 @@ defmodule Pleroma.Docs.GeneratorTest do
|
|||
test "suggestion for tls versions" do
|
||||
[%{children: children} | _] = Generator.convert_to_strings(@descriptions)
|
||||
child = Enum.at(children, 8)
|
||||
assert child[:suggestions] == [":tlsv1", ":tlsv1.1", ":tlsv1.2"]
|
||||
assert child[:suggestions] == [":tlsv1", ":tlsv1.1", ":tlsv1.2", ":tlsv1.3"]
|
||||
end
|
||||
|
||||
test "subgroup with module name" do
|
||||
|
|
Loading…
Reference in a new issue